![](/img/trans.png)
[英]Get value Registry not working when run on IIS but working when run from Visual Studio
[英]WCF Service method working fine when run visual studio but not working from IIS, do I special config?
早上好,
我已經創建了WCF Web服務,當我從Visual Studio中執行它時,它可以正常工作,但是當我部署它並從IIS中運行它時,該Web服務方法似乎不起作用,它只是返回一個空白頁,沒有錯誤不是沒有。 我認為問題可能出在配置文件上。 請查看我的配置文件:
<system.serviceModel>
<services>
<service name="MyWebService.MyService" behaviorConfiguration="ServiceBehaviour">
<endpoint address="" binding="webHttpBinding"
contract="MyWebService.IMyService" behaviorConfiguration="web" />
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehaviour">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
<behavior>
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<directoryBrowse enabled="true"/>
</system.webServer>
我在配置文件上缺少什么嗎?
順便說一句,我正在使用Visual Studio 2013,C#,IIS7
在此先感謝大家!
我已經解決了此問題,方法是將SQL Server配置為由IIS(應用程序池)訪問。
這解決了問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.