blog.Toby

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  130 随笔 :: 2 文章 :: 150 评论 :: 0 Trackbacks
 

在调试ASP.net程序的时候,某某组件访问被拒绝。这时候重起IIS,电脑注销或者对ASP.NET 应用程序重新配置脚本映射(aspnet_regiis.exe -i)都不起作用。

出错信息:
说明: 在处理向该请求提供服务所需的配置文件时出错。请检查下面的特定错误详细信息并适当地修改配置文件。

分析器错误信息: 访问被拒绝:“Kind.DataAccess”。

源错误:

行 196:				<add assembly="System.EnterpriseServices, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
            行 197:				<add assembly="System.Web.Mobile, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
            行 198:				<add assembly="*"/>
            行 199:			</assemblies>
            行 200:		</compilation>

源文件: c:\winnt\microsoft.net\framework\v1.1.4322\Config\machine.config    行: 198

程序集加载跟踪: 下列信息有助于确定程序集“Kind.DataAccess”无法加载的原因。

=== Pre-bind state information ===
            LOG: DisplayName = Kind.DataAccess
            (Partial)
            LOG: Appbase = file:///D:/jmw.net/web
            LOG: Initial PrivatePath = bin
            Calling assembly : (Unknown).
            ===
            LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
            LOG: Post-policy reference: Kind.DataAccess
            LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/jmw.net/ebbe807a/6992844c/Kind.DataAccess.DLL.
            LOG: Attempting download of new URL file:///C:/WINNT/Microsoft.NET/Framework/v1.1.4322/Temporary ASP.NET Files/jmw.net/ebbe807a/6992844c/Kind.DataAccess/Kind.DataAccess.DLL.
            LOG: Attempting download of new URL file:///D:/jmw.net/web/bin/Kind.DataAccess.DLL.
            LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
            LOG: Post-policy reference: Kind.DataAccess, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null
            

搜索Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).

得知:
最常见的原因是Indexing service服务引起的。解决方法就是停用Indexing service,或配置ASP.net 的临时目录不受Indexing service服务的影响。

配置ASP.net 的临时目录不受Indexing service服务的影响的步骤如下:

1、开始 -- 管理工具 -- 计算机管理(Win2003的位置,其他操作系统类似)打开计算机管理
2、展开计算机管理左边树中“服务和应用程序”节点,再在其下展开“索引服务”节点,再在其下展开“System”节点,再在其下展开“目录”节点。
3、在计算机管理的右边我们可以看到配置的索引服务目录。
4、在“目录”节点上右击鼠标,选择“新建”--“目录”
5、在“添加目录”对话框中,路经输入框中输入 ASP.net 的临时文件目录。默认应该是:
c:\<WINDIR>\Microsoft.NET\Framework\<Version Number>\Temporary ASP.NET Files 目录。
<Version Number> 指你要处理的.net版本。
6、在“包含在索引中吗?”选项中,选择“否”
7、单击“确定”按钮
8、在“索引服务”节点上右键单击,重启索引服务即可。

posted on 2007-04-18 16:19 渠上月 阅读(377) 评论(0)  编辑  收藏 所属分类: other tips

只有注册用户登录后才能发表评论。


网站导航: