开发者

File Uploads Not Working When Deployed To Server

开发者 https://www.devze.com 2022-12-20 01:55 出处:网络
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

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开发者_如何学Go 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消