title: Setting up development environment for ASP.NET MVC
body: <p>I'm from PHP background. I used to use Apache, MySQL and PHP for web development.
  I'm just starting asp.net mvc.</p>
  
  <ol>
  <li>I've Visual Studio 2008 Pro SP1 &amp; .NET 3.5 SP1 already installed on my computer.</li>
  <li>So, I installed <strong><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=53289097-73ce-43bf-b6a6-35e00103cb4b&amp;displaylang=en" rel="nofollow noreferrer">ASP.NET MVC 1.0</a></strong></li>
  <li>Created a "ASP.NET MVC Web Application"  project</li>
  <li>when I hit F5 it gives error <strong>Unable to connect to the ASP.NET Development Server</strong></li>
  </ol>
  
  <p>No wonder. In this process I didn't setup the webserver. </p>
  
  <p>Can I use apache here? I guess IIS is the default. Where is it? How do I configure it? What is the WebRoot directory for IIS server? Where can I find it?</p>
  
  <p>On searching for "Unable to connect to the ASP.NET Development Server"  I found this solution:</p>
  
  <blockquote>
    <p>Step 1: Select the “Tools->External
    Tools” menu option in VS or Visual Web
    Developer.  This will allow you to
    configure and add new menu items to
    your Tools menu.</p>
    
    <p>Step 2: Click the “Add” button to add
    a new external tool menu item.  Name
    it “WebServer on Port 8010” (or
    anything else you want).</p>
    
    <p>Step 3: For the “Command” textbox
    setting enter this value:
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.EXE
    (note: this points to the web-server
    that VS usually automatically runs).</p>
    
    <p>Step 4: For the “Arguments” textbox
    setting enter this value: /port:8010
    /path:$(ProjectDir) (or any port you
    like)</p>
    
    <p>Step 5: Select the “Use Output Window”
    checkbox (this will prevent the
    command-shell window from popping up.</p>
    
    <p>Once you hit apply and ok you will
    now have a new menu item in your
    “Tools” menu called “WebServer on Port
    8010”.  You can now select any web
    project in your solution and then
    choose this menu option to launch a
    web-server that has a root site on
    port 8010 (or whatever other port you
    want) for the project. You can then
    connect to this site in a browser by
    simply saying <a href="http://localhost:8010/" rel="nofollow noreferrer">http://localhost:8010/</a>. 
    All root based references will work
    fine.  </p>
    
    <p>Step 6: The last step is to configure
    your web project to automatically
    reference this web-server when you run
    or debug a site instead of launching
    the built-in web-server itself.  To-do
    this, select your web-project in the
    solution explorer, right click and
    select “property pages”.  Select the
    “start options” setting on the left,
    and under server change the radio
    button value from the default (which
    is use built-in webserver) to instead
    be “Use custom server”.  Then set the
    Base URL value to be:
    <a href="http://localhost:8010/" rel="nofollow noreferrer">http://localhost:8010/</a></p>
  </blockquote>
  
  <p>But there is no  <code>C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.EXE</code> such file on my system. Did I forget to install something? Please help me in running my "Hello World" application.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I'm using Windows XP SP2  and logged in as a user with Administrative previlages.</p>
  
  <p>from this <a href="https://stackoverflow.com/questions/990033/unable-to-connect-to-asp-net-development-server-issue">Unable to connect to ASP.Net Development Server issue</a> </p>
  
  <blockquote>
    <ul>
    <li>Disable IPv6 </li>
    </ul>
  </blockquote>
  
  <p>Done!!</p>
  
  <blockquote>
    <ul>
    <li>Make sure there isnt an edit in the hosts file for localhost</li>
    </ul>
  </blockquote>
  
  <p>There is no single entry in my hosts file (%SystemRoot%\system32\drivers\etc\hosts) with 'localhost' in it.</p>
  
  <blockquote>
    <ul>
    <li>Check firewall/virus settings to allow connections to/from devenv.exe</li>
    </ul>
  </blockquote>
  
  <p>I tried by disabling the firewall/antivirus</p>
  
  <blockquote>
    <ul>
    <li>If you can preview in the browser make sure the URL in the browser uses the same port number as the port number shown in the ASP.NET dev server taskbar icon.</li>
    </ul>
  </blockquote>
  
  <p>No, Actually there is no such dev server taskbar icon.</p>
  
  <blockquote>
    <ul>
    <li>Try setting a fixed, predefined port in project properties</li>
    </ul>
  </blockquote>
  
  <p>Tried it. But no positive result.</p>
  
  <p><strong>Solution:</strong></p>
  
  <p>After trying everything. I came to conclusion that WebDev.WebServer.exe may be corrupt. So, I've replaced <code>C:\Program Files\Common Files\microsoft shared\DevServer\9.0\WebDev.WebServer.EXE</code> with a fresh copy : <a href="http://www.4shared.com/file/116555696/ff3b0dc8/WebDevWebServer.html" rel="nofollow noreferrer">http://www.4shared.com/file/116555696/ff3b0dc8/WebDevWebServer.html</a></p>
  
  <p>It worked!! :)</p>