File Access Retry Timeout

Discussion in 'Databases' started by Ianae, Oct 30, 2012.

  1. Hello, I've ran into what I think is a database issue.

    When I try to go to a new page (/Entersubject.cshtml), I run into an error on the live website "File Access Retry Timeout". When I do the exact same thing on my local machine, it works.

    The code it gets stuck on is this:

    Code:
    foreach(var row in db.Query(siteNameQuery))
    Before that call I have the query defined as:

    Code:
    var siteNameQuery = "SELECT * FROM UProfile";
    And in here is my call to the db:

    Code:
    var db = Database.OpenConnectionString("Data Source=|DataDirectory|\\Random.sdf", "System.Data.SqlServerCe.4.0");

    I feel like there is a compatibility issue on the Winhost server, but I'm not sure.

    Any ideas?
     
    Last edited by a moderator: Oct 14, 2015
  2. Here is the stack trace:

    [ArgumentException: Keyword not supported: 'file access retry timeout'.]
    System.Data.SqlServerCe.SqlCeConnectionStringBuilder.GetIndex(String keyword) +156
    System.Data.SqlServerCe.SqlCeConnectionStringBuilder.set_Item(String keyword, Object value) +31
    System.Data.Common.DbConnectionStringBuilder.set_ConnectionString(String value) +185
    System.Data.SqlServerCe.SqlCeConnectionStringBuilder..ctor(String connectionString) +138
    System.Data.SqlServerCe.SqlCeConnection.set_ConnectionString(String value) +229
    WebMatrix.Data.DbProviderFactoryWrapper.CreateConnection(String connectionString) +96
    WebMatrix.Data.<>c__DisplayClass15.<OpenConnectionStringInternal>b__14() +16
    WebMatrix.Data.Database.get_Connection() +19
    WebMatrix.Data.Database.EnsureConnectionOpen() +13
    WebMatrix.Data.<QueryInternal>d__0.MoveNext() +72
    System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +327
    System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
    WebMatrix.Data.Database.Query(String commandText, Object[] parameters) +97
    ASP._Page_EnterSubject_cshtml.Execute() in e:\web\srirando\EnterSubject.cshtml:192
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +209
    System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +68
    System.Web.WebPages.WebPage.ExecutePageHierarchy() +123
    System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
    System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +121
     
  3. Elshadriel

    Elshadriel Winhost Staff

    I'm not sure what the problem is, but you might want to focus on this:

    I also noticed in the database connection string, you used two backslashes ("\\"). Try one?
     

Share This Page