0
votes

I am trying to deploy in Azure WebApp service an ASP.NET Weforms.

The app runs fine locally, without any problem.

After build ends I got the error below error in web browser after i go to myapp.azurewebsites.net i

Runtime Error Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a tag within a "web.config" configuration file located in the root directory of the current web application. This tag should then have its "mode" attribute set to "Off".

Here is source of Web.config file

<?xml version="1.0"?>
<configuration>
  <configSections/>
  <connectionStrings>
    <add name="constr" providerName="System.Data.SqlClient" connectionString="server=telendar.database.windows.net; database=TrackerDB;uid=telendar;password=*****;"/>
  </connectionStrings>
  <location path="Admin">
    <system.web>
      <customErrors mode="On"/>
      <authorization>
        <allow roles="Administrator"/>
        <deny users="*"/>
      </authorization>
    </system.web>
  </location>
  <system.web>
    <compilation debug="true" targetFramework="4.5.1"/>
    <sessionState timeout="60"/>
    <authentication mode="Forms">
      <forms defaultUrl="~/Default.aspx" loginUrl="~/AuthUser.aspx" slidingExpiration="true" timeout="60"/>
    </authentication>
    <authorization/>
    <pages controlRenderingCompatibilityVersion="4.0" validateRequest="true">
      <controls>
        <add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/>
      </controls>
    </pages>

  </system.web>
</configuration>
1
So either you follow the guidelines in the error message (see details) or you take a look at the logs (if enabled). - Peter Bons
@PeterBons After I set <customErrors mode="Off"/> I get the same error - griffindor

1 Answers

0
votes

You misunderstand the error message, it's telling you that your code crashed an unhandled exception and it's not allowed to show it ,it suggest you modifying the web.config to enable the details of the specific error message to be viewable on remote machines.

So what you need to do is recreate the error while you browse it on the server and then solve the problem.

However my suggestion is you could try to change your FrameWork maybe this will work for you.

If you still have other questions, please let me know.