Tôi đang chạy ASP cổ điển cùng với ASP.net 4.0 trên IIS 7.5.Lỗi ASP cổ điển với yêu cầu XMLHTTP
Trong mã ASP cổ điển của tôi là mã này:
' 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
này đang gửi một yêu cầu đến một handler ASP.net ASHX. Khi nó chạy, nó được treo trong một thời gian dài trước khi cuối cùng gửi thông báo lỗi:
msxml3.dll lỗi '800c0008'
Tải xuống tài nguyên quy định đã thất bại.
/forum/new_post.asp, dòng 1036
Tôi đã kiểm tra URL nó gửi bài đến và nó tồn tại và đang hoạt động. Dữ liệu được gửi cũng chính xác.
Trước khi tôi cài đặt Windows 7 mới, nó hoạt động tốt. Kể từ khi cài đặt lại nó tươi, và thiết lập IIS một lần nữa bit này của mã không, dẫn tôi tin rằng nó là một quyền hạn/nhận dạng lỗi.
Có ai cho tôi biết điều gì có thể gây ra điều này không? Tôi có 3 hồ bơi ứng dụng:
ASP.net v4.0 (Integrated) (ApplicationPoolIdentity)
ASP.net v4.0 Classic (Classic) (ApplicationPoolIdentity)
DefaultAppPool (Integrated) (NetworkService)
Cảm ơn bạn đã trợ giúp!
Edit: Tôi tìm thấy lỗi này trong các bản ghi:
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:
dòng 13 là request.form đầu tiên:
int TopicID = int.Parse(context.Request.Form["topicID"]);
Điều gì xảy ra khi bạn gửi yêu cầu từ phía khách hàng, ví dụ: sử dụng jQuery? Ngoài ra, điều gì xảy ra khi bạn gửi yêu cầu GET thay vì yêu cầu POST? –