私はWCFサービスを持っており、開発ホストを使用するときはWCFテストクライアントで動作します。私はIIS 7を使用して、いくつかの方法を実行しようとするが、エラーがあります:WCFテストクライアントのエラーを取り除くには?
The underlying provider failed on Open.
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at IDatabaseService.GetAllUsersWithRoles()
at DatabaseServiceClient.GetAllUsersWithRoles()
サービスは、Entity Frameworkの上でMS SQL Serverと通信します。 IIS 7とMS SQL Serverは同じマシンに配置されます。
どのように動作させるには?
UPDATE - ここでは、web.configファイルの内容です:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation targetFramework="4.0" debug="true">
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
</assemblies>
</compilation>
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true"/>
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/>
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
<connectionStrings>
<add name="ForisTestLogsEntities" connectionString="metadata=res://*/ForisTestLogsModel.csdl|res://*/ForisTestLogsModel.ssdl|res://*/ForisTestLogsModel.msl;provider=System.Data.SqlClient;provider connection string="Data Source=GORAN-PC\SQLEXPRESS;Initial Catalog=ForisTestLogs;Integrated Security=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient"/>
</connectionStrings>
</configuration>
を入力してください。 Web.configでサービスを構成しましたか?その場合は、要素を質問の一部として投稿してください。 –
UPDATEを見てください。 – tesicg