-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AjaxFileUpload won't upload once site is published to IIS7 #424
Comments
Hi @ChrisWh71 |
The IIS application root is The file upload control is on This is what I see on screen... This is what I see in the console tab in IE11 F12 developers tools This is what I see in the network tab in IE11 F12 developers tools (sorry, don't have Chrome) This is the asp code. As you can see the file upload control is hidden in a collapsible panel extender And here's a screenshot of the relevant pasrts of my web.config |
According to your screenshots, a web server error occurs. Web server error 500 appears as a Please find the error event and post its error message here. |
I don't get any ASP.NET warnings in the event viewer in this instance. Here's the IIS Logs though. You can see I'm getting an 500.21 (Module not recognized) error. POST /SalesReview/SalesReview/AjaxFileUploadHandler.axd contextKey={DA8BEDC8-B952-4d5d-8CC2-59FE922E2923}&controlID=ctl00_Content_AjaxFileUpload&fileId=EE9AE02C-2074-887E-912B-8A5D817C4A6E&fileName=Beach.jpg&chunked=false&firstChunk=true 80 ... Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+10.0;+WOW64;+Trident/7.0;+.NET4.0C;+.NET4.0E;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.30729;+.NET+CLR+3.5.30729) 500 21 13 2 Here's the response body from the XMLHttpRequest
|
@ChrisWh71 If it does not help, temporarily set a custom error mode to off in your application Web.config and check the server response again: <configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration> |
Our application pool is in Classic mode. Why would that make a difference? |
Managed handlers, which AjaxFileUploadHandler belongs to, can not be configured to run in IIS classic mode. This article explains the difference between Classic and Integrated mode for modules and handlers: IIS 7.0, ASP.NET, pipelines, modules, handlers, and preconditions |
Would you please provide a sample project that illustrates this issue? I cannot reproduce this behavior locally. |
Okay, that's interesting, thanks. At least we know now why it's not working and what to do to get it working. It's up to us now to decide what to do next based on the implications of this information. Thanks for all your help. |
@ChrisWh71 You're welcome! |
I'm using VS2017 15.6.2 and AjaxControlToolkit 18.1.0
I've tried using the toolkit via both the NuGet package and via the installer.
I've added an Ajaxfileupload to my page. I've added the handler to system.webserver in my web.config, along with the appropriate config section settings for me to set the temp folder. I've tried this with temp folder overridden and without it set so it takes the default. I've also tried this with the UploadHandlerPath set in the asp and without. All the variants have the same result, which is...
When I run the website in VS2017 for IE11 the file uploader works just fine. When I publish it to our IIS server it wont upload any files, just returns the red error message. On our IIS server the website is running in an app pool under the network service account, and I've granted network service full control of the temp folder, but still the file upload fails on the server.
What am I doing wrong?
It's worth mentioning that I'm setting a list of AllowedFileTypes. When I try and upload a file not in this list the AjaxFileUploader reports that that file is not allowed because of the file type. This happens both when running the code in VS and on the server, so it seems as if the file uploader is at least processing the file in some way, just not uploading it (hence my mentioning the permissions on the temp folder).
The text was updated successfully, but these errors were encountered: