I was facing the same problem, below code worked for me.
Web.config:
Change
dataConfiguration section as per below configuration:
<section name="dataConfiguration"
type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings,
Microsoft.Practices.EnterpriseLibrary.Data"/>
Also change the code where you are accessing the DatabaseFactory.CreateDatabase().
DatabaseProviderFactory factory = new DatabaseProviderFactory();
var db = factory.Create("ConnectionString");
var ds = new DataSet();
var cmd = db.GetStoredProcCommand("uspGetDetails");
db.AddInParameter(cmd, "@userName", DbType.String, "Developer");
ds = db .ExecuteDataSet(cmd);