jeudi 30 juillet 2015

Publishing ASP.NET MVC to Azure -- works locally but not on Azure

I've been investigating this thing for hours but couldn't understand what's the problem causing this behavior.

I have built a simple ASP.NET MVC app to upload and delete photos from a predefined container on the Azure Storage Server. It works perfectly when I run the application on my machine, locally. Also, it works perfectly when I run this on my machine but the Data service is located on Azure.

But, when Publishing the application to Azure, surfing to this website runs to this uninformative error:

Server Error in '/' Application.

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".

<!-- Web.Config Configuration File -->

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

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

This doesn't tell me anything, also - nothing like this happens when running on my machine with Visual Studio.

If you have any idea what's going on here I'd really appreciate your help, thanks.

Aucun commentaire:

Enregistrer un commentaire