I have the ASP.NET 4 asmx web service (IIS 7.5). It works by https. I added ashx handler. It works locally, but do not work at the hosting. Return 500 Internal Server Error. What to do?
Asked
Active
Viewed 7,498 times
2 Answers
1
I encountered this problem when I changed the application pool in IIS from classic to integrated. I solved it by adding a handler to the system.webServer of the web.config file.
<add verb="*" path="*.ashx" name="ImageFromDB" type="ImageFromDB" />
like this:
<system.webServer>
<handlers>
<add verb="*" path="*.ashx" name="ImageFromDB" type="ImageFromDB" />
</handlers>
</system.webServer>
This added 'ImageFromDB' to the HandlerMappings in IIS.
This link was very helpful in pointing me in the right direction.

user3474153
- 33
- 3
0
ASP.Net will display a 500 if you don't have the customErrors
property set to anything or it is set to On
.
Add this to the web.config to see what the actual error is:
<customErrors mode="Off" />
Once you know what the actual error is, you can proceed to fix it.

Pranav Singh
- 17,079
- 30
- 77
- 104

Arun Singh
- 63
- 6