获得Windows Identity Foundation“开发人员培训工具包”工作的例子 [英] getting Windows Identity Foundation "Developer Training Kit" examples to work
问题描述
我下载了Windows Identity Foundation的开发人员培训工具包,并将其安装在新设置的Windows Server 2008 R2虚拟机上。当我打开示例解决方案并按F5运行它们时,我收到以下错误:
I downloaded the "Developer Training Kit" for Windows Identity Foundation and installed it on a newly set up Windows Server 2008 R2 virtual machine. When I open up the example solutions and press F5 to run them, I get the following error:
无法在Web服务器上启动调试。底层连接已关闭:发送时发生意外错误。
"Unable to start debugging on the web server. The underlying connection was closed: An unexpected error occurred on a send."
如果我尝试在没有调试的情况下启动网页(Ctrl-F5),我收到连接已重置错误在浏览器中。什么都不行!
If I try to start the web page without debugging (Ctrl-F5), I get a "Connection was reset" error in the browser. Nothing works!
这里唯一不寻常的是我看到本地机器上的地址以https而不是http开头,就像我在开发环境中习惯的那样。这里有没有人能够运行这些代码示例?
The only thing unusual here is that I see that the addresses on the local machine begin with https instead of http as I am used to in my development environment. Has anyone here been able to get these code samples to run?
推荐答案
我在这里找到了一个解决方案: social.msdn.microsoft.com / ... 。
I found a solution to this here: social.msdn.microsoft.com/....
安装脚本中存在错误。您必须打开脚本并使用文本编辑器进行更改。
There is a bug in the installation script. You have to open the script and make changes with a text editor.
要从上面链接的站点引用(如果它消失),请对SetupCertificates进行以下更改。 CMD。替换
To quote from the site linked above ( in case it disappears ), make the following change to SetupCertificates.cmd. Replace
@if(%IsWinClient%==true)(
@if ("%IsWinClient%" == "true") (
ECHO设置SSL在端口443使用localhost证书...
ECHO Setting up SSL at port 443 using localhost certificate...
netsh http add sslcert ipport = 0.0.0.0:443 appid = {00000000-0000-0000-0000-000000000000} certhash = %CERTHASH%clientcertnegotiation = enable
netsh http add sslcert ipport=0.0.0.0:443 appid={00000000-0000-0000-0000-000000000000} certhash=%CERTHASH% clientcertnegotiation=enable
)else(
ECHO导入服务器证书并将HTTP.SYS指向它...
ECHO Importing server certificate and point HTTP.SYS at it...
httpcfg.exe set ssl -i 0.0.0.0:443 -f 2 -h%CERTHASH%
httpcfg.exe set ssl -i 0.0.0.0:443 -f 2 -h %CERTHASH%
)
使用
ECHO使用localhost证书在端口443设置SSL ...
ECHO Setting up SSL at port 443 using localhost certificate...
netsh http add sslcert ipport = 0.0.0.0:443 appid = {00000000-0000-0000-0000-000000000000} certhash =%CERTHASH%clientcertnegotiation = enable
netsh http add sslcert ipport=0.0.0.0:443 appid={00000000-0000-0000-0000-000000000000} certhash=%CERTHASH% clientcertnegotiation=enable
这篇关于获得Windows Identity Foundation“开发人员培训工具包”工作的例子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!