1

有人能帮帮我吗?

昨天收到来自 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

网页/内容/bin/X86/sqlceqp40.dll

网页/内容/bin/X86/sqlcese40.dll

网页/内容/bin/X86/sqlceme40.dll


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

任何帮助将非常感激。

谢谢你。

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

我已经通过删除:WebSecurity.InitializeDatabaseConnection("PhotoGallery", "UserProfile", "UserId", "Email", true); 让网站备份并运行了一分钟。

但问题依然存在

4

1 回答 1

0

一直到今天,我又重新发现了这个问题,并通过研究找到了解决方案。这就是我到达那里的方式。

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

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

我用谷歌搜索了这个错误,研究指出了连接字符串问题或文件夹权限问题。

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

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

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

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

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

于 2014-07-29T17:09:30.607 回答