Parser Error Message: Access is denied

本文介绍了解决在运行Microsoft Index Services时修改代码导致的ASP.NET页面加载失败问题。当修改了Bin目录或Web.config文件后,可能会遇到访问权限被拒绝的错误。文章提供了两种解决方案:禁用Index Services或排除临时文件夹。
 

PRB: Access Denied Error When You Make Code Modifications with Index Services Running

Article ID:329065
Last Review:June 25, 2004
Revision:3.0
This article was previously published under Q329065

SYMPTOMS

When you access a page after an AppDomain load, for example, when you modify the Bin directory or the Web.config file on computers running Microsoft Index Services, you may receive the following error message:

Server Error in '/MyWebApp' Application

Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Access is denied: 'mydll'.

Source Error:

Line 169:   <add assembly=<System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a>/>
 
Line 170:    <add assembly=<System.EnterpriseServices, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a>/>
Line 171:    <add assembly=<*>/>
Line 172:    </assemblies>
Line 173:    
					
Source File: c:/winnt/microsoft.net/framework/v1.0.3705/Config/machine.config Line: 171
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0
If you right-click the page in the browser, and then click View Source, you see that the HTML source code reveals additional information, including the following call stack.
[FileLoadException]: Access is denied: 'MyWebApp'.<BR/>
   at System.Reflection.Assembly.nLoad(AssemblyName fileName, Boolean isStringized, Evidence assemblySecurity, Boolean throwOnFileNotFound, Assembly locationHint, StackCrawlMark&amp; stackMark)<BR/>
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Boolean stringized, Evidence assemblySecurity, StackCrawlMark&amp; stackMark)<BR/>
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark&amp; stackMark)<BR/>
   at System.Reflection.Assembly.Load(String assemblyString)<BR/>
   at System.Web.UI.CompilationConfiguration.LoadAssemblies(Hashtable original)<BR/>
[ConfigurationException]: Access is denied: 'MyWebApp'.<BR/>
(d:/winxp/microsoft.net/framework/v1.0.3215/Config/machine.config line 145)<BR/>
   at System.Web.UI.CompilationConfiguration.LoadAssemblies(Hashtable original)<BR/>
   at System.Web.UI.CompilationConfiguration.get_Assemblies()<BR/>
   at System.Web.UI.CompilationConfiguration.GetAssembliesFromContext(HttpContext context)<BR/>
   at System.Web.UI.TemplateParser.AppendConfigAssemblies()<BR/>
   at System.Web.UI.TemplateParser.PrepareParse()<BR/>
   at System.Web.UI.TemplateParser.Parse()<BR/>
   at System.Web.UI.TemplateParser.GetParserCacheItemThroughCompilation()<BR/>
   at System.Web.UI.TemplateParser.GetParserCacheItemInternal(Boolean fCreateIfNotFound)<BR/>
   at System.Web.UI.TemplateParser.GetParserCacheItemWithNewConfigPath()<BR/>
   at System.Web.UI.TemplateParser.GetParserCacheItem()<BR/>
   at System.Web.UI.ApplicationFileParser.GetCompiledApplicationType(String inputFile, HttpContext context, ApplicationFileParser&amp; parser)<BR/>
   at System.Web.HttpApplicationFactory.CompileApplication(HttpContext context)<BR/>
   at System.Web.HttpApplicationFactory.Init(HttpContext context)<BR/>
   at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)<BR/>
   at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
					

CAUSE

If you run Index Server (Cisvc.exe), then Index Server may rescan the Temporary ASP.NET Files directory while it requests a Microsoft ASP.NET page. Cisvc.exe then holds a lock on the Temporary ASP.NET Files directory for one to five minutes. The length of time of the lock depends on the size of the directory that causes the Aspnet_wp.exeprocess (or W3wp.exe process for applications that run on Microsoft Internet Information Services [IIS] 6.0) to not load the particular DLL.

RESOLUTION

If you do not use Index Server on the server, you can disable it. To do so, follow these steps:
1.Click Start, and then click Services.
2.Locate Indexing Service from the list of services, and then click Indexing Service Properties from the subform.
3.On the General tab of the Indexing Service Properties dialog box, in the Startup type drop-down item list, click Disabled.
4.Click OK.

