Posts

Showing posts with the label iis

ASP.NET MVC / IIS - Optimizing Web Application Performance

Optimizing your web sites in ASP.NET MVC for performance includes cache busting, enabling caching for static resources, enabling gzip compression. To enable caching on static resources, you will need to add the following XML in your web configuration file in the system .webserver element. The control max age parameter determines the length of time to cache the static resources. ... ... In an effort to compress dynamically generated content (ASP, PHP, ASP.NET) and static files (PDF, JPEG, etc.), you can enable the following settings within your application web configuration. As you use < urlCompression > to define what is compressed, you can use < httpCompression > to define how it is compressed. … Utilizing Cache Busting can be done to ensure users do not need to clear their browser cache (te...

IIS / ASP.NET - Disabling Compatibility Mode/View (Internet Explorer)

In ASP.NET, if you need to disable compatibility view of the end users using your application, you can override the respective browser (Internet Explorer) compatibility mode, by setting the compatibility mode to Edge. By using this setting, the users of the web application, will render using the latest rendering engine available. If in the scenario you don't want to use the latest, you can also define other standards, such as IE8, IE9, etc. This can be defined in the master page/view using the following meta tag within the <head> section: ... Note: The X-UA-Compatible meta tag will need to be the first meta tag, in the circumstance that setting the IE rendering engine to Edge, is not working as intended. and web.config, by adding a custom header using X-UA-Compatible to the response headers, ...

IIS / ASP.NET - Run all Managed Modules for All Requests (RAMMFAR)

When initially creating an ASP.NET web application, RunAllManagedModulesForAllRequest is enabled by default. If enabled, every request that passes through the ASP.NET pipeline, is treated as a managed modules (or handlers). When all modules are managed, including static content, there are possible performance implications. If you are utilizing a distributed cache provider, such as App Fabric, an implication includes that all managed resources, including static content are passed to the distributed cache (as managed resources), which adds a level of overhead, even if not required. The solution to optimizing your web application, is to disable runAllManagedModulesForAllRequests (RAMMFAR), and add defined locations for your static resources within your web configuration file. The static resources can include but are not limited to CSS, Images, and Scripts. Firstly, you will want to add location segments for each file/folder location, within the configuration element. ... ...

SharePoint 2010 / Debug - Locating Active SharePoint Process (W3WP.exe)

Often times you may be looking at debugging SharePoint custom code and need to attach the debugger to a process. The process list may list several instances of W3WP.exe. To locate which instance you are particularly using, you can go to the command prompt and run "%systemroot%\system32\inetsrv\appcmd list wps". The following cmdlet loops to allow me to quickly refresh the net services list, which is useful after an IIS reset. :loop cls %systemroot%\system32\inetsrv\appcmd list wps pause goto loop

IIS - Error - PageHandlerFactory-Integrated

If you've ever installed .NET Framework 4.0 (version 4.0.30319) and enabling the Internet Information Services (IIS) Manager, and encounter the following error when trying to visit the web page you are trying to deploy: Handler "PageHandlerFactory-Integrated" has a bad module "ManagedPipelineHandler" in its module list. This error is caused due to a glitch in the installation of .NET Framework 4.0. To fix, simply open the run dialog on your system and run the following commands. On 32-bit System: %windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart On 64-bit System: %windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart The .NET Framework 4.0 installation will be repaired, and after a few minutes make another attempt to browser your page. The repair will happen silently, in the background...