通过https

时间:2016-04-01 12:10:49

标签: asp.net macos iis iis-express parallels

我使用parallels在mac上开发asp.net应用程序。我正在尝试实现这一点,当我运行网络时,它会在我的Mac Chrome中打开。有一个很好的指南如何做到这一点:

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

我已经按照指南进行了操作,它解决了我正在努力解决的一个令人烦恼的问题,但还没有成功。当我打开解决方案并加载Web项目或保存项目设置时,我收到以下警告:

VS warning

当我修改 applicationhost.config 中的网站元素中的绑定时会发生错误,该绑定可以在<solutiondir>\.vs\config\*applicationhost.config中找到:

修改后的网站元素/绑定

<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>

原始文件不包含具有计算机名称的绑定元素,并且仅包含localhost绑定。

当我运行网站时,它会在我的Mac浏览器中正确打开。但是,始终获取错误非常烦人。

修改

.csproj IIS

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

.csproj Web项目分机

<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>

1 个答案:

答案 0 :(得分:1)

您忘记将项目文件(.csproj / .vbproj)与配置文件保持同步。

更多技术细节可以在我的博文中找到,

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

相关问题