Temporary ASP.NET Files Corruption

C

Chuck

Sometime these files are not getting replaced after we do a deployment using
a webdeployment project.
We get miscellaneous errors unrelated to anything. Can't find dll, can't
find ajax stuff etc. If we delete the directory, then the site will work
again.

Is their anyway to prevent this from happening.
 
T

Thomas Sun [MSFT]

Hi,

This is Thomas Sun from MSDN managed newsgroup. I will assist you with this
case.

From your description, I understand that you got some error messages
related to "Temporary ASP.NET Files" after you tried to use Web Deployment
project to deploy ASP.NET website sometime, and these issues were resolved
after deleting "Temporary ASP.NET Files" folder. If I have misunderstood
you, please feel free to let me know.

The "%SystemRoot%\Microsoft.NET\Framework\versionNumber\Temporary ASP.NET
Files" is default folder where the compiler creates assemblies for all
executable output and places them for ASP.NET dynamic compilation. When
the request arrives, ASP.NET will load assembly from this location. For
more information about understanding ASP.NET Dynamic Compilation, see
http://msdn.microsoft.com/en-us/library/ms366723(VS.80).aspx

Web Deployment project just takes an existing ASP.NET website as input and
generates a precompiled website as output. When we build Web Deployment
project, the new version compiled website will be created in "Temporary
ASP.NET Files" folder too.

In this case, the error message is from which version: the one deployed
using Web Deployment project or the one running from Visual Studio.

To better understand your issue, please also post the exact error message
here or the reproduce steps if possible.

I look forward to hearing from you.


--
Best Regards,
Thomas Sun

Microsoft Online Partner Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

With newsgroups, MSDN subscribers enjoy unlimited, free support as opposed
to the limited number of phone-based technical support incidents. Complex
issues or server-down situations are not recommended for the newsgroups.
Issues of this nature are best handled working with a Microsoft Support
Engineer using one of your phone-based incidents.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
C

Chuck

The errors are somewhat random but usually involve some sort of missing dll.

Could not load type 'Perform.dcPerforMDataContext' or can not find version
3.01.2.0 of the dll.

I don't think the error messages have any thing to do with the problem.
What they show is that the asp.net process is trying to use the cached
files, not the ones that were changed and redeployed.

The problem remains is I can not reliably do an automated deployment because
IIS is using out of date cached files.
 
T

Thomas Sun [MSFT]

Hi Chuck,

Thanks for your response. Your information is helpful. Base on my
experience, the issue has nothing to do with your ASP.NET application.

To troubleshoot such issue, we need to confirm the following information:

#1. What version .Net Framework you are using? Please make sure your .Net
Framework has latest service package, special the FIX on
http://support.microsoft.com/kb/934839

#2. Please set the batch attribute to false of compilation Element in
web.config. This will enforce ASP.NET to compile individual files into
separate assemblies dynamically to avoid reference issue.
=============
<system.web>
<compilation debug="false" batch="false"></compilation>
</system.web>
=============
For more information about batch attribute, see
http://msdn.microsoft.com/en-us/library/s10awwz0(VS.80).aspx

#3. Sometimes, anti-virus software can affect the file generated in that
location. For instance, it updates or removes the file from "Temporary
ASP.NET Files" folder. So if there is such program on your server, you can
try to configure anti-virus software to eliminate the possibility that
anti-virus software causes the problem. For security, please pay more
attention on it.

I will continue doing test locally and inform you if I find more things on
this issue. You also can send me a simplified package that can repro the
error on your machine. My email is (e-mail address removed).

I look forward to receiving your test results.



--
Best Regards,
Thomas Sun

Microsoft Online Partner Support


This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
C

Chuck

The framework we have installed is 2.0.50727 and 3.5 sp1
The 64bit versions.

We use WebDeployment projects, so I think the debug="false" and the
batch="false" statements in the web.config are ignored.

In the WebDeployment project their is a switch for "Allow this precompiled
site to be updateable". This option specifies that all program code is
compiled into assemblies, but that .aspx files (including single-file ASP.NET
Web pages) are copied as-is to the target folder. Enables ASP.NET Web pages
and user controls (.aspx and .ascx files) to be updated after compilation;
only the code-behind files are compiled. If this option is not checked, the
HTML markup for pages and controls is removed and compiled into the assembly
output.

For performance reasons, we also set the Output Assemblies option to:
"Merge all outputs to a single assembly"
 
T

Thomas Sun [MSFT]

Hi Chuck,

Do you select this option "Allow this precompiled site to be updateable"
while precompiling? If it is enabled, ASP.NET will perform further
compilation when the site runs the first time.

In this case, if we don't need to change the layout of page on server, I
recommend you un-select that option. If we do so, ASP.NET won't perform
compilation again on server.

I am configuring the environment closing to yours and want to see whether I
can repro the issue. If you have time, could you please send me a
simplified package that can repro it on your machine? My email address is
(e-mail address removed).


--
Best Regards,
Thomas Sun

Microsoft Online Partner Support


->
 
T

Thomas Sun [MSFT]

Hi Chuck,

I tried to install that hotfix and also could not install it. I got the
error "The upgrade patch cannot be installed by the windows installer
service because the program to be upgraded may be missing, or the upgrade
patch may update a different version of the program. Verify that the
program to be upgraded exists on your computer and that you have the
correct upgrade patch.".

Based on the assembly version number mentioned on KB(
http://support.microsoft.com/kb/934839), I check the version of assembly
that hotfix will update and the version number is higher on my machine. As
far as I know, the hotfix has been applied so that I cannot install it.

The project structure, such as the circular reference in pages, can cause
the issue. So could you please send me a simplified package?

I look forward to hearing from you.


--
Best Regards,
Thomas Sun

Microsoft Online Partner Support



--------------------
 
T

Thomas Sun [MSFT]

Hi Chuck,

How are things going? I would appreciate it if you could post here to let
me know the status of the issue.

I created test ASP.NET website using Visual Studio 2008 on Window Server
2008 64bit and used Web Deployment project to deploy it with the same
option as yours. But I could not repro the issue even though I tested it
many times. So could you please send me a simplified package? Then I can
test it on local and to see whether there is any clue.

I am happy to be of assistance and look forward to hearing from you.
 
C

Chuck

Problem continues intermittently.
I imagine it is a problem with IIS not releasing access to the files because
some thread is still executing against them.
 
T

Thomas Sun [MSFT]

Hi Chuck,

First of all, I am sorry for late response.

Did you use Web Deployment project's "Create an IIS virtual directory for
the output folder" and "Replace the existing virtual directory" options to
deploy ASP.NET project automatically on IIS while we built Web Deployment
project?

If so, to work around the issue, we can use AfterBuild target of Web
Deployment project to delete your project folder under Temporary ASP.NET
Files folder. For example, we add AfterBuild target in the Web Deployment
project file:
========================
<Target Name="AfterBuild">
<RemoveDir Directories="the directory of your website under Temporary
ASP.NET Files" ></RemoveDir>
</Target>
=======================

For more information about AfterBuild target, see
http://msdn.microsoft.com/en-us/library/aa479568.aspx (Especially in
Customizing Web Deployment Projects).

To confirm whether the assembly is used by another process, we can use
Process Explorer to monitor it. For more information about Process
Explorer, please refer to
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx

It would be better that you can send me a simplified package and the step
that can repro the
error on your machine. My email is (e-mail address removed).


I look forward to hearing from you.


--
Best Regards,
Thomas Sun

Microsoft Online Partner Support

--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top