Solved

.net website runtime compile

Posted on 2008-10-16
6
308 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

739 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