May 7, 2014 at 6:34 PM
Edited May 7, 2014 at 6:35 PM
I had this code working and connecting to a sql server DB with the database credentials in the connection string. Then we changed our sql server and with the new server we are using integrated security and the database credentials are no longer in the
connection string in web.cofing file. They have moved to the app pool on IIS. With the new server and setting, the app still connects to the database, but it throws the below error message. This frustrating. Do I really need to re-write my code? Or can this
be fixed by changing some settings in the web.cofig files?
List<MyObject> results = new List<MyObject>();
Database db = DatabaseFactory.CreateDatabase("MyDB");
IRowMapper<ProgramAccessVM> mapper = MapBuilder<MyObject>.BuildAllProperties();
var accessor = db.CreateSprocAccessor("proc_GetProgramAccess", mapper);
var registeredWebconfs = accessor.Execute(organizationID);
var result = from regWebconf in registeredWebconfs
The database type "Microsoft.Practices.EnterpriseLibrary.Data.GenericDatabase" does not support automatic parameter discovery. Use an IParameterMapper instead.