Contact   •   Articles   •   Products   •   Search

Rick Strahl's Web Log

Wind, waves, code and everything in between...
ASP.NET • C# • HTML5 • JavaScript • AngularJs

WebLog Posts in Category IIS


Windows 10 Upgrade and IIS 503 Errors



After upgrading my machine to Windows 10 today I found that IIS, while working was throwing 503 Service Unavailable errors on every page. Turns out the issue is the Rewrite Module wasn't updated in the upgrade and that's causing a hard crash of the IIS module. Here's how to fix this issue.

Forms Auth loginUrl not working after Windows Update?



Ran into a problem with Windows Update last week that seems to have broken forms authentication and the loginUrl attribute when set. Looks like new default settings are changing default behavior, and an extra configuration key is required to get the old default behavior back.

Re-examining ASP.NET and Helios Performance Tests



Spend a little time over the weekend re-running some of my ASP.NET raw throughput benchmarks on my new machine and found some interesting results. Much faster, but also some surprises with self-hosting and efficiency surprises with various Web API approaches.

Checking out the Helios IIS Owin Web Server Host



During last week's MVP summit Microsoft showed a new light weight, Owin host called Helios, that can run directly on the IIS core without using the ASP.NET Runtime. It's light weight and fast, and offers a glimpse into where Microsoft is heading for building a more nimble and componentized runtime that is bound to be more flexible and agile. In this post I describe how to set up Helios to play around with and some of the implications it brings.

Use IIS Application Initialization for keeping ASP.NET Apps alive



Ever want to run a service-like, always-on application inside of ASP.NET instead of creating a Windows Service or running a Console application? Need to make sure that your ASP.NET application is always running and comes up immediately after an Application Pool restart even if nobody hits your site? The IIS Application Initialization Module provides this functionality in IIS 7 and later, making it much easier to create always-on ASP.NET applications that can act like a service.

Debugging Application_Start and Module Initialization with IIS and Visual Studio



If you're running the full version of IIS and you try to debug your Web application's startup code in Application_Start you might have found that you can't debug this code as the debugger doesn't break there. Here's why and some easy ways you can work around this limitation.

Figuring out the IIS Version for a given OS in .NET Code



Need to find the IIS version available for a given OS via code? Here's a small routine that handles this.

IIS 7 Error Pages taking over 500 Errors



I've been running into a problem with IIS returning error pages when my application is actually returning 500 errors along with custom content. IOW, IIS is taking over error display completely even if I send my own content for errors. This has some profound effects on error handling and on some custom handler implementations that relying on returning error information to the client. Thankfully there's a new ASP.NET 3.5 property that helps with this problem, although it's a rather obscure fix for this issue.

ISAPI Module Crashing on Application Pool Shutdown



So I have an odd issue with an ISAPI DLL that one of my products uses. The ISAPI interface provides a gateway interface to application servers and the actual module itself works fine without any problems. The problem is that the module is apparently crashing occasionally when the Application Pool is shutting down, but it's crashing after any of the DLL code has long stopped running. However, on...

Moving my Site onto a 64 Bit Server



I'm finally getting ready to install my new Server and after some back and forth and testing on Windows 2008 I decided to go ahead and bite the bullet and go with the 64 bit version of Server. I've had mixed feelings about installing 64 bit given that I have had exactly zero experience running under 64 bit. I've not really seen a compelling reason on the desktop to run a 64 bit OS especially...

Non ASPX Extensions and Authentication in the IIS 7 Integrated Pipeline



Ran into an issue where IIS 7's integrated pipeline exhibits different behavior authenticating non ASPX extensions. Looks like IIS 7 only authenticates mainline files resulting in Context.User==null or Context.User.Identity.IsAuthenticated==false. For example hitting CustomHit.axd doesn't provide user credentials where an ASPX url does.

Where's my .NET 3.5 (on IIS), Dude?



I just delivered a small 3.5 application to a  customer in compiled form and told him to install the application on IIS. The company is one I've dealt with on a few occasions and they are .NET aware shop where I deal with developers and a .NET familiar IT department. But it wasn't long after I sent my email that I got a call back from the customer who - slightly embarrassed - mentioned that they couldn't find the 3.5 Runtime option in the ASP.NET configuration panel.

HttpModule and HttpHandler sections in IIS 7 web.config files



Moving between IIS 5/6 and IIS 7 often causes some web.config conflict between the system.web and system.webserver handler and module sections. IIS 7 expects its handlers and modules defined only in its configuration section - if you still have handlers in system.web a configuration error occurs. Here's a useful switch that lets you turn off validation of system.web handlers and modules so you can ship web.config files that contain both.

Strong Name Validation failed when Debugging ASP.NET on IIS7



Ugh, since I installed a new machine I ran into this error message above earlier. That's a pretty omnious sounding error message which seems to hint at a mis-configuration during installation. The error occurs as soon as you try to debug a Web application against IIS 7... As it turns out the...

IIS/ASP.NET Settings and Virtual Directory Inheritance



Root directory web.config settings can easily interfere with child virtual application settings causing all sorts of problems. Here's why this is a problem and how to get around it.

