VS调试web api服务

vs2013开发web api service时,使用vs开发服务器调试没有问题,但将项目放到另一台电脑调试(vs2010),总会提示

无法再以下端口启动asp.net开发服务器

错误:通常每个套接字地址 只允许使用一次

于是决定不用vs开发服务器,而是使用本地IIS web服务器

若此时项目URL填写http://localhost:8809这样的端口形式,点击保存会提示

无法创建虚拟目录。在本地计算机上,未能找到服务器“http://localhost:8809”。只有本地IIS服务器支持创建虚拟目录。

解决方法为将URL改为http://localhost/服务器的样式,保存即可,此时csproj文件类似如下样式:

<VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseIIS>True</UseIIS>
          <AutoAssignPort>False</AutoAssignPort>
          <DevelopmentServerPort>58109</DevelopmentServerPort>
          <DevelopmentServerVPath>/</DevelopmentServerVPath>
          <IISUrl>http://localhost/TC.PTP.Test.Service</IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>
          <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>