我有一个可怕的时间,试图通过HTTP上传文件(文件的大小无关紧要)find错误的原因到Windows 2012 R2要点( IIS 8.5 )的networking服务器。
该应用程序完美运行在Windows 2003( IIS 6 )上。 它也运行在运行IIS 7.5的 Windows 7开发PC上
由于IIS 7.5的IISpipe理器与IIS 8.5非常相似,所以在configuration我的ISAPI Web应用程序时没有什么困难,但是除了file upload以外,其他所有function都可以正常工作。
我首先testing了基本的东西:
其他的事情,我试过了:
当一个大file upload到networking服务器,我看到w3wp.exe(32位进程)消耗CPU作为file upload。 问题是,在我的任何应用程序代码甚至有机会使用上传之前 , 错误发生 。 例如:
// handle any HTTP POST if (strcmp(spContext->GetRequestMethod(), "POST") == 0) { // what was posted? if (form == FILE_UPLOADED) { // A file has been uploaded. Check it to make sure it is // not corrupt and do what I need to do with it. … // I then prepare a JSON response: m_HttpResponse.SetContentType("application/json; charset=UTF-8"); … // Now send a reply to the client browser letting it know that the // file was either successfully / unsuccessfully handled …
我猜测它必须是IIS 8.5configuration问题,因为这个问题不会发生在IIS 7.5或IIS 6中。
有人可以给我一些关于可能发生的事情的想法吗? 谢谢!
UPDATE
Peter Hahndorfbuild议我使用跟踪function,以便启用它,这是“请求摘要”:
Url http://www.fileuploads.tst:80/FileUpload.srf App Pool DefaultAppPool_classic Authentication anonymous User from token NT AUTHORITY\IUSR Activity ID {8000000F-0001-F800-B63F-84710C7967BB} Site 8 Process 4652 Failure Reason STATUS_CODE Trigger Status 500 Final Status 500 Time Taken 0 msec
错误和警告Severtity警告
Event MODULE_SET_RESPONSE_ERROR_STATUS ModuleName IsapiModule Notification EXECUTE_REQUEST_HANDLER HttpStatus 500 HttpReason Internal Server Error HttpSubStatus 0 ErrorCode The operation completed successfully. (0x0) ConfigExceptionInfo this field is empty...nothing to display
经过一个星期的疯狂,我终于find了问题的根源,原来是硬盘。 这是偶尔点击声音,但我认为这不会是一个问题,因为我只是评估Windows 2012。
毕竟,Windows已经正确加载,唯一明显的问题是偶尔的启动失败,但一旦服务器运行,除了我的应用程序的file uploadfunction,一切似乎运行平稳。
一旦硬盘被更换,问题就消失了。 上传任何文件时没有更多的内部服务器错误!