Recent Patch hosing ASP Classic COM?



Since about a week and a half ago my server is jo-joing up and down frequently apparently due to IIS 6 Application Pool crashes. The problem started (in hindsight) right after installation of the maintenance patches from two weeks ago the week before Win2003 SP2 was released and installed (didn't...

GoDaddy and SocketPermissions



So I just got off the phone with support at GoDaddy for one of my customers and was told "Sorry we can't do that", when asked to provide socket permissions to go out and hit a POP3 server. GoDaddy has the web.config locked down and so you can't override the originUrl="site" so my customer is dead...

IIS Application Pool Crashes due to Temp File Permissions



My Web Server has been throwing a bunch of nasty errors recently and I've been trying to figure out what the heck is going on. The problem is that apparently App Pools have been crashing hard fairly frequently. In most cases this isn't a big deal as IIS will immediately spin up another app pool,...

64 Bit Servers, ISAPI and Managed Modules on IIS



So i took a support call from a customer of mine today who ran into problems installing Web Connection on a 64 bit machine. Web Connection works through a 32 bit ISAPI extension and sure enough a standard configuration will not allow this ISAPI extension to run. Any attempt to access a 32 bit...

HttpWebRequest and GZip Http Responses



I've talked a bit about GZip compression (here and here and here) on the server recently. It's pretty straight forward to use GZip compression either by letting IIS do it for you automatically or by using some simple ASP.NET code to compress content. As a quick review to create GZip content on...

IIS 7 and JavaScript Compression not working consistently



IIS 7 has improved and simplified support for GZip encoding enabled out of the box and for the most part it seems to be working well on my Vista install. I see my CSS and other text content properly GZip encoded. IIS 7 also allows you to encode dynamic content easily which is nice because that was...

Apache and Script Mapping



I've been struggling with mapping scripts to a custom ISAPI handler in Apache for some  in Web Connection (which is a FoxPro based ISAPI interface). Web Connection works with Apache, but recently with version 2.2 Apache changed its module binary format and required recompilation so I ended up...

IIS 6 Compression and App_Themes CSS



Hmmm. I finally got around to setting up static GZip compression on my server. I can't remember the reason why I didn't do this sooner, but I today I was looking at some of my CSS files getting out of hand so I thought I better check into this again. It's easy enough to do. MVP Omar Al Zabir has a...

Blocking IIS IP Addresses with ASP.NET



Over the last few months I've had increasing SPAM traffic coming to my site, usually from a few select IP address groups. Most of this site spamming crap that I actually catch tries to simply POST to every possible URL on the site apparently that contains a FORM tag, spewing forth a plethora of...

Dynamically hooking up HttpModules



Ran into an interesting question on the ASP.NET newsgroup today regarding a problem I've run into a few times myself. The issue revolves around virtual directory folder inheritance and web.config settings getting inherited from a root Web site. Anyway - one issue that has come up a few times is...

A dynamic class loading HttpHandlerFactory



Here are a couple of examples of how you can route custom script map extensions to your custom HttpHandlers.

Nested Item Templates for custom script extensions in Visual Studio



I'm working on an application that's using custom HTTP handlers to handle inbound Web requests where each script request is pointing at an HTTP handler. In this case the handlers need to be individual files so I have a script map configured in IIS with a special extension and then mapped to my...

System.Argument Exceptions in W3wp.exe and the VS Just-in Time Debugger



I've been noticing that on my server quite frequently I get managed exceptions bubbling up to the Dr. Watson and/or the Visual Studio Just In Time Debugging dialog on the desktop. Now this being a server machine I'm not happy about this happening of course because it clutters the desktop the next...

Update to free Web Configuration Utility



I've updated my Web Configuration Utility with better support for IIS 7 and configuring .NET versions for a given Web Virtual.

Programmatically listing, getting and setting Application Pools



Ever need to programmatically list, or get or set an IIS Application Pool? Here's the code to this programmatically with .NET code using DirectoryServices.

IIS 7 Integrated Pipeline Debugging on Vista, again



Mike Volodarsky posts more information how to get F5 debugging working properly in Visual Studio. Due to the way Authentication works in ASP.NET 2.0 some debugging scenarios with F5 fail and a workaround is required.

IIS 7 Integrated Pipeline Debugging, Visual Studio 2005 SP1 and Request Tracing



Visual Studio 2005 SP 1 allows debugging IIS 7 applications in Integrated Pipeline mode. In most cases - I've run into a few problems and solutions trying to figure out what went wrong and into one problem that I haven't been able to resolve yet.

IIS 7 and Rapid Fail Protection



IIS 7 has a new default feature called Rapid Fail Protection which detects failures and if too many failures occur in a specified period shuts down an Application Pool. Useful feature, but a little unexpected if you don't know about it and are wondering why your Application Pool has just shut down and won't restart automatically.

503 Service Unavailable in IIS 7 - watch those Application Pools



I ran into a funky issue with an application on IIS 7 today on my development machine: One of my Web applications simply would not respond to requests and IIS was reporting a 503 Error – Service Unavailable. Oddly enough though the rest of my Web site was working just fine – just this one...


West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2015