locked
.NET 4.5 MVC4 Web API on Website Instance returns: message: "An error has occurred." RRS feed

  • Question

  • The same code runs fine when published under .Net 4 without spatial types. The message is sent when accessing APIs. Both .Net 4.0 and 4.5 run fine on the local and test boxes, but fails as 1 Azure Website Reserved Instance. There is nothing read or committed to database either as I've removed all reads and writes, and hard coded sample data. Anyone run into a similar issues?


    • Edited by RahulMB Monday, November 5, 2012 11:24 PM
    Monday, November 5, 2012 11:22 PM

All replies

  • I can access the initial site, but I get message: "An error has occurred." when accessing the API. Debug builds also return the same message.
    Monday, November 5, 2012 11:26 PM
  • After some testing. It seems the new spatial data type seems to be the source of the error. However, How am I supposed to be using it?

    Any help is appreciated. Thanks!

                DbGeography location = DbGeography.PointFromText("POINT (-97.75 30.25)", DbGeography.DefaultCoordinateSystemId);

    Tuesday, November 6, 2012 2:31 AM
  • Does this work on local? If this works on local, can you please let me know the page URL which has this error?

    thanks,

    Wei

    Tuesday, November 6, 2012 3:18 AM
  • Yep, works fine local and on my test box as well.
    broken:
    http://ridescout.azurewebsites.net/api/1/ride/
    working:
    http://ridescout.azurewebsites.net/api/1/auth?fbid=2134&fbtoken=asdfa


    • Edited by RahulMB Tuesday, November 6, 2012 8:26 AM
    Tuesday, November 6, 2012 8:19 AM
  • Can you please enable the failed request tracing? The trace file is available under the logFiles Folder via FTP.

    And disable the customer errors by adding this in the web.config. IE may show us some error message after diabed this.

     <configuration>

    <system.web>

       <customErrors mode="Off"/>

    </system.web>

    </configuration>

    Wednesday, November 7, 2012 3:29 AM
  • Here's trace file:
    http://dl.dropbox.com/u/68285870/fr000022.xml
    Here's detailed http error page:
    http://dl.dropbox.com/u/68285870/ErrorPage000001.htm

    • Edited by RahulMB Thursday, November 8, 2012 12:39 AM
    Thursday, November 8, 2012 12:38 AM
  • I've added the <customErrors mode="Off"/> to the debug web.config and published a debug build. 
    Thursday, November 8, 2012 12:38 AM
  • If you wanted to contact me directly I can be reached at
    360 474 7229
    rahul (at) jackrabbitmobile (dot) com
    Thursday, November 8, 2012 1:07 AM