Asp.net 无法执行从客户端(aspx页)到wcf服务的存储过程(使用DAAB)

Asp.net 无法执行从客户端(aspx页)到wcf服务的存储过程(使用DAAB),asp.net,wcf,enterprise-library,Asp.net,Wcf,Enterprise Library,我正在尝试通过asp.net空网站中托管的wcf服务中的存储过程(使用DAAB)将数据从asp.net客户端网站存储到sql数据库。当我尝试将数据存储到DB时,出现以下错误: ** - The server was unable to process the request due to an internal error. For more information about the error, either turn on IncludeExceptionDetailI

我正在尝试通过asp.net空网站中托管的wcf服务中的存储过程(使用DAAB)将数据从asp.net客户端网站存储到sql数据库。当我尝试将数据存储到DB时,出现以下错误:

 **

 - The server was unable to process the request due to an internal
   error.  For more information about the error, either turn on
   IncludeExceptionDetailInFaults (either from ServiceBehaviorAttribute
   or from the <serviceDebug> configuration behavior) on the server in
   order to send the exception information back to the client, or turn
   on tracing as per the Microsoft .NET Framework SDK documentation and
   inspect the server trace logs.

** 
**
-由于内部错误,服务器无法处理该请求
错误。有关错误的详细信息,请启用
IncludeExceptionDetailInFaults(来自ServiceBehaviorAttribute
或从中的服务器上的配置行为)
命令将异常信息发送回客户端,或
根据Microsoft.NET Framework SDK文档和
检查服务器跟踪日志。
** 
尝试调试时,出现以下异常:尝试获取数据库类型的实例时发生激活错误,请在代码中键入“”——

Database db=EnterpriseLibraryContainer.Current.GetInstance(“MyInstance”);
我的app.config在哪里

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true"/>
  </configSections>
  <dataConfiguration defaultDatabase="MyInstance"/>
  <connectionStrings>
    <add name="MyInstance" connectionString="Data Source=BLRKDAS307581\KD;Integrated Security=True;User ID=SAPIENT\kdas3;Password=ilove0LINUX" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
</configuration>


有人能帮我吗?提前感谢…

默认情况下,EnterpriseLibraryContainer将从web.config读取在ASP.NET下运行的WCF服务的配置。除非您正在执行某些高级配置选项(例如FileConfigurationSource、重定向节、手动加载配置文件等),否则配置信息应位于web.config中.

您说配置来自app.config…您是指web.config吗?我创建了一个类库,其中包含具有必要数据库配置的数据库事务。cs文件中的代码如下所示:字符串结果;Databasedb=EnterpriseLibraryContainer.Current.GetInstance“MyInstance”);DbCommand cmdObj=db.GetStoredProcCommand(“AddtoDB”);db.AddInParameter(cmdObj,“@FirstName”,DbType.String,cust.FirstName)。。。。。。。。。。。db.ExecuteNonQuery(cmdObj);结果=db.GetParameterValue(cmdObj,“@strMessage”).ToString();返回结果;catch{return”“;}}我将app.config的内容复制到web.config。但是现在我得到了以下错误!!System.ServiceModel.ProtocolException未被用户代码消息处理=内容类型text/html;响应消息的charset=utf-8与绑定的内容类型(text/xml;charset=utf-8)不匹配。如果使用自定义编码器,请确保正确实现IsContentTypeSupported方法。响应的前1024个字节是:“……我只想将企业库配置添加到web.config;听起来WCF配置现在不正确(是否已删除?)。我已将Ent Lib配置添加到web.Config中。我无法从app.config中删除它。
<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="true"/>
  </configSections>
  <dataConfiguration defaultDatabase="MyInstance"/>
  <connectionStrings>
    <add name="MyInstance" connectionString="Data Source=BLRKDAS307581\KD;Integrated Security=True;User ID=SAPIENT\kdas3;Password=ilove0LINUX" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
</configuration>