标签归档:aspx

操作必须使用一个可更新的查询。

作必须使用一个可更新的查询。 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.Exception: 操作必须使用一个可更新的查询。

Source Error:

Line 75:         catch (Exception e)
Line 76:         {
Line 77:             throw new Exception(e.Message);
Line 78:         }
Line 79:         finally

Source File: f:\asp.netweb\mgsfood\www\cn\App_Code\DBFun.cs    Line: 77

Stack Trace:

该问题基本也由于权限问题引起,基本上.NET用户缺少写入权限造成,对该网站目录的.NET所需用户都添加一个写入权限,问题马上解决。

asp.net 网站目录所需的权限 Server Application Unavailable

打开ASP.NET 网页出现:
Server Application Unavailable
The web application you are attempting to access on this web server is currently unavailable. Please hit the “Refresh” button in your web browser to retry your request.
Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.

系统日志出现

事件类型: 错误
事件来源:  2.0.50727.0
事件种类: 无
事件 ID: 1088
日期:  2010-4-6
事件:  21:44:43
用户:  N/A
计算机: XXXXXXX
描述:
Failed to execute request because the App-Domain could not be created. Error: 0x80070005 拒绝访问。 

事件类型: 错误
事件来源: ASP.NET 2.0.50727.0
事件种类: 无
事件 ID: 1334
日期:  2010-4-6
事件:  21:44:43
用户:  N/A
计算机: 4B9JBIX9M9UC98G
描述:
Failed to initialize the AppDomain:/LM/W3SVC/318331351/Root/en

Exception: System.IO.FileLoadException

Message: Could not load file or assembly ‘System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. 拒绝访问。

StackTrace:    at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Activator.CreateInstance(String assemblyName, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)
   at System.Activator.CreateInstance(String assemblyName, String typeName)
   at System.AppDomain.CreateInstance(String assemblyName, String typeName)
   at System.AppDomain.CreateInstance(String assemblyName, String typeName)
   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)

解决办法,该问题主要是由于网站文件夹权限问题引起,该网站文件夹下添加下面几个用户可以解决。

ASP.NET
IWAM_XXXXXXXX  该用户为默认的IIS站点用户。可以换成其他的。
Local_Service
Network_Service
System