基于ssl的wcf服务在azure emulator中不起作用
如果我让web角色在IIS中运行,服务将按预期运行。 但是,它在azure emulator中不起作用。错误页面显示“500-内部服务器错误。您正在查找的资源有问题,无法显示。” 我怀疑这是由以下设置引起的:基于ssl的wcf服务在azure emulator中不起作用,wcf,ssl,azure,iis-express,Wcf,Ssl,Azure,Iis Express,如果我让web角色在IIS中运行,服务将按预期运行。 但是,它在azure emulator中不起作用。错误页面显示“500-内部服务器错误。您正在查找的资源有问题,无法显示。” 我怀疑这是由以下设置引起的: <system.webServer> <security> <access sslFlags="Ssl, SslNegotiateCert, SslRequireCert" /> </secur
<system.webServer>
<security>
<access sslFlags="Ssl, SslNegotiateCert, SslRequireCert" />
</security>
</system.webServer>
但我在azure中设置了一个启动任务,如下所示:
<WebRole name="WCFServiceWebRole" vmsize="ExtraSmall">
<Startup>
<Task commandLine="startup\unlockSession.cmd" executionContext="elevated" />
</Startup>
</WebRole>
其内容是:
%windir%\system32\inetsrv\appcmd解锁配置/节:system.webServer/security/access
有人遇到过同样的问题吗?救命啊
提前谢谢 是否已在servicedefinition文件中启用SSL端点,如下所示
<Endpoints>
<InputEndpoint name="Endpoint1" protocol="https" port="443" certificate="SSLcertificate" />
</Endpoints> <Certificates>
<Certificate name="SSLcertificate" storeLocation="LocalMachine" storeName="My" />
</Certificates>
这可能是因为您的模拟器使用的是IIS Express,而不是完整的IIS。在这种情况下,
appcmd
将有另一个路径:C:\Program Files\IIS Express\appcmd.exe
但是,要获得更正确和完整的解决方案,请参见此。最有可能导致问题的不是您的启动脚本-通常这些问题会导致角色甚至无法启动。但是这里没有足够的信息来说明问题到底是什么。查看事件日志,在WebRole.cs和/或Global.asax应用程序错误处理程序中设置断点,并通常尝试收集更多信息。您还可以检查web.config中的错误-这是导致此问题的常见原因。