Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4026074
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:55:30+00:00 2026-05-20T10:55:30+00:00

Traditionally I use custom domains with my localhost development server. Something along the lines

  • 0

Traditionally I use custom domains with my localhost development server. Something along the lines of:

dev.example.com
dev.api.example.com

This has provided me a ton of flexibility when working with external APIs such as Facebook. This has worked great in the past with the built-in Visual Studio Development Server because all I needed to do was add a CNAME to those DNS records pointing to 127.0.0.1.

However, I have not been able to get this to work with IIS Express. Everything I have tried seems to have failed. I have even added the correct XML config to the applicationHost.config file for IIS Express, but it doesn’t seem to recognize the entries as valid as a true install of IIS would.

<binding protocol="http" bindingInformation="*:1288:dev.example.com" />

Whenever I enter this line and try to request http://dev.example.com:1288 I get the following message:

Bad Request – Invalid Hostname

Does anybody know if I am missing something obvious? Or did the IIS Express team really lack the foresight to see this type of use?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:55:31+00:00Added an answer on May 20, 2026 at 10:55 am

    This is what worked for me (Updated for VS 2013, see revision history for 2010, for VS 2015 see this: https://stackoverflow.com/a/32744234/218971):

    1. Right-click your Web Application Project ▶ Properties ▶ Web, then configure the Servers section as follows:

      • Select IIS Express ▼ from the drop down
      • Project Url: http://localhost
      • Override application root URL: http://dev.example.com
      • Click Create Virtual Directory (if you get an error here you may need to disable IIS 5/6/7/8, change IIS’s Default Site to anything but port :80, make sure Skype isn’t using port 80, etc.)
    2. Optionally: Set the Start URL to http://dev.example.com

    3. Open %USERPROFILE%\My Documents\IISExpress\config\applicationhost.config (Windows XP, Vista, and 7) and edit the site definition in the <sites> config block to be along the lines of the following:

      <site name="DevExample" id="997005936">
          <application path="/" applicationPool="Clr2IntegratedAppPool">
              <virtualDirectory
                  path="/"
                  physicalPath="C:\path\to\application\root" />
          </application>
          <bindings>
              <binding
                  protocol="http"
                  bindingInformation=":80:dev.example.com" />
          </bindings>
          <applicationDefaults applicationPool="Clr2IntegratedAppPool" />
      </site>
      
    4. If running MVC: make sure the applicationPool is set to one of the "Integrated" options (like "Clr2IntegratedAppPool").

    5. Open your hosts file and add the line 127.0.0.1 dev.example.com.

    6. ► Start your application!

    Some great advice from the comments:

    • You may need to run Visual Studio as Administrator.
    • If you want to make other devs see your IIS run netsh http add urlacl url=http://dev.example.com:80/ user=everyone
    • If you want the site to resolve for all hosts set bindingInformation="*:80:".
      Use any port you want, 80 is just convenient. To resolve all hosts you’ll need to run Visual Studio as an administrator
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Not sure if this has a straightforward solution, but I want to write a
Traditionally, to call a JavaScript function once the page has loaded, you'd add an
Traditionally we have always used xml in the response which is parsed by a
Disclaimer Please don't just vote to close this because the title looks subjective, and
I am working on a web portal (PHP/MYSQL) which have 3 sections photos, videos,
I have two dumb/rookie questions. My problem is, I have NO idea where to
Having just moved from textmate to vim I'm curious. To be able to navigate
I am using XeTeX 3.1415926-2.2-0.9997.4 (part of TeX Live 2010). One of its new
The point is to make a query that will grab values introduced by the
I've got a windows application that creates some threads to parse some txt files.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.