Connection Strings Error

Nov 17, 2011 at 4:08 PM
Edited Dec 1, 2011 at 7:56 AM

Good Day Guys,

First of all thanks for a great looking product now lets see if we can get it to work on our domain :), we seemed to have a few issues running through the setup and creating a db automatically so we setup a db manually, and now we're trying to link it with the connection strings. Our first error was the same as this discussion http://umanage.codeplex.com/discussions/277014 we follwed the steps in this post and now we are getting a new error with the connection strings.. if you could give us a hand we'd greatly appreciate we feel we're 90% there...

error...

 

Keyword not supported: 'data source'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Keyword not supported: 'data source'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:

[ArgumentException: Keyword not supported: 'data source'.]
   System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey) +6337982
   System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules) +134
   System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +146
   System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString) +67
   PPI.UMS.DAL.uManageEntities..ctor(String connectionString) +30
   PPI.UMS.BLL.UmsRoleProvider.GetRolesForUser(String username) +111
   System.Web.Security.RolePrincipal.IsInRole(String role) +249
   System.Web.Security.Roles.IsUserInRole(String username, String roleName) +692
   PPI.UMS.Web.Default.Page_Load(Object sender, EventArgs e) +117
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3048

 

web config:

<connectionStrings>    <clear />    <add connectionString="Data Source=owlitmobile;Initial Catalog=umanage-bex.co.za;User Id=sa;Password=******;" name="ADService" />    <add connectionString="Data Source=owlitmobile;Initial Catalog=umanage-bex.co.za;User Id=sa;Password=******;" name="uManageEntities" providerName="System.Data.EntityClient" />  </connectionStrings>

 

and lastly our role setup..

 

<roleManager enabled="true" cacheRolesInCookie="true" cookieName=".uManageRoles" cookieTimeout="15" cookiePath="/" cookieSlidingExpiration="true" cookieProtection="All" defaultProvider="RoleProvider">      <providers>        <clear />        <add connectionStringName="uManageEntities" applicationName="uManage" name="RoleProvider" type="PPI.UMS.BLL.UmsRoleProvider" />      </providers>    </roleManager>

 

Thanks again

Chris

Developer
Nov 30, 2011 at 4:45 PM
Edited Nov 30, 2011 at 4:50 PM

You do not have an Entities Framework specific Connection String there. It should be more like:

< add name="AppEntities" connectionString="metadata=res://*/App.csdl|res://*/App.ssdl|res://*/App.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=.\SQLExpress;Initial Catalog=uManage2;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />

 Your Roles issue should clear up as soon as you clear up the connection string issue since the role provider references the SQL connection.