469,311 Members | 2,413 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,311 developers. It's quick & easy.

Modify application after Deployment

Hello Everyone,

I am having a little problem. After publish my ASP.Net project to my server I have to recycle the Application pool in IIS. Whenever I modify the code i get a compilation error and have to Recycle the application pool again. Is that the normal process for applications after deployment?
Oct 7 '09 #1
30 3953
9,735 Expert Mod 8TB
Every time you modify the application the application pool is restarted.
So yes this is normal.

Whenever you make a change to the .NET code (your VB or C#) code [edit] and then build your website (precompile the application) [/edit] the application pool is reset. Whenever you modify the web.config file, the application pool is reset.

Oct 8 '09 #2
Should the application pool reset itself? Because I get a compilation error when I try to access the modified page online. So what I usually do is open the app pool and manually refresh,reset recycle it. Then my application works. Is that how it should be?
Oct 8 '09 #3
9,735 Expert Mod 8TB
Yes it will reset itself.
It might help if you posted what the error says.....
Oct 8 '09 #4
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: The compiler failed with error code -1073741502.

I have googled this error but none of the solutions seem to work for me. Only restarting the app pool. Any Ideas?
Oct 8 '09 #5
9,735 Expert Mod 8TB
Try precompiling the website before publishing it...?
Oct 8 '09 #6
What if the website is already published and located on the server. I open the project in visual studio, make the changes , click save and thats it. Time to restart the app pool.
Oct 8 '09 #7
9,735 Expert Mod 8TB
Is the project located on the web server?
Try right clicking on the project name in the Solution Explorer and clicking "build".
This will compile all of your code and will definitely reset the application domain (if changes are made to the code).
Oct 8 '09 #8
Yest it is located on the web server.Have done that. Still does not work. Just to clarify the restart I have to do is in IIS app pool.
Oct 8 '09 #9
9,735 Expert Mod 8TB
That's the way I work as well.

It makes absolutely no sense for ASP.NET to compile your code if you have already pre-compiled it. The ASP.NET compiler does not compile your code "on the fly" when there is as cached, precompiled version available.

Are you absolutely sure that you built the solution without error after making code changes?
Oct 8 '09 #10
Absolutely no errors or warnings.
Oct 8 '09 #11
Here is the Detailed Compiler Output."If it helps"

c:\windows\system32\inetsrv> "C:\Windows\Microsoft.NET\Framework\v3.5\csc.e xe" /t:library /utf8output /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceMode l.Web\\System.ServiceMode l.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Data.DataSe tExtensions\\System.Data. DataSetExtensions.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Extensi ons\\System.Web.Extension s.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Service s\\System.Web.Services.dl l" /R:"C:\Windows\assembly\GAC_MSIL\System.IdentityMod el\\System.IdentityModel. dll" /R:"C:\Windows\assembly\GAC_32\System.Data\ _b77a5c561934e089\System.Data.dll" /R:"C:\Windows\assembly\GAC_32\System.Web\ b03f5f7f11d50a3a\System.Web.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Web.Mobile\\System.Web.Mobile.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Configurati on\\System.Configuration. dll" /R:"C:\Windows\assembly\GAC_MSIL\System\ 7a5c561934e089\System.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.WorkflowSer vices\\System.WorkflowSer vices.dll" /R:"C:\Windows\assembly\GAC_32\System.EnterpriseSer vices\\System.EnterpriseS ervices.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0 .0.0__b03f5f7f11d50a3a\System.Drawing.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\m scorlib.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml\ __b77a5c561934e089\System.Xml.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Runtime.Ser ialization\\System.Runtim e.Serialization.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\T emporary ASP.NET Files\healthgames_cms_asp.net\534a3fdc\8ab2d544\as sembly\dl3\a563f03a\aeb41d32_3e48ca01\HealthGames. DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.Xml.Linq\3. 5.0.0__b77a5c561934e089\System.Xml.Linq.dll" /R:"C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0. 0__b77a5c561934e089\System.Core.dll" /R:"C:\Windows\Microsoft.NET\Framework\v2.0.50727\T emporary ASP.NET Files\healthgames_cms_asp.net\534a3fdc\8ab2d544\as sembly\dl3\18ba3e12\001e1e5c_92ebc901\AjaxControlT oolkit.DLL" /R:"C:\Windows\assembly\GAC_MSIL\System.ServiceMode l\\System.ServiceModel.dl l" /out:"C:\Windows\Microsoft.NET\Framework\v2.0.50727 \Temporary ASP.NET Files\healthgames_cms_asp.net\534a3fdc\8ab2d544\Ap p_Web_demographics.aspx.cdcab7d2.b2ja-z0v.dll" /debug- /optimize+ /win32res:"C:\Windows\Microsoft.NET\Framework\v2.0. 50727\Temporary ASP.NET Files\healthgames_cms_asp.net\534a3fdc\8ab2d544\yv u6wkfa.res" /w:4 /nowarn:1659;1699;1701 /warnaserror- "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET Files\healthgames_cms_asp.net\534a3fdc\8ab2d544\Ap p_Web_demographics.aspx.cdcab7d2.b2ja-z0v.0.cs" "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Tem porary ASP.NET Files\healthgames_cms_asp.net\534a3fdc\8ab2d544\Ap p_Web_demographics.aspx.cdcab7d2.b2ja-z0v.1.cs"
Oct 8 '09 #12
------ Build started: Project: HealthGames, Configuration: Debug Any CPU ------
HealthGames -> Z:\HealthGames\cms\ASP.Net\bin\HealthGames.dll
========== Build: 1 succeeded or up-to-date, 0 failed, 0 skipped ==========
Oct 8 '09 #13
9,735 Expert Mod 8TB
I'm not sure what's wrong...
Have you tried creating a new website (or virtual directory) using IIS and publishing the application to that website instead?
Oct 8 '09 #14
Could it be because the home page to the web site is written in classic asp It compiles fine even after modifying?But the new page, the one i created and modify is asp.net. Could it be that they don't mesh together until restarting the app pool?
Oct 8 '09 #15
9,735 Expert Mod 8TB
I didn't realize you had classic asp in the mix.
How did you include the classic asp into the application???
Oct 8 '09 #16
The application was written in classic by a different programmer. Any new nodes to the application I write in .net for many reasons. I just publish my web site/project to the same folder on the server with the classic asp pages. In the classic asp pages I modify the code to point to my new pages and include any query strings needed. That is about it
Oct 8 '09 #17
9,735 Expert Mod 8TB
Ok, I have a feeling this has something to do with ASP classic.
You're probably running 2 different applications pools (but I'm not sure how ASP classic works). It's probably not the ASP.NET compiler crashing because you are able to build your solution to create a pre-compiled version of your .NET web application. This problem probably has to do with the way your ASP classic code is working.

