![](/img/trans.png)
[英]An unhandled exception occurred during the execution of the current web request. Model compatibility cannot be checked
[英]How to fix "An unhandled exception occurred during the execution of the current web request. "
由于错误清楚地表明您的连接字符串格式错误。
<connectionStrings>
<add name="WebSqlConnectionString" connectionString="Data Source=MXOLISI\MSSQLSERVER2,1432;
database=NCEDA2014; User ID=NCEDA14;Password=7n63rDYtp38Ymfd;"/>
</connectionStrings>
您在分号后放置了端口号,这是不正确的,它应该在服务器名称之后。
首先尝试以下步骤:
打开 SQL 服务器并尝试使用配置文件中提到的凭据访问数据库。 如果它工作正常,请执行下一步。
检查您的连接字符串。 当您的连接字符串出现问题时,请使用以下代码:
<add key="myConnectionString" value="server=localhost;database=myDb;uid=myUser;password=myPass;" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.