The Problem: You are trying to create a new website programatically via the Microsoft.Web.Administration.ServerManager and having no luck. In fact, you are getting invalid binding errors at every turn.
The Cause: The binding command you’re using is in the wrong format. While you might think that the proper syntax would be something like “test.stronico.com:80” because after all, that’s how it looks in the browser, you keep getting the error.
The Solution: Phrase the binding as “*:80:”test.stronico.com”, “http”. For some reason Microsoft did the order as the opposite of how one would use it in the browser.
This post originally appeared on the Stronico blog – with the absorption of Stronico into Digital Tool Factory this post has been moved to the Digital Tool Factory blog
Tags: C#, IIS, Programming
|
Written By Steve French |
Leave a Reply