Custom domain url in IIS Express with Visual Studio 2013

If your creating a web application in Visual Studio 2013 (VS2013) and run it, your site is hosted in IIS express. Your url is localhost with a random portnumber.

If you want integration with Facebook, other services or just want a custom domain in your browser then you can follow these steps.

  1. Go to the properties of your (MVC) web application
  2. Go to the web tab on the left
  3. Under Servers check the Override application root URL and fill in http://YourSubDomain.YourDomain.com
  4. Hit Create Virutal Directory
  5. Change the start url above under Start Action to http://YourSubDomain.YourDomain.com
  6. Go to your IIS Express settings under C:\Users\Ralph\Documents\IISExpress\config and open the applicationhost.config file.
  7. Find your site and adjust the binding<bindings>
    <binding protocol=”http” bindingInformation=”*:80:YourSubDomain.YourDomain.com” />
    </bindings>
  8. Optionally add the binding for https (443)
  9. Go to your host file under C:\Windows\System32\drivers\etc and add 127.0.0.1 YourSubDomain.YourDomain.com
  10. Run your site

If you get an error. Try to run your Visual Studio instance as Administrator.

.NET Framework 4.0 on Windows Server 2003 with IIS 6

Ralph Jansen BlogToday I was converting a website to the new .NET Framework 4.0 version. This was an existing website and was already running on a Windows Server 2003 with IIS 6.0 system. After I upgraded the files of the website, changed the config file to the right settings and changed the .NET Framework version on the ASP .NET tab in the properties window of the website to version 4 instead of 2, I was getting a “Page could not be found” error. After restarting the server, registering the .NET Framework again to IIS, I still had the same error on my screen.

When I searched the internet for a solution, I found the blog of Johan Driessen. One blog post explained the error that I was getting with the right solution. Just check if your ASPNET_ISAPI is set to the right .NET Framework (version 4). If not, enable it with the provided command. The only difference on the command in his blog and the one that I used is that I used Framework64 and not Framework.