On my Win XP machine with IIS 5.1 machine I'm experiencing problems with an application that has to move from one server to another. I have isolated the the problem to the following VBSCRIPT page on http://localhost:90/testrequest.asp (the test website is
on port 90):
<%@ LANGUAGE="VBSCRIPT" LCID="1033"%>
<%
Set WebRequest = CreateObject("MSXML2.XMLHTTP")
The page is trying to open another (valid) page on the localhost server, but it looks like it cannot handle another thread correctly. The page keeps on loading without response. If I use an external URL like http://forums.iis.net/, it works.
Could this be a setting in IIS to prevent recursive HTTP requests or something? I have spent quite some time searching for information on this, but I couldn't find a solution.
Maybe some extra information in case this might trigger a response: I have tried the same set up on a W2K3 machine running IIS 6 and ASP 1.1, which resulted in the same problem. After I upgraded to ASP 2.0 however, this construction did work. Then a new challenge
presented itself. Because of the webgarden worker process setting in the ApplicationPools settings higher than 1, cookie handling was frustrated (randomly lost sessions). The solution offered by a couple of forums is to lower these worker processes in the
webgarden to 1, but this directly brought up the original problem with the internal HTTP Request again. Does this behaviour make sense and could these problems be fixed with a different configuration? Fixing the W2K3 problem being the most important.
Finally found the solution for this problem. The debugging settings in the Application Configuration ('enable ASP server-side script debugging' and 'enable ASP client-side script debugging') were enabled, which resulted in this construction not working...
Marked as answer by tomkmvp on Jan 14, 2010 03:09 PM
The above code i am callling from event handler from aspx.cs pages and i have placed the vb script into the desire folder. when i am running from asp.net dev env it is working fine. but problem is when I am publishing
through IIS 5.1 it is not working. it is seems to hanged it is not doing the necessary action. I have tested for simple vb script also it also hanged so please any one suggest me that it will work in IIS 5.1 or not.. thanks in advacned...
TakeRoes
4 Posts
IIS 5.1 and VBscript local HTTP request issue
Jan 06, 2010 10:31 AM|LINK
Dear all,
On my Win XP machine with IIS 5.1 machine I'm experiencing problems with an application that has to move from one server to another. I have isolated the the problem to the following VBSCRIPT page on http://localhost:90/testrequest.asp (the test website is on port 90):
<%@ LANGUAGE="VBSCRIPT" LCID="1033"%>
<%
Set WebRequest = CreateObject("MSXML2.XMLHTTP")
Call WebRequest.Open("GET", "http://localhost:90", False)
Call WebRequest.Send()
Response.Write(WebRequest.responseText)
Response.Flush
Set WebRequest = nothing
%>
The page is trying to open another (valid) page on the localhost server, but it looks like it cannot handle another thread correctly. The page keeps on loading without response. If I use an external URL like http://forums.iis.net/, it works.
Could this be a setting in IIS to prevent recursive HTTP requests or something? I have spent quite some time searching for information on this, but I couldn't find a solution.
Thank you for your assistance.
Kind regards,
Take Roes
tomkmvp
7657 Posts
MVP
Moderator
Re: IIS 5.1 and VBscript local HTTP request issue
Jan 06, 2010 11:58 AM|LINK
Not sure why that wouldn't work, but try this technique instead. You should be using the ServerXMLHTTP object in ASP code ...
http://classicasp.aspfaq.com/general/how-do-i-read-the-contents-of-a-remote-web-page.html
http://mvp.support.microsoft.com/
TakeRoes
4 Posts
Re: IIS 5.1 and VBscript local HTTP request issue
Jan 06, 2010 12:10 PM|LINK
Thank you for response, but unfortunately it doesn't help.
The request/page still seems to 'hang'. A restart of IIS is needed as well, because it completely doesn't respond anymore.
TakeRoes
4 Posts
Re: IIS 5.1 and VBscript local HTTP request issue
Jan 12, 2010 05:03 PM|LINK
TakeRoes
4 Posts
Re: IIS 5.1 and VBscript local HTTP request issue
Jan 14, 2010 12:48 PM|LINK
Finally found the solution for this problem. The debugging settings in the Application Configuration ('enable ASP server-side script debugging' and 'enable ASP client-side script debugging') were enabled, which resulted in this construction not working...
anup.ghosh
2 Posts
Re: IIS 5.1 and VBscript local HTTP request issue
Dec 07, 2012 05:11 AM|LINK
Process
p = new Process();
log.Info(
"WorkingDirectory Searching Strat");
p.StartInfo.WorkingDirectory =
AppDomain.CurrentDomain.BaseDirectory;
log.Info(
"Got it WorkingDirectory");
p.StartInfo.FileName =
"C:\\ODE_RDE_NEW\\download_cust_sch.vbs";
log.Info(
"Prepairing Arg List");
p.StartInfo.Arguments = Session.SessionID +
" " + dssServerName + " " + dscDatabaseName.Replace("tnw", "dsc") + " " + version;
log.Info(
" Printing Arg List " + p.StartInfo.Arguments);
p.StartInfo.UseShellExecute =
true;
p.StartInfo.WindowStyle =
ProcessWindowStyle.Hidden;
log.Info(
"Fetch Process Started");
p.Start();
log.Info(
"Waiting for Process to be Finished");
p.WaitForExit();
log.Info(
"WaitForExit Process Finished");
The above code i am callling from event handler from aspx.cs pages and i have placed the vb script into the desire folder. when i am running from asp.net dev env it is working fine. but problem is when I am publishing through IIS 5.1 it is not working. it is seems to hanged it is not doing the necessary action. I have tested for simple vb script also it also hanged so please any one suggest me that it will work in IIS 5.1 or not.. thanks in advacned...
Anup Ghosh