Show specific error in ASP.NET MVC

2

I created a website that works normally, but when I upload it to the hosting server, it shows an error:

  

Application Server Error '/'.

As the error is very generic, it says to include the line <customErrors mode="Off"/> in my file web.config . I did this, but the error returned is?

  

An error occurred while processing your request.

That is, none of the errors helps a lot.

I want to know how to see a more error-specific message to make it easier to fix.

In my case, the error occurs when I try to create a txt file and download it (it must be permission error). How do I know if this is the case and fix it?

    
asked by anonymous 28.10.2017 / 15:21

1 answer

2

Probably the error was that it had more than <system.web> , it may only have one, or the error setting was not within this section. It may be interesting to turn on debug mode as well.

<system.web>
    <customErrors mode="Off"/>
    <compilation debug="true"/>
</system.web>

Also make sure that there is no exception catch that prevents the error from being shown.

    
28.10.2017 / 15:37