Unable to load the specified metadata resource
Posted xsj1989
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Unable to load the specified metadata resource相关的知识,希望对你有一定的参考价值。
本地运行都正常,就是发布到服务器上不行,查找了一些文章,都没解决我的问题,后来发现是路径不对和文件缺失。
原来的配置文件中是这样的:
<add name="TRidentityEntities" connectionString="metadata=res://*/TRidentityModel.csdl|res://*/TRidentityModel.ssdl|res://*/TRidentityModel.msl;provider=mysql.Data.MySqlClient;provider connection string="server=localhost;user id=root;password=xxxxxx;persistsecurityinfo=True;database=xxxxxx;Character Set=utf8"" providerName="System.Data.EntityClient" />
修改一下:
<add name="TRidentityEntities" connectionString="metadata=~/bin/TRidentityDB\TRidentityModel.csdl|~/bin/TRidentityDB\TRidentityModel.ssdl|~/bin/TRidentityDB\TRidentityModel.msl;provider=MySql.Data.MySqlClient;provider connection string="server=localhost;user id=root;password=xxxxxx;database=xxxxxx;Character Set=utf8"" providerName="System.Data.EntityClient" />
.csdl/.ssdl/.msl这三个文件你编译的时候会在你项目的bin目录中,copy过来就行了。
以上是关于Unable to load the specified metadata resource的主要内容,如果未能解决你的问题,请参考以下文章
System.DllNotFoundException: Unable to load DLL 'libgdiplus': The specified module could not
解决Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
php https://expressionengine.com/forums/topic/160486/views-unable-to-load-the-requested-file#773142
Unable to load dbxmss.dll (ErrorCode 16). It may be missing from the system Path
Unable to load vocabulary from file. Please check that the provided vocabulary is accessible and not