I am receiving the following error which I believe is a problem with my connection string on GoDaddy. I've copied from an example on Stack Overflow, but it doesn't seem to work. The first part of the stack trace that I'm getting is:

[MetadataException: Unable to load the specified metadata resource.]
System.Data.Metadata.Edm.MetadataArtifactLoaderCompositeResource.LoadResources(String assemblyName, String resourceName, ICollection`1 uriRegistry, MetadataArtifactAssemblyResolver resolver) +2184231

I have a solution with only one project and, of course, the edmx is in that project.

Here is my connection string:

<add name="FCGUIDE_Entities"
         connectionString="
            metadata=res://*/CoreModel.csdl|res://*/CoreModel.ssdl|res://*/CoreModel.msl;
            provider=System.Data.SqlClient;
            provider connection string='
                Data Source=susanbfarrar.db.9319451.hostedresource.com;
                Initial Catalog=susanbfarrar;       
                integrated security=False;
                multipleactiveresultsets=True;
                App=EntityFramework; 
                User ID=*****;
                Password=*****
                Database=*****;'"
         providerName="System.Data.EntityClient" />
有帮助吗?

解决方案

Could you replace ' with &quot; and try it again?

<add name="FCGUIDE_Entities"
         connectionString="
            metadata=res://*/CoreModel.csdl|res://*/CoreModel.ssdl|res://*/CoreModel.msl;
            provider=System.Data.SqlClient;
            provider connection string=&quot;
                Data Source=susanbfarrar.db.9319451.hostedresource.com;
                Initial Catalog=susanbfarrar;       
                integrated security=False;
                multipleactiveresultsets=True;
                App=EntityFramework; 
                User ID=*****;
                Password=*****
                Database=*****;&quot;"
         providerName="System.Data.EntityClient" />

You already have Initial Catalog, so remove Database

Password=*****Database=*****;&quot;

Like this -

Password=*****;&quot;
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top