Bar*_*cki 18 c# iis wcf visual-studio-2012
我刚刚安装了Visual Studio 2012,并希望创建我的第一个WCF服务应用程序.我是一名来自.NET世界的Java开发人员,所以请理解:)
我创建了一个新的C#项目WCF服务应用程序.然后我点击Debug(或F5),我得到一个错误说:
Unable to launch IIS Express
Run Code Online (Sandbox Code Playgroud)
当我再次点击时会出现另一个这样的错误,但这次IIS出现在托盘中,我收到通知(气泡),当我点击它时会显示一条消息:
Port '53234' is already being used by process 'IIS Express' (process ID '5524')
Run Code Online (Sandbox Code Playgroud)
我尝试在Web选项卡中更改项目属性中的端口,但它不会更改任何内容.msgs是相同的,只是端口号改变了.
对我来说这很有趣,但我无法修复它.我已经尝试更改端口,我重新安装了IIS,重新启动了Visual Studio和PC.我想要使用的端口上没有运行任何东西.
我使用的是Windows 8.1 x64,Visual Studio 2012(IIS 8).
编辑
IIS中有一个log msg:
Failed to register URL "http://localhost:53234/" for site "WcfService1" application "/". Error description: Cannot create a file when that file already exists. (0x800700b7)
Registration completed
Run Code Online (Sandbox Code Playgroud)
Mik*_*ell 20
对我来说,这个问题是由于项目中的错误配置,它在IISExpress的applicationHost.config文件中表现出来.
我将http和https端口设置为相同.
<site name="{projectname}" id="3">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="{myPath}" />
</application>
<bindings>
<binding protocol="https" bindingInformation="*:57287:localhost" />
<binding protocol="http" bindingInformation="*:57287:localhost" />
</bindings>
</site>
Run Code Online (Sandbox Code Playgroud)
要解决此问题,请编辑项目文件以正确使用不同的端口.
另一个选择是删除applicationHost.config文件,Visual Studio将在它激活IISExpress时重新创建它.它不会解决项目配置错误,但它可能解决了我必须做几次的破坏配置.
*注意:*要查找IIS的applicationHost.config文件,请参阅此问题找到IIS Express配置/配置数据库文件在哪里?
我最近碰到了这个,我的解决方案不在这里,所以我想我会添加它.
我的问题是netsh添加了一个与我的localhost绑定匹配的urlacl,导致出现此错误消息.
解决方案是调用netsh http show urlacl并查看是否列出了您的iis express绑定.我的localhost绑定用于https:// localhost:44300.所以要解决它,我不得不打电话:
netsh http delete urlacl url=https://localhost:44300/
当我打开两个 Visual Studio 2012 实例并使用恰好具有相同名称(默认名称App)的不同项目时,我遇到了此问题。
我可以通过关闭 Visual Studio 的一个实例来解决此问题。
| 归档时间: |
|
| 查看次数: |
19311 次 |
| 最近记录: |