Tag Archives: IIS

Start/stop IIS command prompt and shortcuts

In my case following commands work for me

net stop w3svc
net start w3svc

You may need try these as well

net stop iisadmin
net start iisadmin
  • Create shortcut to PowerShell (or console)
  • Right click and Properties
  • In the Target box add at the end of the line net stop w3svc or net start w3svc
  • Click Advanced button and check Run as Administrator

ASP.NET The length of the query string for this request exceeds the configured maxQueryStringLength value.

Similar problem happens described by error:

The request filtering module is configured to deny a request where the query string is too long.

Solution, step 1 in web.config:

		<httpRuntime maxQueryStringLength="4096" />

<!-- OR -->

		<httpRuntime maxQueryStringLength="4096" />

Solution, step 2 IIS:
In the Connections pane, go to the connection, site, application, or directory for which you want to modify your request filtering settings.
In the Home pane, double-click Request Filtering.


Click Edit Feature Settings… in the Actions pane.


Specify your options, and then click OK.


Source: Request Limits

IIS 7.5 first request very slow

This is somewhat hard to tell whats going on on your other server, however here’s a simple checklist you might want to reconsider:

  1. Always pre-compiling your site, as opposed to copying it! you might gain a significant performance boost compiling your website before deployment: ASP.NET Precompilation Overview
  2. Do not run the production application with debug=”true” enabled, when debug flag is true in your web.config, Much more memory is used within the application at runtime, and since some additional debug paths are enabled, codes can execute much slower
  3. Check your Web.config file to ensure trace is disabled in the section
  4. IIS 7.5 comes with the Auto-Start Feature. WAS (Windows Process Activation Service) starts all the application pools that are configured to start automatically, ensure that your application pool is configured to AlwaysRunning in the IIS 7.5 applicationHost.config, check out here for more detail
  5. Check out the ASPNET.CONFIG file to see if the configuration on both servers are still the same. Every asp.net server can be well configured by aspnet.config file located in the root of the framework folder
  6. Ensure that Publisher Evidence for Code Access Security (CAS) is set to false in your aspnet.config file, This might increase the initial page load when you restart the ASP.NET app pool. you can read more about it here.Here’s how to disable checking for CAS publisher policy for an application:
            <generatePublisherEvidence enabled="false"/>
  7. also you might want to try Application Initialization Module for IIS 7.5, this module also available on IIS 8.0 can decrease the response time for first requests by pre-loading worker processes

Source: Stack Overflow