Print Page | Close Window

ASP XMLHTTP request fails

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=29917
Printed Date: 28 March 2026 at 10:35pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: ASP XMLHTTP request fails
Posted By: Gullanian
Subject: ASP XMLHTTP request fails
Date Posted: 30 October 2011 at 10:37pm

I'm running Classic ASP along with ASP.net 4.0 on IIS 7.5.

In my classic ASP code is this code:

    ' Process @ alerts
    Dim objHttp
    set objHttp = Server.CreateObject("Microsoft.XMLHTTP")

    objHttp.open "POST", strSiteRoot & "handlers/forumalerts.ashx?", false
    objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
    objHttp.Send "topicID=" & lngTopicID & "&threadID=" & lngLastPostID

    set objHttp = nothing

This is sending a request to an ASP.net ASHX handler. When it is run, it hangs for a long time before finally sending the error message:

msxml3.dll error '800c0008'
         



Replies:
Posted By: WebWiz-Bruce
Date Posted: 31 October 2011 at 9:08am
There are different versions of Microsoft's XMLHTTP Component.

Try one of the following and see if you have better luck:-

Server.CreateObject("MSXML2.XMLHTTP.3.0")
Server.CreateObject("MSXML2.ServerXMLHTTP")

I have seen times when changing the version of Microsoft's XMLHTTP fixes connection issues when using XMLHTTP .

Also check that the websites application pool is running in 32bit mode.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: Gullanian
Date Posted: 02 November 2011 at 2:56pm
Thanks for the help, still no joy though.  I've changed the app pools to enable 32 bit apps, and tried all the object types, and it throws a timeout error this time.

I'll have a lot through the logs and see if  I can find anything


Posted By: Gullanian
Date Posted: 02 November 2011 at 2:58pm
This is the .net error in the logs:

Event code: 3005 
Event message: An unhandled exception has occurred. 
Event time: 02/11/2011 14:55:42 
Event time (UTC): 02/11/2011 14:55:42 
Event ID: 4e550d910b934d2781707701f833e18e 
Event sequence: 39 
Event occurrence: 1 
Event detail code: 0 
 
Application information: 
    Application domain: /LM/W3SVC/1/ROOT-2-129647191892089824 
    Trust level: Full 
    Application Virtual Path: / 
    Application Path: C:\inetpub\wwwroot\ScirraNew\ 
    Machine name: TOM-PC 
 
Process information: 
    Process ID: 7980 
    Process name: w3wp.exe 
    Account name: NT AUTHORITY\NETWORK SERVICE 
 
Exception information: 
    Exception type: ArgumentNullException 
    Exception message: Value cannot be null.
Parameter name: String
   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.Int32.Parse(String s)
   at forumalerts.ProcessRequest(HttpContext context) in c:\inetpub\wwwroot\ScirraNew\Handlers\forumalerts.ashx:line 13
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

 
 
Request information: 
    Request URL: http://127.0.0.1/handlers/forumalerts.ashx 
    Request path: /handlers/forumalerts.ashx 
    User host address: 127.0.0.1 
    User:  
    Is authenticated: False 
    Authentication Type:  
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
 
Thread information: 
    Thread ID: 39 
    Thread account name: NT AUTHORITY\NETWORK SERVICE 
    Is impersonating: True 
    Stack trace:    at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
   at System.Int32.Parse(String s)
   at forumalerts.ProcessRequest(HttpContext context) in c:\inetpub\wwwroot\ScirraNew\Handlers\forumalerts.ashx:line 13
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 
 
Custom event details: 

Line 13 is the first of a series of request.forms:

    // Get various params
    int TopicID = int.Parse(context.Request.Form["topicID"]);
    int ThreadID = int.Parse(context.Request.Form["threadID"]);
    bool SecretOK = context.Request.Form["secret"].Trim() == "123";



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net