MarimerLLC / cslaforum

Discussion forum for CSLA .NET
https://cslanet.com
Other
31 stars 6 forks source link

The ConnectionString property has not been initialized. DataPortal.Fetch failed - C# .NET #55

Open chrisrt opened 9 years ago

chrisrt commented 9 years ago

I'm having this error when trying to Fetch data.... This error drive me crazy !!! Please Help !

Csla.DataPortalException: DataPortal.Fetch failed (The ConnectionString property has not been initialized.) ---> Csla.Server.CallMethodException: DataPortal_Fetch method call failed ---> System.InvalidOperationException: The ConnectionString property has not been initialized. at System.Data.SqlClient.SqlConnection.PermissionDemand() at System.Data.SqlClient.SqlConnectionFactory.PermissionDemand(DbConnection outerConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at Golf.UserManagement.UserList.DataPortal_Fetch(AuthenticateCriteria criteria) --- End of inner exception stack trace ---

chrisrt commented 9 years ago

My connection string are working in other places... so there is no errors on the Connection String content..

jonnybee commented 9 years ago

Do you use remote portal? If so - the connection string must also be in the web.config of the server project.

chrisrt commented 9 years ago

Hello... Ok. I will check ! Any other idea of what's wrong ??? I will check today when I have access to the project... Was working properly, don't know what cause this issue.. Thanks for your help !!

jonnybee commented 9 years ago

Put a breakpoint in you code and inspect ConfigurationManager.ConnectionStrings

You should find your named connection inside the connectionstrings collection. Error message indicated that the named connection is not found in the collection.

chrisrt commented 9 years ago

Only to let you know.. I have 2 projects.. a Data Portal project that cointains reference to CSLA DLL and all stuff related to DataPortal and another Web Project that have a Reference to that Data Portal project...

I will try to check that... Thanks