Solved

.net website runtime compile

Posted on 2008-10-16
6
298 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 69

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 69

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

757 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

20 Experts available now in Live!

Get 1:1 Help Now