在VS2012和团队中使用IIS Express SSL时遇到问题 [英] Having problems using IIS Express SSL with VS2012 and a Team

查看:446
本文介绍了在VS2012和团队中使用IIS Express SSL时遇到问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:



ADFS2 要求RP Trust使用https。 RP信任是 https:// localhost:44310 / PAWS / 。话虽如此,我需要让IIS Express在本地使用SSL。因此,当我配置 ASP.NET MVC4 项目以使用IIS Express时。



当我检查这个到TFS(源代码管理),团队中的另一个开发人员获取最新信息。该项目不会为他们加载。






这是因为IIS Express不会自动读取项目文件并将HTTPS绑定添加到站点配置中。
这是VS添加到IIS Express的applicationhost.config文件的配置

 < site name =PAWS .Web-Siteid =2> 
< application path =/applicationPool =Clr4IntegratedAppPool>
< virtualDirectory path =/physicalPath =C:\ Users \ larsene \Documents \ My网站\ PAWS.Web-Site14/>
< / application>
< bindings>
< binding protocol =httpbindingInformation =*:44310:localhost/>
< / bindings>
< / site>

但我需要它将绑定协议设置为HTTPS,如下所示:

 < binding protocol =httpsbindingInformation =*:44310:localhost/> 

我可以手动将其输入applicationhost.config。或者我可以运行 appcmd。如此配置它。

 %ProgramFiles(x86)%\ IIS Express \ appcmd。 exeset site /site.name:PAWS.Web-Site / bindings:https / *:44310:localhost 

但这两种方法中的任何一种都不是我想要的。我不想向每个在这个项目上工作的开发人员解释他们在加载项目之前必须手动编辑他们的IIS Express设置。



如何重新创建问题:



首先关闭VS2012可以轻松重新创建。然后删除位于

 %USERPROFILE%\Documents\IISExpress 

然后打开VS2012并打开MVC4项目的解决方案,该项目配置为使用带有https的IIS Express。现在,VS2012将无法加载项目并抱怨没有安全绑定。



我做错了什么或如何解决这个问题以便让我最新的人项目只能运行吗?

解决方案

我可以确认Visual Studio 2013没有这个问题。



从VS2012升级到2013解决了我的问题。


The Problem:

ADFS2 requires that a RP Trust uses https. The RP trust being https://localhost:44310/PAWS/. With that said, I need to have IIS Express use SSL locally. So, when I configure my ASP.NET MVC4 project to use IIS Express.

When I check this in to TFS (source control) and another developer on the team gets latest. The project will not load for them.

Visual Studio 2012 will display the following error messages when opening the solution:

This is because IIS Express wont automatically read the project file and add the HTTPS binding to the site configuration. This is the configuration that VS adds to IIS Express' applicationhost.config file

<site name="PAWS.Web-Site" id="2">
    <application path="/" applicationPool="Clr4IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="C:\Users\larsene\Documents\My Web Sites\PAWS.Web-Site14" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation="*:44310:localhost" />
    </bindings>
</site>

But I need it to have the binding protocol set to HTTPS like so:

<binding protocol="https" bindingInformation="*:44310:localhost" />

I can either manually enter that into the applicationhost.config. Or I can run the appcmd.exe like so to configure it.

"%ProgramFiles(x86)%\IIS Express\appcmd.exe" set site /site.name:PAWS.Web-Site /bindings:https/*:44310:localhost

But either of these 2 methods is not what I want. I don't want to have to explain to every developer that works on this project to have to manually edit their IIS Express settings before they can even load the project.

How to recreate the problem:

This is easily re-createable by first closing VS2012. Then deleting the config folder for IIS Express located in

%USERPROFILE%\Documents\IISExpress

and then open VS2012 and also open the solution to the MVC4 project that's configured to use IIS Express with https. Now, VS2012 will fail to load the project and complain about no secure bindings.

What am I doing wrong or how can I fix this so that people who get latest on my project will just be able to run it?

解决方案

I can confirm that Visual Studio 2013 is free from this issue.

Upgrading from VS2012 to 2013 solved the problem for me.

这篇关于在VS2012和团队中使用IIS Express SSL时遇到问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