简体   繁体   中英

ASP.net Web Page Database error

Hi here is my cshtml code:

@{
    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. 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. 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'.

Source File: c:\\Users\\Saheed\\Documents\\My Web Sites\\My Empty Site\\dataMovies.cshtml Line: 4

Please tell me what I am doing wrong.

Thanks

连接字符串(在Web.config中)中的file access retry timeout无效。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM