Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

.net website runtime compile

Posted on 2008-10-16
6
Medium Priority
?
311 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 1200 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 800 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

Is Your Team Achieving Their Full Potential?

74% of employees feel they are not achieving their full potential. With Linux Academy, not only will you strengthen your team's core competencies but also their knowledge of of the newest IT topics.

With new material every week, we'll make sure that you stay ahead of the game.

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

705 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