could not execute a stored procedure(using DAAB) from a client(aspx page) to a wcf service

Posted by user1144695 on Stack Overflow See other posts from Stack Overflow or by user1144695
Published on 2012-03-28T05:23:13Z Indexed on 2012/03/28 5:30 UTC
Read the original article Hit count: 200

Filed under:
|

i am trying to store data to sql database from a asp.net client website through a stored procedure(using DAAB) in a wcf service hosted in a asp.net empty website.When i try to store data to the DB i get the following error:

 **

 - 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.

** 

When i try to debug i get the following exception: Activation error occured while trying to get instance of type Database, key "" in the code--

 Database db = EnterpriseLibraryContainer.Current.GetInstance<Database>("MyInstance");

where my app.config is

<?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>

Can anyone help me with it? Thanks in advance...

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about wcf