Rick Strahl's Web Log

Wind, waves, code and everything in between...
ASP.NET • C# • HTML5 • JavaScript • AngularJs
Contact   •   Articles   •   Products   •   Support   •   Search
Ad-free experience sponsored by:
ASPOSE - the market leader of .NET and Java APIs for file formats – natively work with DOCX, XLSX, PPT, PDF, images and more

WebLog Posts in Category IIS

ASP.NET (236) .NET (119) JavaScript (71) jQuery (61) ASP.NET (59) Windows (49) AJAX (47) Visual Studio (44) CSharp (43) IIS (42) HTML (35) Localization (31) LINQ (30) Personal (30) WCF (28) MVC (25) HTML5 (23) FoxPro (21) WPF (19) Web Services (19) Security (18) CSS (18) Web Api (16) COM (15) C# (14) ASP.NET Core (14) IIS7 (14) ADO.NET (13) Angular (12) Vista (12) XML (10) HTTP (10) Microsoft AJAX (8) Sql Server (8) West Wind Ajax Toolkit (7) Web Connection (7) Entity Framework (6) Html Help Builder (5) OWIN (5) Live Writer (5) ASPNET5 (5) C++ (5) SignalR (5) Silverlight (5) Source Control (4) Westwind.Globalization (4) Visual Studio (4) Mobile (4) Cordova (4) Internet Explorer (4) ISV (4) Help Builder (3) IIS7 (3) Opinion (3) Networking (3) NuGet (3) LetsEncrypt (3) ADO.NET (3) Conferences (3) DataBinding (3) WebLog (3) Software Development (3) Razor (3) RegEx (2) RSS (2) Speaking (2) Tools (2) WinForms (2) Bugs (2) ASP.NET vNext (2) Angular (2) Windows (2) WinForms (2) .NET (2) IIS (2) Office (2) Installation (2) Help (2) FireFox (1) Flexbox (1) Graphics (1) Hardware (1) IOS (1) iPhone (1) Musings (1) Markdown Monster (1) Maui (1) Linux (1) JSON (1) .NET Core (1) Addins (1) WPF (1) FoxPro (1) Internet Explorer (1) Linux (1) Markdown Monster (1) Typescript (1) Azure (1) Deployment (1) Dynamic Types (1) Control Development (1) Chocolatey (1) Windsurfing (1) wwHoverPanel (1) Travel (1) Web Deployment Projects (1) Web Design (1) Testing (1) Threading (1) Web Browser Control (1) SEO (1)

Bypassing IIS Error Messages in ASP.NET

IIS Error handling is the source of lots of confusion. I've been using IIS for nearly 20 years now, and figuring out the right combination of error configuration settings and code to properly serve custom error pages or error responses in API still makes fumble a few times before I get it just right. This post provides a few hints and some background on how to deal with error handling.

Automating IIS Feature Installation with Powershell

IIS often gets a bad wrap for being diffcult to install and configure. However, using some of the built-in tooling for administration using PowerShell it's actually quite easy to configure IIS and even set up a new site and application pool with a few short scripts that are much quicker, and more repeatable than using the various Windows UI features. Here's how.

External Network Access to Kestrel and IIS Express in ASP.NET Core

Recently I needed to connect to my Windows based ASP.NET Core API from my Mac and in order for that to work some configuration settings are necesary so that the ASP.NET applications can serve HTTP content to the external network connection that this entails. In this post I show what you have to do to enable remote connections both using the Kestrel and IIS Express Web servers.

ASP.NET Web Site Project Publishing and Changing ACLs

When publishing ASP.NET Web Site Projects, the project publish will overwrite server ACLs by clearing them to the inherited defaults and removing rights from common accounts. The result is that if you have custom ACLs set on the server they will be wiped by default. This occurs only on Web Site projects and in this post I remind myself of the .pubxml override setting that disables this default behavior

Use Powershell to bind SSL Certificates to an IIS Host Header Site

Managing SSL certificates on Windows has always been a pain in the ass and recently with the introduction of SNI to support multiple SSL certificates per site things have changed slightly in order to register certificates with IIS programmatically. In this post I show how to use PowerShell and the IIS WebAdministration snap in commands to create or import and register an SSL Certificate via the Command Line along with how this convoluted process works

IIS Channel Listener Errors in Windows 10 Insider Build 14342

After installing Insider Build 14342 I ran into some major issues with IIS crashing hard and resulting in stopped Application Pools. After some tracking it turns out this is due to application pool bitness which causes 32 bit Application Pools to crash for me.

Getting 'motivated' to move to SSL and HTTPS

The pressure is on: HTTPS is pushed front and center more and more as we see the browser vendors and API tools providers, making SSL encryption no longer an optional part for many things that you build on the Web. SSL and HTTPS are becoming a requirement and for good reasons. I personally ran into this with the Google Maps API in one of my applications that now requires an HTTPS based client page in order to use this API. In this post I discuss some of the issues and why this is actually a good thing, and some of the steps I took to move my existing site to HTTPS.

Using Let's Encrypt with IIS on Windows

Let's Encrypt is a new, open source certificate authority for creating free SSL certificates. In this post I show you how you can use some of the API clients on Windows to create Let's Encrypt certificates for use in 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 - 2017