[英]ASP.net Web Page Database error
Hi here is my cshtml code: 嗨,这是我的cshtml代码:
@{
var db = Database.Open("SiteDB");
var sqlQ = "SELECT * FROM Favorite";
var data = db.Query(sqlQ);
}
<div id="movieslist">
<ol>
@foreach(var row in data)
{
<li><a href= "#">@row.Name, @row.Category, @row.ReleaseYear
</a></li>
}
</ol>
</div>
sqlDB.sdf is local. sqlDB.sdf是本地的。 I get this error when I run a site:
运行网站时出现此错误:
Keyword not supported: 'file access retry timeout'. 不支持关键字:“文件访问重试超时”。 Description: An unhandled exception occurred during the execution of the current web request.
说明:执行当前Web请求期间发生未处理的异常。 Please review the stack trace for more information about the error and where it originated in the code.
请查看堆栈跟踪,以获取有关错误及其在代码中起源的更多信息。
Exception Details: System.ArgumentException: Keyword not supported: 'file access retry timeout'. 异常详细信息:System.ArgumentException:不支持关键字:“文件访问重试超时”。
Source File: c:\\Users\\Saheed\\Documents\\My Web Sites\\My Empty Site\\dataMovies.cshtml Line: 4 源文件:c:\\ Users \\ Saheed \\ Documents \\ My Web Sites \\ My空站点\\ dataMovies.cshtml行:4
Please tell me what I am doing wrong. 请告诉我我在做什么错。
Thanks 谢谢
连接字符串(在Web.config中)中的file access retry timeout
无效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.