?
Solved

Trigger recompile iis 6

Posted on 2011-10-17
10
Medium Priority
?
273 Views
Last Modified: 2012-05-12
Hi,

For a 4 node iis6 server with 40 iis sites, I would like to trigger a recompile (all sites). Can this be done?
0
Comment
Question by:janhoedt
  • 5
  • 5
10 Comments
 
LVL 28

Expert Comment

by:strickdd
ID: 36980625
Change the machine.config or the machine's web.config in the .Net folders.
0
 

Author Comment

by:janhoedt
ID: 36980872
Wht is the exact location, what should I change and does it trigger recompile of every site?
Would be great if we could trigger this remotely.
0
 
LVL 28

Expert Comment

by:strickdd
ID: 36980901
Any changes to the .config file for the appropriate framework will trigger a recompile of any .Net website that is NOT pre-compiled. The locations are here:

For .NET Framework v1.1:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG

For .NET Framework 2.0:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG

For .NET 3.0 and 3.5:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG

From my experience, the change can simply be adding a space to the end of a line and saving the file.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:janhoedt
ID: 36984400
Thanks.
I see Framework & Framework64.
Under Framework64 v2.0.50727, V3.0 and V3.5, only the v2.0.50727 contains a config-folder in which a machine & web config. Idem for the Framework (more versions of .net but also v2.0.50727 only contains a config-folder.

Practical questions:
=> should I conclude this version of .net is in use (since it only has the config-folder) and which one should I change (Framework64 or Framework?, machine.config or web.config or doesn't it matter?).
=> how can I see/check the recompile is actually going on?
=> Could you explain me the process/logic behind a recompile?

Thanks,
J.
0
 
LVL 28

Expert Comment

by:strickdd
ID: 36985800
With .Net web sites (not web applications), they are dynamically compiled. To trigger this compile, you will need to change a code-behind file, global.asax file, or web.config file. IIS detects this change and recompiles the entire site to make sure the new changes are in the temporary build of the site.

As far as which config to change, I believe you want the non-64 version, but the easiest way to test is to put a simple page out on the server that either writes to the cache or creates a session variable and then a separate page that reads from the cache/session and writes it out. Hit the first page to set the value and then hit the second page to see the value. Change the config file, save it, and refresh the second page. A re-compile will flush the cache and reset all session variables. so the page should print out nothing if it recycled.
0
 

Author Comment

by:janhoedt
ID: 37006509
The question actually is to trigger the recompiles, in other words a kind of url-hitter would be necessary.
0
 
LVL 28

Expert Comment

by:strickdd
ID: 37006612
So make a page that opens the machine's config file and saves an additional space character. You hit that page, it will trigger the recompile.
0
 

Author Comment

by:janhoedt
ID: 37006641
I know, but we need to "hit" about 40 sites with about 20 pages each which has to be hitted.
0
 
LVL 28

Accepted Solution

by:
strickdd earned 2000 total points
ID: 37006767
So you make the one page you hit modify the machine config files not each site's config files. That way it is one page that affects all sites.

What are you trying to do here exactly? Is this something you could do through IIS?
0
 

Author Comment

by:janhoedt
ID: 37010475
I ll give it a try.
What we try to do: development team makes adaptations to a component which triggers a recompile of about 40 sites hosted on this iis server. If we put the server live (we suspend it, as it is part of a 4 node cluster) cpu goes 100 percent for 20 minutes and sites all get timeouts. We want to do the recompilations before we set the iis node live and no timeouts occur.
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

850 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