English 中文(简体)
1. 具有XMLHTTP要求的古典社会伙伴关系错误
原标题:Classic ASP error with XMLHTTP request

I m 运行经典的ASP, 和ASP.net 4.0 , 载于 IIS 7.5。

在我的传统协会法典中,该法典是:

  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

正在向一个ASP.net LMX手递发送请求。 运行时间很长,最后发出错误信息:

msxml3.dll差错 800c0008

具体资源的下载失败了。

页: 1

我检查了它所投的并存在和正在运行的URL。 所发送的数据也是正确的。

在我新安装的Windows 7之前,它正在做罚款。 既然重新安插了它,并且再次设立了国际独立调查局,那么这一法典的范围就失败了,导致我感到宽慰,这是许可/身份错误。

谁能告诉我,这怎么可能? 我有3个后备库:

ASP.net v4.0 (Integrated) (ApplicationPoolIdentity)
ASP.net v4.0 Classic (Classic) (ApplicationPoolIdentity)
DefaultAppPool (Integrated) (NetworkService)

感谢任何帮助!

Edit:我发现这一错误:

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:inetpubwwwrootScirraNew 
    Machine name: TOM-PC 

Process information: 
    Process ID: 7980 
    Process name: w3wp.exe 
    Account name: NT AUTHORITYNETWORK 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:inetpubwwwrootScirraNewHandlersforumalerts.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 AUTHORITYNETWORK SERVICE 

Thread information: 
    Thread ID: 39 
    Thread account name: NT AUTHORITYNETWORK 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:inetpubwwwrootScirraNewHandlersforumalerts.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: 

第13条是第一项请求。 形式:

int TopicID = int.Parse(context.Request.Form["topicID"]);
问题回答

第一步是停止使用<代码>Microsoft。 XMLHTTP,在服务基础情况下,你不应使用。 而是使用设计用于服务的<代码>XML2.ServerXMLHTTP.3.0。

另外,如果贴出的ash子在寄出的协会申请中重新贴出,那么便会出现可怕的饥.问题,即<代码>Gaby。 通常,在使用较轻的场所,你可以放弃。 然而,如果你能够根据申请进行行乞,那么,要求重新申请加入协会的申请将肯定会消失。 说明这一点不适用于简单的“卫生设备”方案。

如果问题持续存在(可能的话),那么:

  • install a copy of fiddler on your machine.
  • Fire up Fiddler
  • In a Command Prompt enter >netsh
  • The issue the command >winhttp set proxy 127.0.0.1:8888
  • Attempt to use your ASP page, you should see the POST captured by fiddler
  • Restore the winhttp proxy settings with >winhttp reset proxy

现在审查《残疾人行动计划》的要求/回应,这可能暴露出一些真实问题所在之处。

I m new one in ASP norm.

但是,请求的网页可能发送对第一页的答复,等待接收,第一页没有接收,因此出现错误。

在<代码>objHttp.Send之后使用:

objHttp.ResponseText

Ooh, 刚刚发现这一行中的可能错误:

objHttp. open “POST”, strSiteRoot & “handlers/forumalerts.ashx?”

Try use the string “handlers/forumalerts.ashx? without "?” in the end.

I have replace : Server.CreateObject("MSXML2.XMLHTTP") by Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")

因此,错误从未再次出现。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!