I'm going to move your question to the ASP classic forum and hopefully you can get more help on the issue there.

Oct 8 '09 #18
Thank you for your help.
Oct 8 '09 #19
564 Expert 512MB
Hello stefbek97,

Isolate the problem and future problems by placing all your websites within their own application pool.

Under IIS you will see a folder called “ApplicationPool” there you can create a new pool for your Virtuals/Web sites.

Then in IIS right click on the virtual/website that is having the problems and select properties. Then look under the “Virtual Directory” tab and you will see where you can change it to the new application pool you have created.

When you start creating more and more DotNet application under different Frameworks you will see the need for creating more application pools. I Have create a pool for every version of DotNet Frameworks there are and what ever Framework I build a site under I place it in that Application Pools Framework.

Hope this helps,
Oct 9 '09 #20
564 Expert 512MB
Hello stefbek97,

It has been a few days. Has this problem been resolved?

Oct 13 '09 #21
Not really. I am not sure what to do at this point.
Oct 13 '09 #22
564 Expert 512MB
Did you try creating a new application pool?
Oct 13 '09 #23
I did and I cant get the app to work in the new pool.
Oct 13 '09 #24
564 Expert 512MB
You cant get it to work at all?
Oct 14 '09 #25
533 Expert 512MB
Hi guys,

1) Thread moved, this is not related to classic ASP.
2) The problem you're having is that when a website is run in ASP.NET, ASP.NET caches the compiled code into C:\WINDOWS\Microsoft.NET\Framework\(version you are using)\Temporary ASP.NET Files. When you change the codebase on the webserver, ASP.NET tries to see what file you are accessing, and then tries to run the cached code if applicable. If the cached file is not equal to the file being requested, this error springs up.
Every time you make live code changes you will either need to:
a) recycle the app pool, or;
b) clear the Temporary ASP.NET Files directory.

It's easier and more sensible to do a) because b) is a side-effect of a).

BTW check which version of ASP.NET your website is configured to use and ensure that any other applications sharing the same AppPool are using the same version (as per CroCrew's recommendations). You cannot run two versions of ASP.NET inside a single application pool - this is by design.

Hope this helps.

Oct 14 '09 #26
9,735 Expert Mod 8TB
CG I don't know if this is really related to the issue.

I just tested this and every time I make a change to my ASP.NET code (and compiled it) the files in the "Temporary ASP.NET Files" directory are automatically changed to the newest version (old ones are replaced with the new ones) the first time the website is accessed.

I still think it has to do with the ASP classic.

What happens when you have ASP.NET code and ASP classic code running in the same virtual directory/website?

I would assume it would go something like:
  • User accesses classic ASP page
  • Classic ASP compiler compiles the ASP page
  • User clicks link in Classic ASP page
  • Classic ASP compiler compiles the ASP page and executes the ASP code associated with the link that results in redirecting user to ASP.NET page
  • ASP.NET finds cached version of aspx page and uses that to do stuff and return the page to the user

The problem is that the compiler's crashing.
I'm assuming it's the ASP classic compiler because the ASP.NET compiler isn't required since there's a cached version website.

I don't understand why the OP has to delete the files in the temporary ASP.NET files directory when this is automatically done.

What I really don't understand is how the ASP classic code is sharing an application pool with the ASP.NET code....I've never done this before so I have no clue.
Oct 14 '09 #27
9,735 Expert Mod 8TB
@Stefbek97: I'm just wonder, what version of IIS are you using?
Oct 14 '09 #28
533 Expert 512MB
@Frinny, the Classic ASP compiler and the .NET compiler are two separate ISAPIs which are only executed when a matching request is made to the web server (.asp for ClASP, .aspx for .NET), so it can't be a compiler mis-match.

@Stefbek97, what's the error when you move the site to it's own application pool?
If you could reply with the following info:
* IIS version
* ASP.NET version of the site
* Application pool identity
* Error message

then hopefully we can try and isolate the issue.

Oct 15 '09 #29
9,735 Expert Mod 8TB
Thanks for the clarification :)

I didn't think it was a compiler mismatch.
I think that it's the ASP classic compiler that's failing when the following error happens:
Is there a way to cache ASP classic pages? (eg precompile them the same way you can precompile an ASP.NET application)

If so, it could be that the cached version of the ASP classic page is still referencing the old ASP.NET application, which it can't find any more because it's been updated. If so, all you'd have to update the ASP classic whenever you update the ASP.NET application.
Oct 15 '09 #30
9,735 Expert Mod 8TB
Stefbek97, have you considered updating the ASP classic page to .NET?
I think this would probably get solve your problem and prevent future headaches....

Oct 16 '09 #31

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Baldy | last post: by
2 posts views Thread by Michael Kalika | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.