Wednesday, 15 July 2015

Azure/WebMatrix web.config 500 Error -


I have tried to add a mime type to Azure in the WebMetrics web.config file: > pre & lt; & Lt; StaticContent & gt; & Lt; MimeMap file extension = ".json" mimeType = "app / jason" /> & Lt; / StaticContent & gt; & Lt; /system.webServer>

But I get 500 (internal server error) in trying to load a JSN file.

The site works locally.

What

(Edit :)

I have in the web. Configure:

  & lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Configuration & gt; & Lt; System.data & gt; & Lt; DbProviderFactories & gt; & Lt; Remove invariant = "System.Data.SqlServerCe.4.0" /> & Lt; Invariant = "System.Data.SqlServerCe.4.0" name = "Microsoft SQL Server® Compact 4.0" = "Net Framework Data Provider for Microsoft SQL Server Compact" type = "System.Data.SqlServerCe.SqlCeProviderFactory, System.Data. SqlServerCe, version = 4.0.0.0, culture = neutral, public keynote = 89845dcd8080cc91 "/> & Lt; / DbProviderFactories & gt; & Lt; /system.data> & Lt; System.webServer & gt; & Lt; StaticContent & gt; & Lt; MimeMap file extension = ".json" mimeType = "app / jason" /> & Lt; / StaticContent & gt; & Lt; /system.webServer> & Lt; / Configuration & gt;   

The mime type was created by the side webmatrix.

Error in console:

get 500 (internal server error)

UPDATE

File changes Is not and is called by Javascript from the Architect Tutorial App. "Porsche", "Model": "911", "Value": 135000, "Wiki": "http: {"Name": "composite", "rating": 1}, {"name": "mechanical", "rating": 4}, {" {"Name": "internal", "rating": 3}, {"name"}: {"name"}: {"name": "body", "rating": 4}, {"name" : "Accessories", "Ratings": 2}]}

Update 2

I've found that the app is available locally Running (where the application runs properly) error logs detected The file is as Cars.json file / application, while on the Azure server, it shows the form of text / html.

It seems that the Ezoor server is my web. Ignoring the config file is something else ...

(I have enabled debugging in Ezur but not yet got a list of errors ...)

HTTP 500 is coming from something else.

I added what you did in a new blank website and the result was expected.

To test the URL:

This request marks a scholar:

  Obtain http: //jsonp.azurewebsites. Net / demo.json HTTP / 1.11 User-Agent: Fidler Host: jsonp.azurewebsites.net   

Also the response is expected:

  HTTP / 1.1 200 OK Content - Length: 30 Content-Type: Application / JSL Last-Modified: Wednesday, 27 March 2013 09:03:09 GMT Accept-Category: Bytes Itag: "cc2c13e7c92ace1: 0" Server: Microsoft-IIS / 7.5. Readability date: Wednesday, 27 March 2013 09:03:52 GMT {"Title": "Demo", "Count": 10}   

I recommend that you turn on all possible logging Do and check the error log. Most often you define system.webServer , or something like that. How to enable logging.

UPDATE

After updating the question it is clear that cars.json is not actual stable < / Code> file. So the question is a bit messy.

UPDATE 2

This is your Jason:

Obviously you are having trouble with the rest of the website setup as I Said - Turn on all logging and check the real error message.

No comments:

Post a Comment