Umbraco interfering with Classic ASP page's Request.Form? Error 0x80004005...
OK, this can only be recreated in a very special way:
What we have: We have some classic ASP pages hosted on the same site as an Umbraco 4.7 running on IIS 7.5 in integrated mode. Everything works great! Except...
Overview of problem: Once every blue moon, we notice a report of an error 80004005 on one of our classic ASP pages in a very strange place (we have this same script running on maybe 70 other sites with no problem, although only 2 or 3 of these are Umbraco sites).
It turns out that our classic ASP page errors while trying to access the Request.Form collection in the very narrow window of time between the app pool recycling and the first Umbraco page being served. (This really isn't that ucommon since we have a sidebar widget appearing on regular umbraco pages, but that do an Ajax post to a classic ASP resource. So if the site is not very busy, and you leave the page up for some time then come back and post, you get the error.)
We are now able to recreate this problem consistently by taking the following steps:
Create this VERY simple "hello.asp" page as follows:
<html>
<body>
<h1>Hello!</h1>
<%
If Request.Form("name") <> "" Then
Response.Write "<p>Nice to meet you!</p>"
End If
%>
<form method="post">
Your Name : <input type="text" name="name" />
<input type="submit" />
</form>
</body>
</html>
Now, go ahead and upload this and surf to the page and test it to make sure it works. (It should. You may need to tell Umbraco to ignore this reserved file/path/whatever, so make sure you get it working.)
BUT! Go ahead and restart the app pool (e.g., by re-uploading the web.config file) and NOW try to post that form. (Do this immediately after restarting it, before you load anything from Umbraco). What we are seeing is an error on the line where we check Request.Form, error 0x80004005. If we pull up an umbraco page (for it to start up I guess) and then test the ASP page again, it works as expected again.
Searching the web for this error code points in lots of wrong directions. This is happening on a pretty stock install of Umbraco, so we are now looking at what the magic missing step is when Umbraco starts up that our classic ASP needs to be able to read Requst.Form normally? Searching this very forum in fact turns up nothing for this error code so I'm kind of lost at the moment. Any insight or tips on where to look next would be greatly appreciated!
One other thing to add: we tried changing the app pool from Integrated to Classic mode, which makes the classic ASP problem go away (yay!), but unfortunately now the Umbraco site doesn't work and we just get blank pages (boooo!!).
I need to do more research it seems on (A) how much impact classic vs. integrated pipeline mode might have on a reasonably-busy site, and (B) if choosing this as our "solution", how to make Umbraco work again under this mode. Probably something in the web.config I would need to change?
Are the asp app and Umbraco in the same IIS site? If so, you can tell Umbraco to ignore the directory that the asp app is in by adding it into the "umbracoReservedPaths" setting in web.config.
Yes, we do have this in the "umbracoReservedPaths". As I said, though... the page works fine 99% of the time, so this isn't the problem. The problem is specifically only encountered in the scenario I described above.
Umbraco interfering with Classic ASP page's Request.Form? Error 0x80004005...
OK, this can only be recreated in a very special way:
What we have: We have some classic ASP pages hosted on the same site as an Umbraco 4.7 running on IIS 7.5 in integrated mode. Everything works great! Except...
Overview of problem: Once every blue moon, we notice a report of an error 80004005 on one of our classic ASP pages in a very strange place (we have this same script running on maybe 70 other sites with no problem, although only 2 or 3 of these are Umbraco sites).
It turns out that our classic ASP page errors while trying to access the Request.Form collection in the very narrow window of time between the app pool recycling and the first Umbraco page being served. (This really isn't that ucommon since we have a sidebar widget appearing on regular umbraco pages, but that do an Ajax post to a classic ASP resource. So if the site is not very busy, and you leave the page up for some time then come back and post, you get the error.)
We are now able to recreate this problem consistently by taking the following steps:
Create this VERY simple "hello.asp" page as follows:
Now, go ahead and upload this and surf to the page and test it to make sure it works. (It should. You may need to tell Umbraco to ignore this reserved file/path/whatever, so make sure you get it working.)
BUT! Go ahead and restart the app pool (e.g., by re-uploading the web.config file) and NOW try to post that form. (Do this immediately after restarting it, before you load anything from Umbraco). What we are seeing is an error on the line where we check Request.Form, error 0x80004005. If we pull up an umbraco page (for it to start up I guess) and then test the ASP page again, it works as expected again.
Searching the web for this error code points in lots of wrong directions. This is happening on a pretty stock install of Umbraco, so we are now looking at what the magic missing step is when Umbraco starts up that our classic ASP needs to be able to read Requst.Form normally? Searching this very forum in fact turns up nothing for this error code so I'm kind of lost at the moment. Any insight or tips on where to look next would be greatly appreciated!
Thank you!
One other thing to add: we tried changing the app pool from Integrated to Classic mode, which makes the classic ASP problem go away (yay!), but unfortunately now the Umbraco site doesn't work and we just get blank pages (boooo!!).
I need to do more research it seems on (A) how much impact classic vs. integrated pipeline mode might have on a reasonably-busy site, and (B) if choosing this as our "solution", how to make Umbraco work again under this mode. Probably something in the web.config I would need to change?
Thanks again!
Hi,
Are the asp app and Umbraco in the same IIS site? If so, you can tell Umbraco to ignore the directory that the asp app is in by adding it into the "umbracoReservedPaths" setting in web.config.
hth
/j
Hello, thank you for your reply.
Yes, we do have this in the "umbracoReservedPaths". As I said, though... the page works fine 99% of the time, so this isn't the problem. The problem is specifically only encountered in the scenario I described above.
Thank you!
is working on a reply...