views:

808

answers:

3

Hi,

Is there are some ability to disable .net 3.5 on IIS 6 for asp.net site? I just have an application (.net 2.0) that has not working on server with .net 3.5, is throw :

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Thanks in advance.

+2  A: 

Please post the complete exception. Also, is the failing application a .NET 3.5 application? There is no "disable" in IIS because .NET 3.5 uses the .NET 2.0 CLR, just like .NET 2.0 and 3.0 did. .NET 3.5 does install service packs.

John Saunders
Have added detailed info about exception. This application written with .net 2.0, is AspDotNetStorefront site.
iburlakov
Actually, thanks, but I didn't want it pretty-printed.
John Saunders
+1  A: 

You shouldn't have to "disable" anything. Your application should still be running in a v2.0 AppPool.

Scott Hanselman's blog post How to set an IIS Application or AppPool to use ASP.NET 3.5 rather than 2.0 is sort of the reverse of what you're asking, but it should help explain the situation more clearly.

In particular:

[web.config is] where your web site is told what version of the compiler to use, and the new supporting libraries.

This is where you tell ASP.NET to use .NET 3.5, not in IIS. IIS AppPools know about CLR versions, not Framework and compiler versions, those are set by the application.

So your application is still running on the .NET 2.0 CLR, even if you have .NET 3.5 installed.

Grant Wagner
A: 

Hi there.

Not sure if this any use for you, but I think you can declare the required runtime for your site in the web.config file. Check out this blog post. By specifically declaring which version of the .NET framework you want your site to use, it might help.

<configuration> 
    <startup> 
         <requiredRuntime version="v2.0.5027"/> 
    </startup> 
</configuration>

Cheers. Jas.

Jason Evans
It works only in winforms.
iburlakov