File Uploads Not Working When Deployed To Server

北城以北 提交于 2019-12-08 03:15:18

问题


I recently embarked on the endeavor of creating my own asynchronous file upload components for ASP.NET. I took lessons learned form Darren Johnstone's FileUpload project and created an HttpModule for extracting the files from the submitted data.

I got everything working as it should in testing with VS 2008 using the Development Server. I even went so far during my testing to ensure that the request was being intercepted by the module before the files began uploading. After I was satisfied with things, I deployed the project to our web server (Win 2008 w/ IIS 7). I was horrified to learn that the controls were not functioning when deployed.

After some remote debugging, I found that the HttpApplication.AuthenticateRequest event (my location for hooking in to the process) was not being invoked until the files were completely uploaded.

I have checked everything that I can think of, and still have been unable to find a reason for this change in behavior. Any ideas?


回答1:


My guess is that the ASP.NET runtime is not running in integrated mode with the IIS runtime on the server, so the file upload has to be completely buffered in the IIS host process before it can be passed to the ASP.NET runtime.

This would explain why the request pipeline is not firing until the data is completely uploaded.

Check the configuration of the server and ensure that integrated mode is enabled for the ASP.NET application.



来源:https://stackoverflow.com/questions/2270419/file-uploads-not-working-when-deployed-to-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!