ASP.NET MVC Publishing for Azure - Works locally, but not on Azure

I've been investigating this thing for hours but couldn't figure out what was the problem causing this behavior.

I created a simple ASP.NET MVC application to upload and delete photos from a predefined container on Azure Storage Server. It works great when I run the application on my machine, locally. Also, it works great when I run it on my machine, but the data service is on Azure.

But when publishing an app to Azure, surfing that website works with this uninformative error:

Server error in application "/".

Runtime error

Description. Application error on the server. Electric current custom error settings for this application prevent application error details when viewed remotely (for security reasons). However, it could be viewed by browsers running on the local server machine.

Details. To include details of this particular error message for viewing on remote computers, please create a tag inside the "web.config" configuration file located in the root of the current web application. Then this tag must 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 see can be replaced with a custom error page by changing the defaultRedirect attribute of the application configuration tag to point to the 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, nor does it - nothing like this happens when running on my machine with Visual Studio.

If you have any ideas what is going on here, I would really appreciate your help, thanks.

+3


source to share





All Articles