1
Vote

DropthingsDataContext A valid path must be either an existing directory, an existing file with extension '.csdl', '.ssdl', or '.msl', or a URI that identifies an embedded resource.

description

I am facing an issue with connectivity of DropthingsDataContext with the Database of Dropthings.
I have downloaded the recent Dropthings-2.8.2-src version of the Dropthings from:-
http://code.google.com/p/dropthings/downloads/list

I am using Visual Studio 2010 SP1, SQL Server 2008 R2 and have successfully installed Enterprise Library 4.1.

I have successfully connected the Dropthings.mdf+ldf to the SQL Server 2008 R2, and the first connection (DropthingsConnectionString) in the Web.config file is working fine. But the second connection DropthingsDataContext is not connecting to the database.
It is showing the following error:-
The specified metadata path is not valid.
A valid path must be either an existing directory, an existing file with extension '.csdl', '.ssdl', or '.msl', or a URI that identifies an embedded resource.

I guess there is a problem in the connection string.
This is the code for outer web.config:-
<add name="DropthingsConnectionString" connectionString="Data Source=MUZAFFAR-PC\SQLEXPRESS2008;Initial Catalog=dropthings;user id=dropthings;password=dropthings" providerName="System.Data.SqlClient" />

<add name="DropthingsDataContext" connectionString="metadata=....\Dropthings.Data\obj\Debug\edmxResourcesToEmbed\EntityModelDemo.csdl|....\Dropthings.Data\obj\Debug\edmxResourcesToEmbed\EntityModelDemo.ssdl|....\Dropthings.Data\obj\Debug\edmxResourcesToEmbed\EntityModelDemo.msl;provider=System.Data.SqlClient;provider connection string="Data Source=MUZAFFAR-PC\SQLEXPRESS2008;Initial Catalog=dropthings;Integrated Security=True;User Instance=True;"" providerName="System.Data.EntityClient" />

Whereas for the App.config in the folder of Dropthings.Data, the connection string is as follows:-
<add name="DropthingsDataContext" connectionString="metadata=..\Dropthings.Data\obj\Debug\edmxResourcesToEmbed\EntityModelDemo.csdl|..\Dropthings.Data\obj\Debug\edmxResourcesToEmbed\EntityModelDemo.ssdl|..\Dropthings.Data\obj\Debug\edmxResourcesToEmbed\EntityModelDemo.msl;provider=System.Data.SqlClient;provider connection string="Data Source=.\SQLEXPRESS;AttachDbFilename=D:\work\dropthings\GoogleCode\trunk\src\Dropthings\App_Data\dropthings.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />

The files named:-
EntityModelDemo.csdl
EntityModelDemo.ssdl
EntityModelDemo.msl
Are located in the folder path:-
src\Dropthings.Data\obj\Debug\edmxResourcesToEmbed
Where src is the root folder.

I am attaching the root Web.config file for the Dropthings project.

I guess there is a problem in the connection string or there is some configuration issue for the Enterprise Library to work with the Dropthings.Data Project.

Kindly help me in this regards urgently. I am facing big problem.

file attachments

comments