Solved

.net website runtime compile

Posted on 2008-10-16
6
309 Views
Last Modified: 2013-11-07
I need to allow my website to recompile at run time if I change the code on my code behind pages. I run .net 2.0 and I have two projects in my solution. I did setup a table where I store some site variables and I need to recompile in VS to apply the changed values. I heard if I change my web.config file the site should recompile but it doesn't, and it wouldn't help me with my code behind pages either.
I do know, run time compile is possible but I need you experts to show me the way it gets done.
Thank you in advance for your help and time.
0
Comment
Question by:JoeUS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 22732390
This is surely because you have a "Web Application" instead of a "Web Site". An application is compiled and only requires DLLs and .aspx/.ascx to run. In a Web Site, you copy all your files (.aspx, .cs, ...) and it will be compiled on the server.
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 22732713
when you change the web.config the site is not recompiled just all the sessions are reset and the users have to log in again.
to recompile the website you need to do it manually

for that look at the following link from MSDN
http://msdn.microsoft.com/en-us/library/399f057w(VS.80).aspx
0
 

Author Comment

by:JoeUS
ID: 22732957
So my understanding from your post is that there is no way to precompile a website (application) and still able to JIT at runtime.  
Could I start in VS with a "Blank Solution".
Add  a "Web Site".
Add my my existing projects to the solution.
Add the project references to "Web Site".
Move only my Web Site to the web server with precompiled ".aspx" pointers.
Would that allow me to take advatage of JIT.
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 300 total points
ID: 22733232
>>Could I start in VS with a "Blank Solution".
>>Add  a "Web Site".
>>Add my my existing projects to the solution.

No, you have to create a new project using the Web Site template and move all your forms/classes, ... to this new project
0
 
LVL 26

Assisted Solution

by:Anurag Thakur
Anurag Thakur earned 200 total points
ID: 22734011
there is another solution anyhow
if you publish your website on your build machine and make an individual assembly for each webpage then if you change your code behind you can publish it agian and then just paste you aspx file and the corresponding page assembly from the bin folder and update your website pages and assemblies

this allows you to do partial updates
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question