iis not returning .json file

 

 

ERROR

The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map. error when requesting json

 

RESOLUTION

By default, IIS in W2K3 and above won’t serve files that aren’t of a MIME type that it knows about (instead returning 404 errors).

You need to add a MIME type to IIS to allow it to serve that type of file. You can set it at the site level or at the server level.

To set this for the entire server:

  • Open the properties for the server in IIS Manager and click MIME Types
  • Click “New”. Enter “JSON” for the extension and “application/json” for the MIME type.

Ref: http://stackoverflow.com/questions/332988/get-iis6-to-serve-json-files-inc-post-get

 

Default App Pool in IIS 7 stops when localhost/ is hit from the browser

Default App Pool in IIS 7 stops when localhost/ is hit from the browser

  1. http://stackoverflow.com/questions/13322937/iis-http-error-503-the-service-is-unavailable

 

In eventvwr I see:

The description for Event ID 5059 from source Microsoft-Windows-WAS cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

 

If the event originated on another computer, the display information had to be saved with the event.

 

The following information was included with the event:

 

DefaultAppPool

 

WAS is: http://msdn.microsoft.com/en-us/library/ms734677(v=vs.110).aspx

I tired changing the app pool to 2.0  f/w and also installing the .net f/ws using aspnet_regiis.exe /i

But no luck.

BEST: http://stackoverflow.com/questions/19652709/http-error-503-the-service-is-unavailable-app-pool-stops-on-accessing-website

I then turned off and on the WAS using turn windows features on/off (http://technet.microsoft.com/en-us/library/ee323462(v=office.13).aspx ) ..in turning on I see this in eventvwr

 

The description for Event ID 10010 from source Microsoft-Windows-DistributedCOM cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

 

If the event originated on another computer, the display information had to be saved with the event.

 

The following information was included with the event:

 

{A9E69610-B80D-11D0-B9B9-00A0C922E750}

 

IIS Quirks and Tips

1.       To run any application under an App Pool That’s been configured with a Account, first make sure that the account exist in the Directory (Local or Remote) group and next make sure it’s added in the IIS_WPG Group in Local Users And Groups ( go to manage from rt clk on My Comp)

2. At times u’ll see that the chages made to the iis settings don’t persist post iisreset. I have faced this many times with IIS 6. The best way to deal with this is to first do:

  1. On the task bar click Start, point to Programs, point to Administrative Tools, and then click Services.
  2. Right-click IISAdmin Service and click Stop.

Then make the changes in inetmgr and then do iisreset. This will store the metadata and also restart the IIS Admin Svc.

You may want to double check if the changes have persisted and that the IIS Admin svc is running though.

ref: http://support.microsoft.com/kb/286196

IIS Performance

BASICS

  1. Does iis handle only 1 http request at a time?
  2. how to make my web service on iis process multiple requests simultaneously
    1. http://stackoverflow.com/questions/587420/iis7-only-serves-up-one-page-at-a-time-its-a-making-me-crazy
    2. Does IIS 7 have limit of simultaneous requests?
      1. http://stackoverflow.com/questions/2147351/does-iis-7-have-limit-of-simultaneous-requests
      2. Does web app limit the no. of simultaneous requests to the same host?
        1.  http://stackoverflow.com/questions/4214621/multiple-calls-to-the-same-web-service-blocking says that it Does: .NET limits enforces a limit of 2 concurrent web requests to a single host. The limit affects all threads in the process, in case of ASP.NET even different applications running in the same application pool.
        2. http://support.microsoft.com/kb/821268: This problem might occur because ASP.NET limits the number of worker threads and completion port threads that a call can use to execute requests.
        3. http://stackoverflow.com/questions/7849884/what-is-limiting-the-of-simultaneous-connections-my-asp-net-application-can-ma
        4. http://stackoverflow.com/questions/14333593/scalability-issue-when-using-outgoing-asynchronous-web-requests-on-iis-7-5
        5. http://stackoverflow.com/questions/7849884/what-is-limiting-the-of-simultaneous-connections-my-asp-net-application-can-ma

Experience

  1. At first we had done a huge amount of logging done by our Web App within IIS. Once we disabled this, our performance increased by almost an order of magnitude.