How to set web.config file to show full error message

前端 未结 3 1941
小鲜肉
小鲜肉 2020-11-28 21:38

I deployed my MVC-3 application on windows Azure. But now when I am requesting it through staging url it shows me (Sorry, an error occurred while proces

相关标签:
3条回答
  • 2020-11-28 21:51

    If you're using ASP.NET MVC you might also need to remove the HandleErrorAttribute from the Global.asax.cs file:

    public static void RegisterGlobalFilters(GlobalFilterCollection filters)
    {
        filters.Add(new HandleErrorAttribute());
    }
    
    0 讨论(0)
  • 2020-11-28 21:58

    not sure if it'll work in your scenario, but try adding the following to your web.config under <system.web>:

      <system.web>
        <customErrors mode="Off" />
      ...
      </system.web>
    

    works in my instance.

    also see:

    CustomErrors mode="Off"

    0 讨论(0)
  • 2020-11-28 22:01

    This can also help you by showing full details of the error on a client's browser.

    <system.web>
        <customErrors mode="Off"/>
    </system.web>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
    </system.webServer>
    
    0 讨论(0)
提交回复
热议问题