.NET 4.0 Web Service Hosting in IIS 6

I am trying to host a second website (outside the default website that is already in use), which is a web service supported by .NET 4. This is IIS 6.

The default webpage uses .NET 2.0. In IIS 6, you can have two separate websites running different versions of .NET by creating two different application pools. I have done it.

However, I ran into a common problem when the ASP.NET tab is not displayed in IIS. On this tab, you can specify which version of .NET the site uses.

My workaround is to change the version of .NET that each site links through the command line:

aspnet_regiis -s (site path) 

Another solution to this problem is to switch IIS to 64-bit mode, which causes the ASP.NET tab to actually display. The problem is that switching IIS to 64-bit does not allow well with an existing website even after reconfiguring IIS to link to the following directory,

Microsoft.NET/Framework64

Unlike

Microsoft.NET/Framework

Does anyone have experience hosting separate pages on a single server? A nightmare. I can make the second page work, but the original page does not work by default, and vice versa.

Now I have IIS in 32-bit mode and the following from the cmd line is executed:

 C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319>aspnet_regiis -lk W3SVC/ 2.0.50727.3053 W3SVC/1/ROOT/ 2.0.50727.3053 W3SVC/87257621/root/ 4.0.30319.1 

Which clearly shows that my second site (which has ID 8725721) is installed for .NET 4, while the source set (ID 1) is installed for .NET 2. They are in separate application pools.

The source site is running in this configuration. On the new site, I can browse the directory, but the .asmx page generates a 404 error.

I got the .asmx page for the intended purpose when I turned on IIS for 64-bit mode, but then the default website provided the general "Unavailable Service" error because .NET was installed from the Framework path and not the Framework64 path. However, even after switching to the Framework64 path from the default page, more errors appeared.

In addition, before changing the target structure of the Im site trying to migrate to .NET 4, this error appears in the event viewer:

Failed to initialize AppDomain: / LM / W3SVC / 87257621 / Root

Exception: System.IO.FileLoadException

Message: Could not load file or assembly "System.Web, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a" or one of its dependencies. Access is denied.

+4
source share
1 answer

In web service extensions in IIS, is ASP.NET 4.0 allowed installed enabled?

+4
source

Source: https://habr.com/ru/post/1339118/


All Articles