Question

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?

Was it helpful?

Solution 2

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top