Solved

.net website runtime compile

Posted on 2008-10-16
6
302 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
  • 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

813 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now