asp.net – XMLHTTP请求的经典ASP错误
|
我在IIS 7.5上运行经典ASP和ASP.net 4.0. 在我的经典ASP代码是这段代码: ' 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 ASHX处理程序发送请求.运行时,它会在最终发送错误消息之前挂起很长时间:
我已经检查了它发布到的URL,它存在且正在运行.发送的数据也是正确的. 在我全新安装Windows 7之前,它运行良好.由于重新安装它,并再次设置IIS这段代码失败,让我相信它是一个权限/身份错误. 有谁能告诉我是什么原因造成的?我有3个应用程序池: ASP.net v4.0 (Integrated) (ApplicationPoolIdentity) ASP.net v4.0 Classic (Classic) (ApplicationPoolIdentity) DefaultAppPool (Integrated) (NetworkService) 谢谢你的帮助! 编辑:我在日志中发现了这个错误: 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,Boolean& completedSynchronously)
Custom event details:
第13行是第一个request.form: int TopicID = int.Parse(context.Request.Form["topicID"]); 解决方法如果我理解正确,您正在向与呼叫服务器相同的服务器发出请求.阅读http://support.microsoft.com/kb/316451
(编辑:台州站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- asp.net-mvc – ASP.net 5 MVC 6 bower.json和project.json
- asp.net – @ Url.Action在控制器中创建空值的参数之间添加
- asp.net – “2015年4月20日Google帐户的OpenID2已经消失”
- asp.net-mvc-2 – 在名称中使用连字符处理MVC2变量
- asp.net-mvc – 如果用户在int字段中放入非数字字符串,则自
- Asp.net(C#)读取数据库并生成JS文件制作首页图片切换效果(附
- ASP.NET Core 1.0 ConfigurationBuilder().AddJsonFile(“a
- asp.net – Javascript日期本地化
- 模型 – 视图 – 控制器 – ASP.NET WebForms vs MVC [VS20
- asp.net-mvc – 如何编辑表格数据(ASP MVC)
- asp.net – 小数点后尾数为零
- asp.net-mvc – Nhibernate / MVC:在View中处理
- 在IIS上部署ASP.NET Core项目的图文方法
- Asp.net配合easyui实现返回json数据实例
- asp.net – 在网站上放置广告的最佳做法?
- asp.net-mvc-4 – AngularJs,DropZone.Js,MVC4 –
- asp.net-mvc – ELMAH和SQL Server 2008 R2?
- asp.net – HttpWebRequest正在为404抛出异常
- asp.net – Azure可以运行WPF吗?
- asp.net – 在fileupload中选择立即调用C#函数文