If you use Index Server, you can exclude the Temporary ASP.NET Files directory from the folders that the Index Server scans. To do so, follow these steps:
1.Click Start, point to All Programs, point to Administrative Tools, and then click Computer Management.
2.Expand the Services and Applications node, expand the Indexing Service node, and then expand the System node.
3.Right-click the Directories folder, point to New, and then click Directory from the subform to open the Add Directory dialog box.
4.Click Browse, and then locate the Temporary ASP.NET Files directory. You typically find the Temporary ASP.NET files in the following path: c:/<WINDIR>/Microsoft.NET/Framework/<Version Number>/Temporary ASP.NET Files
Note<Version Number> is the version of .NET Framework installed on your computer.
5.Click No under the Include in Index? option buttons.
6.Click OK to close.
7.Close the Computer Management dialog box.
8.Restart the Indexing Services service.

MORE INFORMATION

Other software that is designed to scan directories at regular intervals may lock the files that are located in the Temporary ASP.NET Files directory in a manner that is similar to how the Indexing Service locks the files. Examples of such software include virus scanners and backup software. Microsoft recommends that you see the manufacturers' manuals for the individual software for information about how to disable or to exclude the Temporary ASP.NET Files from these services.
我在部署ghost是,日志中报错说连接不上数据库,但是我确实检查过,在worker节点上确保能够连接上数据库的,但是启动容器不成功,任然报错说链接不上数据库。并且我不能够进入容器中去测试,[root@k8s-master-01 ghost]# kubectl logs -n ghost pod/ghost-559688f9f5-9s7hk [2025-10-09 06:13:14] INFO Ghost is running in production... [2025-10-09 06:13:14] INFO Your site is now available on https://myghost.com/ [2025-10-09 06:13:14] INFO Ctrl+C to shut down [2025-10-09 06:13:14] INFO Ghost server started in 0.326s [2025-10-09 06:13:14] ERROR Access denied for user 'ghost_user'@'192.168.161.21' (using password: YES) Access denied for user 'ghost_user'@'192.168.161.21' (using password: YES) "Unknown database error" Error ID: 500 Error Code: ER_ACCESS_DENIED_ERROR ---------------------------------------- Error: Access denied for user 'ghost_user'@'192.168.161.21' (using password: YES) at /var/lib/ghost/versions/5.130.5/node_modules/knex-migrator/lib/database.js:57:19 at Packet.asError (/var/lib/ghost/versions/5.130.5/node_modules/mysql2/lib/packets/packet.js:740:17) at ClientHandshake.execute (/var/lib/ghost/versions/5.130.5/node_modules/mysql2/lib/commands/command.js:29:26) at Connection.handlePacket (/var/lib/ghost/versions/5.130.5/node_modules/mysql2/lib/base/connection.js:475:34) at PacketParser.onPacket (/var/lib/ghost/versions/5.130.5/node_modules/mysql2/lib/base/connection.js:93:12) at PacketParser.executeStart (/var/lib/ghost/versions/5.130.5/node_modules/mysql2/lib/packet_parser.js:75:16) at Socket.<anonymous> (/var/lib/ghost/versions/5.130.5/node_modules/mysql2/lib/base/connection.js:100:25) at Socket.emit (node:events:524:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) [2025-10-09 06:13:14] WARN Ghost is shutting down [2025-10-09 06:13:14] WARN Ghost has shut down [2025-10-09 06:13:14] WARN Your site is now offline [2025-10-09 06:13:14] WARN Ghost was running for a few seconds [root@k8s-master-01 ghost]# [root@k8s-master-01 ghost]# mysql -u root -p -P 9999 Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 33 Server version: 8.0.43 MySQL Community Server - GPL Copyright (c) 2000, 2025, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> mysql> mysql> SHOW GRANTS FOR 'ghost_user'@'%'; +----------------------------------------------------------+ | Grants for ghost_user@% | +----------------------------------------------------------+ | GRANT USAGE ON *.* TO `ghost_user`@`%` | | GRANT ALL PRIVILEGES ON `ghost_db`.* TO `ghost_user`@`%` | +----------------------------------------------------------+ 2 rows in set (0.00 sec) mysql> SHOW DATABASES LIKE 'ghost_db'; +---------------------+ | Database (ghost_db) | +---------------------+ | ghost_db | +---------------------+ 1 row in set (0.00 sec) [root@k8s-master-01 ghost]# kubectl describe -n ghost pod/ghost-559688f9f5-9s7hk Name: ghost-559688f9f5-9s7hk Namespace: ghost Priority: 0 Service Account: default Node: k8s-worker-01/192.168.161.21 Start Time: Thu, 09 Oct 2025 11:29:23 +0800 Labels: app=ghost pod-template-hash=559688f9f5 Annotations: cni.projectcalico.org/containerID: d46b264ebcbeb155c557aa768da594f10d80297099dc50a09375c4ddc6c190fd cni.projectcalico.org/podIP: 10.244.36.204/32 cni.projectcalico.org/podIPs: 10.244.36.204/32 Status: Running IP: 10.244.36.204 IPs: IP: 10.244.36.204 Controlled By: ReplicaSet/ghost-559688f9f5 Containers: ghost: Container ID: containerd://ffada9b9497cac0548b59bea62cd5a08fbeee62b867ec2b56138abf7a4762da3 Image: docker.io/library/ghost:5-alpine Image ID: sha256:14cce4a7227c7ac6f58299675079ab7f980d37f427b7099e38ac4970ad8de38e Port: 2368/TCP Host Port: 0/TCP State: Waiting Reason: CrashLoopBackOff Last State: Terminated Reason: Error Exit Code: 2 Started: Thu, 09 Oct 2025 11:30:56 +0800 Finished: Thu, 09 Oct 2025 11:30:56 +0800 Ready: False Restart Count: 4 Liveness: http-get http://:2368/ delay=60s timeout=1s period=10s #success=1 #failure=3 Readiness: http-get http://:2368/ delay=5s timeout=1s period=5s #success=1 #failure=3 Environment: url: https://myghost.com database__client: mysql database__connection__host: <set to the key 'mysql-host' in secret 'ghost-secrets'> Optional: false database__connection__port: <set to the key 'mysql-port' in secret 'ghost-secrets'> Optional: false database__connection__user: <set to the key 'mysql-user' in secret 'ghost-secrets'> Optional: false database__connection__password: <set to the key 'mysql-password' in secret 'ghost-secrets'> Optional: false database__connection__database: <set to the key 'mysql-database' in secret 'ghost-secrets'> Optional: false Mounts: /var/lib/ghost/content from ghost-content (rw) /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-lwccv (ro) Conditions: Type Status PodReadyToStartContainers True Initialized True Ready False ContainersReady False PodScheduled True Volumes: ghost-content: Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace) ClaimName: ghost-pvc ReadOnly: false kube-api-access-lwccv: Type: Projected (a volume that contains injected data from multiple sources) TokenExpirationSeconds: 3607 ConfigMapName: kube-root-ca.crt ConfigMapOptional: <nil> DownwardAPI: true QoS Class: BestEffort Node-Selectors: <none> Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 2m18s default-scheduler Successfully assigned ghost/ghost-559688f9f5-9s7hk to k8s-worker-01 Normal Pulled 45s (x5 over 2m18s) kubelet Container image "docker.io/library/ghost:5-alpine" already present on machine Normal Created 45s (x5 over 2m18s) kubelet Created container: ghost Normal Started 45s (x5 over 2m18s) kubelet Started container ghost Warning BackOff 12s (x17 over 2m16s) kubelet Back-off restarting failed container ghost in pod ghost-559688f9f5-9s7hk_ghost(85717ba6-7964-445d-b129-29c6a04a503b)
10-10
NETCONF Global Session Lock The NETCONF protocol provides a set of operations to manage device configurations and retrieve device state information. NETCONF supports a global lock, and the ability to kill non-responsive sessions are introduced in NETCONF. To ensure consistency and prevent conflicting configurations through multiple simultaneous sessions, the owner of the session can lock the NETCONF session. The NETCONF lock RPC locks the configuration parser and the running configuration database. All other NETCONFsessions(that do not own the lock) cannot perform edit operations; but can perform read operations. These locks are intended to be short-lived and allow the owner to make changes without interaction with other NETCONF clients, non-NETCONF clients (such as, SNMP and CLI scripts), and human users. A global lock held by an active session is revoked when the associated session is killed. The lock gives the session holding the lock exclusive write access to the configuration. When a configuration change is denied due to a global lock, the error message willspecify that a NETCONFglobal lock isthe reason the configuration change has been denied. The <lock> operation takes a mandatory parameter, <target> that is the name of the configuration datastore that is to be locked. When a lock is active, the <edit-config> and <copy-config> operations are not allowed. If the clear configuration lock command is specified while a NETCONF global lock is being held, a full synchronization of the configuration is scheduled and a warning syslog message is produced. This command clears only the parser configuration lock. The following is a sample RPC that shows the <lock> operation: 请你总结提炼以上这段话中体现的功能重点,向我介绍它干了什么
09-03
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值