-1

I am currently trying to migrate some websites from IIS6 to IIS7 and have run into a problem.

For the most part, my websites are written in Classic ASP. However, within one website I have two web applications running asp.net. Something like this

www.mywebsite1.com - Classic ASP
www.mywebsite2.com - Classic ASP
www.mywebsite2.com/MyAspDotNetApplication1 - ASP.NET 4.0
www.mywebsite2.com/SubDirectory/MyAspDotNetApplication2 - ASP.NET 4.0
www.mywebsite3.com - Classic ASP
...

When I browse the sites hosting Classic ASP pages I have no problems. If I access one of the ASP.NET web application everything is ok. If I then access the second ASP.NET web application things start going wrong I get errors on the ASP.NET application pages along the lines of

Failed to start monitoring changes to '\FileServer1\web\mywebsite2\MyAspDotNetApplication1\App_Browsers' because the network BIOS command limit has been reached. For more information on this error, please refer to Microsoft knowledge base article 810886. Hosting on a UNC share is not supported for the Windows XP Platform.`

When I try to access the Classic ASP web pages I get the following error

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid
Module  IIS Web Core
Notification    BeginRequest
Handler Not yet determined
Config Error    
Config File
Requested URL   http://www.mywebsite2.com:80/myvirtualdirectory1/
Physical Path   \\FileServer1\web\mywebsite2\myvirtualdirectory1\
Logon Method    Not yet determined
Logon User  Not yet determined

When I open up IIS manager and take a look at one of the sites or virtual directories where the error is occurring I get the following error

Filename: \\?\FileServer1\mywebsite2\web.config
Error: Cannot read configuration file

The problems I am having is similar to this other question but I have removed all Web.config files from all my sites (excluding the ASP.NET applications) and I still get the error.

This worked fine on IIS6.

Any ideas?

Setup

Hardware

  • Two web servers (Web1 and Web2) running Windows Server 2008
  • One file server (FileServer1) running Windows 2003 (don't know if that makes a difference)

IIS

  • 10 Classic ASP websites running in their own application pools. These websites all have lots of virtual directories pointing to locations on the file server
  • 20 websites that simply redirect to one of the 10 websites above
  • 2 ASP.NET applications that sit inside of one of the Classic ASP sites
  • The Classic ASP sites each have their own Application Pool which runs under a custom user account MYDOMAIN\MyIISUser
  • The ASP.NET applications also have their own Application Pools and are configured to run under the custom user account MYDOMAIN\MyIISUser
  • The 20 redirection websites run under a single Application Pool.
  • The websites are set up to use shared configuration. The configuration files are stored locally on each web server and are synchronized using DFS (I tried putting it on the FileServer1 but ran into the same problem as above, moving it to the web servers local file system solved the issue - This may be important?).

File Server

  • All web content is stored on the file server under C:\Web. This is set up as a UNC drive accessible from the network via the address \\FileServer1\Web
  • I have set the permissions on C:\Web to allow Read access for the MYDOMAIN\MyIISUser
  • I have been told that the web content must be stored on the network drive rather than have local copies and using DFS
Community
  • 1
  • 1
Kevin Brydon
  • 12,524
  • 8
  • 46
  • 76
  • Offer a bounty when you can. Don't promise things at the top of the post. – Oded Jan 10 '13 at 10:16
  • @Oded But I really will award 200 of my reputation if I get the solution. It is important to me that this is fixed. – Kevin Brydon Jan 10 '13 at 10:17
  • Fine. Do that when you can - that's what the bounties are for. But **wait** till you can. See [this](http://meta.stackexchange.com/questions/141266/can-i-offer-a-bounty-in-the-body-of-a-question/141274#141274) meta discussion on the topic. – Oded Jan 10 '13 at 10:21
  • As for the question - in IIS, is the `aspnet` ISAPI module enabled for the classic ASP sites as well? – Oded Jan 10 '13 at 10:25
  • @Oded Ah. This may be the issue. In the ISAPI filters I have ASP.NET_2.0.50727.0, ASP.NET_2.0.50727-64 and Shibboleth. I am running my web applications as .NET 4 – Kevin Brydon Jan 10 '13 at 10:28
  • There you go. You need the classic ASP ISAPI filter installed, enabled and the .NET ones disabled for your classic ASP sites. – Oded Jan 10 '13 at 10:30
  • @Oded and in the ISAPI and CGI restrictions I have asp.net v4.... as Not allowed – Kevin Brydon Jan 10 '13 at 10:31
  • OK. That should be fine. – Oded Jan 10 '13 at 10:31
  • @Oded Could you post this as an answer so it can be edited with a step by step guide etc. – Kevin Brydon Jan 10 '13 at 10:33
  • Posted a bare-bones answer - by all means, add a step by step to it. – Oded Jan 10 '13 at 10:36

2 Answers2

1

It sounds like your ISAPI modules are not configured correctly on your classic ASP sites.

All .NET ISAPI filters should be disabled/disallowed and the classic ASP filter should be enabled.

Oded
  • 489,969
  • 99
  • 883
  • 1,009
  • Ok. So in IIS Manager I go into the `ISAPI and CGI Restrictions` feature and disable all ASP.NET extensions. Then I go into the `ISAPI Filters` feature and remove the ASP.NET_2... filters? What effect will this have on my ASP.NET applications within the Classic ASP sites? – Kevin Brydon Jan 10 '13 at 10:46
  • I've done what you have suggested (at server level disables all ASP.NET extensions and removed ASP.NET filters) but I still have the same problem. – Kevin Brydon Jan 10 '13 at 11:00
  • 1
    @Kevin - do you have [classic ASP installed](http://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/classic-asp-not-installed-by-default-on-iis) on the server? – Oded Jan 10 '13 at 11:09
  • yes, In the Application Development role services I have ASP.NET, .NET Extensibility, ASP, CGI, ISAPI Extensions, ISAPI Filters and Server Side Includes. Everything really. – Kevin Brydon Jan 10 '13 at 11:29
  • 1
    @Keving - Make sure Active Server Pages (system32\inetsrv\asp.dll) is allowed in the restriction section. – Oded Jan 10 '13 at 11:30
  • I have checked and it is definitely allowed. (appreciate your help so far) – Kevin Brydon Jan 10 '13 at 11:39
  • 1
    @Kevin - Have you rebooted at all? Restarted IIS? – Oded Jan 10 '13 at 11:41
  • Indeed I have. Restarted IIS. Rebooted the server too. Should my ASP.NET applications be working if I've disabled the extension? – Kevin Brydon Jan 10 '13 at 11:50
  • 1
    @Kevin - Make sure the application pools for the classic ASP sites are running in 32bit mode. – Oded Jan 10 '13 at 11:51
  • With regard App Pools. All App Pools are running in 32 bit mode. The Classic ASP sites have their `Managed Pipeline Mode` set to `Classic` and `Load User Profile` set to `False`. The .NET applications have their `Managed Pipeline Mode` set to `Integrated`. and `Load User Profile` set to `True`. Could the user profile be the issue? – Kevin Brydon Jan 10 '13 at 11:57
  • @Kevin - Not sure about that. Don't think so. Still the same error? – Oded Jan 10 '13 at 12:08
  • Yeah, still the same error. Might be something to do with reading from a network drive? As I mentioned in my question I was having the same problem with the shared configuration until I moved it locally. I've been advised that it is best practice to have web content on a network share. – Kevin Brydon Jan 10 '13 at 12:31
  • 1
    @Kevin - Whose advice? It is the first time I hear that. What happens when you move the content locally? – Oded Jan 10 '13 at 12:39
  • From the network administrators in my company who said its Microsoft best practice and was checked and approved by a Microsoft MVP. Could this be wrong? I haven't tried moving the content locally as this is not an option available to me (unless the MVP advice is incorrect for IIS7.5 which then it would be an option). – Kevin Brydon Jan 10 '13 at 12:45
  • 1
    @Kevin - I am not aware of this being "best practice", though it really depends on the context. But we are currently trying to eliminate all possible issues, so if you can try to run locally, see what happens. – Oded Jan 10 '13 at 12:47
  • Ok, I will try running locally. The web content is massive so it may be a few hours to get it all set up and tested. – Kevin Brydon Jan 10 '13 at 12:51
  • @Kevin - Instead of that, try to run a simple single page classic asp with something like a for loop outputting numbers to the page. We are just trying to get classic ASP to work to begin with. – Oded Jan 10 '13 at 12:52
  • Classic ASP definitely works. I've set up a test page anyway just to confirm (a for loop that outputs the numbers 1 to 5). Problems only appear when the .NET applications are used. – Kevin Brydon Jan 10 '13 at 13:01
  • 1
    @Kevin - Check the application pool settings and ensure that the different websites each have a different application pool and that no application pool is used by both .NET and classic ASP sites. – Oded Jan 10 '13 at 13:03
  • this is definitely the case. All my application pools have a single application assigned ... apart from the redirects which are all assigned to the same app pool and never execute any code. – Kevin Brydon Jan 10 '13 at 13:08
  • 1
    @Kevin - To summarise. If you restart IIS, your classic ASP test page works. If you then browse to a .NET site, the test page no longer works, with the error you supplied? – Oded Jan 10 '13 at 13:10
  • Yes. When I restart IIS all my ASP pages work as normal as long as I stay away from the two .NET applications. When I request a page from the .NET application it usually loads fine. Then when I go back to the ASP pages some virtual directories fail and some work (seemingly random ones). Sometimes my .NET applications fail too. The only think I notice is that my classic ASP files in the root directory of the site (not the virtual directories) never fail, or at least I've never seen them fail. – Kevin Brydon Jan 10 '13 at 13:33
  • 1
    @Kevin - Are these web applications nested at all? Do they share a folder structure? – Oded Jan 10 '13 at 13:34
  • Yes. I mentioned in my question that I have a Classic ASP application with two nested ASP.NET applications. And they do share a folder structure. Oh, but they didn't in the IIS6 setup. – Kevin Brydon Jan 10 '13 at 13:39
  • 1
    @Kevin - I pretty much ran out of ideas. Make sure that the ISAPI filters for each web application (not site - application) are correct. – Oded Jan 10 '13 at 13:44
  • I appreciate you taking the time to help. Hopefully someone else may be able to spot something. – Kevin Brydon Jan 10 '13 at 13:49
  • Just to update. I moved all the files from the network file share to the web servers local disk (C:\Web). I cannot get the websites to fail any more. So I suspect there must be a problem between the UNC file share and the web server. – Kevin Brydon Jan 10 '13 at 16:47
  • @Kevin - Well, at least you have something to go on. It could be a flaky network, or compatibly issues between the server and network share software. – Oded Jan 10 '13 at 16:50
0

It turns out that there is something wrong with the the fileserver. What the problem is I don't know. After creating a new clustered Windows Server 2008 fileserver I have not been able to replicate the problem.

Kevin Brydon
  • 12,524
  • 8
  • 46
  • 76