【问题标题】:Server Error in '/' Application. Unspecified error [ 5,sqlcese40.dll ]“/”应用程序中的服务器错误。未指定的错误 [5,sqlcese40.dll]
【发布时间】:2013-10-14 13:15:49
【问题描述】:

有人可以帮帮我吗?

昨天收到来自 Google 的一封电子邮件,通知我网站 (www.bigint.biz) 中的几个链接已损坏,我修复了它们。然后我对站点地图进行了更改。

之后,当访问该站点时,我收到消息:“/”应用程序中的服务器错误,运行时错误,此标记应将其“模式”属性设置为“关闭”。

因此,我将网站完全恢复到站点地图更改之前的状态;但是,我收到了 内部服务器错误 500 错误消息。

然后,我从主机提供商处删除了整个网站,并再次上传了原始版本,该版本运行良好,没有任何乐趣。

因为,我已将 customErrors 标签的“mode”属性设置为“Off”以获得更详细的错误消息 - 如下:


“/”应用程序中的服务器错误。 未指明的错误 [5,sqlcese40.dll]

说明:在执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详情:System.Data.SqlServerCe.SqlCeException:未指定错误 [5,sqlcese40.dll]

源错误:第 2 行:@{ 第 3 行:第 4 行:WebSecurity.InitializeDatabaseConnection("PhotoGallery", "UserProfile", "UserId", "Email", true);

源文件:\web-123win\winpackage22\XXX.COM\web\content_AppStart.cshtml 行:4

Stack Trace: 

[SqlCeException (0x80004005): Unspecified error [ 5,sqlcese40.dll ]]
   System.Data.SqlServerCe.SqlCeConnection.Open(Boolean silent) +2182
   System.Data.SqlServerCe.SqlCeConnection.Open() +47
   WebMatrix.Data.Database.EnsureConnectionOpen() +44
   WebMatrix.Data.<QueryInternal>d__0.MoveNext() +66
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +164
   WebMatrix.Data.Database.QuerySingle(String commandText, Object[] args) +103
   WebMatrix.WebData.DatabaseWrapper.QuerySingle(String commandText, Object[] parameters) +14
   WebMatrix.WebData.SimpleMembershipProvider.CheckTableExists(IDatabase db, String tableName) +57
   WebMatrix.WebData.SimpleMembershipProvider.CreateTablesIfNeeded() +49
   WebMatrix.WebData.WebSecurity.InitializeMembershipProvider(SimpleMembershipProvider simpleMembership, DatabaseConnectionInfo connect, String userTableName, String userIdColumn, String userNameColumn, Boolean createTables) +73
   WebMatrix.WebData.WebSecurity.InitializeProviders(DatabaseConnectionInfo connect, String userTableName, String userIdColumn, String userNameColumn, Boolean autoCreateTables) +51
   WebMatrix.WebData.WebSecurity.InitializeDatabaseConnection(String connectionStringName, String userTableName, String userIdColumn, String userNameColumn, Boolean autoCreateTables) +51
   ASP._Page__appstart_cshtml.Execute() in \\web-123win\winpackage22\bigint.biz\www.bigint.biz\web\content\_AppStart.cshtml:4
   System.Web.WebPages.ApplicationStartPage.<ExecuteInternal>b__0() +65
   System.Web.WebPages.ApplicationStartPage.<GetSafeExecuteStartPageThunk>b__3(Action action) +7
   System.Web.WebPages.ApplicationStartPage.ExecuteInternal() +78
   System.Web.WebPages.ApplicationStartPage.ExecuteStartPageInternal(HttpApplication application, Action`1 monitorFile, IVirtualPathFactory virtualPathFactory, IEnumerable`1 supportedExtensions) +184
   System.Web.WebPages.ApplicationStartPage.ExecuteStartPage(HttpApplication application, Action`1 monitorFile, IVirtualPathFactory virtualPathFactory, IEnumerable`1 supportedExtensions) +30

[HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
   System.Web.WebPages.ApplicationStartPage.ExecuteStartPage(HttpApplication application, Action`1 monitorFile, IVirtualPathFactory virtualPathFactory, IEnumerable`1 supportedExtensions) +96
   System.Web.WebPages.ApplicationStartPage.ExecuteStartPage(HttpApplication application) +170
   System.Web.WebPages.WebPageHttpModule.StartApplication(HttpApplication application, Action`1 executeStartPage, EventHandler applicationStart) +126
   System.Web.WebPages.WebPageHttpModule.StartApplication(HttpApplication application) +71
   System.Web.WebPages.WebPageHttpModule.Init(HttpApplication application) +127
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +418
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +336
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +296

[HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +9874568
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +101
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +254

我注意到当我再次使用 FileZilla Client 上传网站时,有 4 个文件无法复制到主机;但是,由于某些原因,它们最初没有被删除,所以相同的文件位于主机 bin 目录中 - 我认为是访问权限。这些文件是:

web/content/bin/X86/sqlceer40ENN.dll

web/content/bin/X86/sqlceqp40.dll

web/content/bin/X86/sqlcese40.dll

web/content/bin/X86/sqlceme40.dll


这只是巧合吗,因为错误消息引用了这些文件之一?

任何帮助将不胜感激。

谢谢。

编辑 - 我在这里找到了更多信息,但我很难理解它如何帮助我:http://www.blakepell.com/Blog/?p=227

通过删除 WebSecurity.InitializeDatabaseConnection("PhotoGallery", "UserProfile", "UserId", "Email", true);

但问题依然存在

【问题讨论】:

  • 我认为问题出在连接字符串上
  • 谢谢萨吉尔。能不能说的具体点?
  • 同意@Saghir,但这可能是一个 dll 问题,因为它以前可以工作,但自从 dll 文件上传失败后就没有了。如果您需要的一切都在您的解决方案输出中,那么请始终进行干净上传,即删除目标上的现有文件,以便仅添加文件,不进行更新。
  • 谢谢。出于某种原因,当我从 web 主机中删除所有文件时,bin 文件夹内容与 dll 的剩余部分?如果没有其他解决方案,我将尝试重新设置 Web 内容文件夹(根目录)并重试。
  • 听起来越来越像dll文件问题了,好像连执行都执行不了,把那些小狗撕掉!

标签: c# .net sql sql-server-2008 asp.net-mvc-4


【解决方案1】:

我今天又遇到了这个问题,并通过研究找到了解决方案。我就是这样到达那里的。

按照上面的建议替换 dll 文件以前不起作用。

所以,我关闭了自定义错误页面,重新开始,这使我能够再次访问错误代码。

我在 Google 上搜索了该错误,研究指出存在连接字符串问题或文件夹权限问题。

很好,我再次检查了权限,因为我之前在 App_Data 文件夹中设置了文件夹权限,其中 .sdf 数据库用于使用 FileZilla 启用读写访问,但实际上没有任何改变。它似乎有效,因为更改似乎通过所有子目录向下级联,但它不起作用。

使用 FTP 方法实际上并没有更改权限,尽管看起来它已经发生了。我只是发现,因为我今天看到的另一篇帖子建议通过控制面板更改权限,所以我回到那里检查它们只是看到文件夹旁边的挂锁。

所以,我这次在控制面板文件管理器中正确解锁了 App_Data 的文件夹权限。然后我再次在_AppStart页面中取消注释下面的网络安全代码并在线尝试该站点并且它有效。

最后,我将自定义错误重新设置为开启。

道德是使用控制面板而不是 FTP 客户端来更改托管文件夹的文件夹权限。我希望这对其他人有帮助。

【讨论】:

    猜你喜欢
    • 2017-09-18
    • 2019-05-07
    • 2015-10-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-20
    • 2015-10-30
    • 1970-01-01
    相关资源
    最近更新 更多