Search code examples
asp.netmacosiisiis-expressparallels

Using computer alias with https


I develop asp.net apps on a mac using parallels. I am trying to achieve that when I run a web, it opens in my Mac Chrome. There is a nice guide how to do that:

http://www.dontpaniclabs.com/blog/post/2015/08/25/browser-debugging-between-os-x-and-visual-studio-in-parallels/

I have followed the guide and it works with one annoying issue that I am trying to fix but haven't succeeded yet. When I open the solution and the web project loads or when I save the project settings I get the following warning:

VS warning

The error occurs when I modify bindings in a site element in applicationhost.config which can be found in <solutiondir>\.vs\config\*applicationhost.config:

Modified site element/bindings

<site name="UnitechSales" id="2">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="C:\Projects\UnitechSalesApp\UnitechSales" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation="*:51267:localhost" />
        <binding protocol="https" bindingInformation="*:44300:localhost" />
        <binding protocol="https" bindingInformation="*:44300:arrakis-win" />
    </bindings>
</site>

The original file simply does not contain the binding elements with the computer name and contains only localhost bindings.

When I run the website, it correctly opens in my mac browser. However, getting the error all the time is quite annoying.


Edit

.csproj IIS

<UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort>44300</IISExpressSSLPort>
<IISExpressAnonymousAuthentication />
<IISExpressWindowsAuthentication />
<IISExpressUseClassicPipelineMode />

.csproj Web project ext

<WebProjectProperties>
    <UseIIS>True</UseIIS>
    <AutoAssignPort>False</AutoAssignPort>
    <DevelopmentServerPort>51267</DevelopmentServerPort>
    <DevelopmentServerVPath>/</DevelopmentServerVPath>
    <IISUrl>https://arrakis-win:44300</IISUrl>
    <NTLMAuthentication>False</NTLMAuthentication>
    <UseCustomServer>False</UseCustomServer>
    <CustomServerUrl>
    </CustomServerUrl>
    <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>

Solution

  • You forgot to keep your project file (.csproj/.vbproj) in sync with your config file.

    More technical details can be found in my blog post,

    https://blog.lextudio.com/2015/11/jexus-manager-secrets-behind-visual-studio-iis-express-integration/