httpsndler用于虚拟目录(网络共享)上的文件 [英] httphandler for files on a virtual directory (of a network share)

查看:111
本文介绍了httpsndler用于虚拟目录(网络共享)上的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

第1阶段:在公司网站上使用asp.net 4.x(IIS 6.0),所有网页都能正确显示,包括本地存储的页面,以及存储在(虚拟目录)网络共享名为\\MyServer \ MyDocumentation $。要访问网络共享,我使用的是IUSR_MYWEBSITE和手动设置的密码(不是由服务器管理),它与文件服务器上的用户名和密码相匹配。这工作正常,所有链接都可以正常工作,并显示页面是本地还是共享,包括.mht和.htm文件。



第2阶段:我设计了自己的HttpHandler来控制对.mht和.htm文件的访问,并为.htm和.mht文件设置应用程序扩展映射(aspnet_isapi.dll,所有动词)。我还在web.config中创建了所需的条目(add path =*。mhtverb =*type =MyHttpHandler/。)这适用于本地存储的mht或htm页面(在Web服务器上),但不适用于虚拟目录(网络共享)上的页面(.mht和.htm)。错误如下所示。当我删除应用程序扩展映射时,链接再次工作正常,但没有使用HttpHandler。



我试图设置我认为可以设置的任何权限,但到目前为止尝试都是徒劳的。



任何帮助将不胜感激。



Phase 1: Using asp.net 4.x (IIS 6.0) for the company's website, all web pages display correctly, both where locally stored pages are concerned, as well as pages stored on a (virtual directory) network share called \\MyServer\MyDocumentation$. To access the network share I am using IUSR_MYWEBSITE and a manually set up password (not managed by the server), which matches a username and password on the file server. This works fine and all links work ok and show the pages whether these are local or on the share, including .mht and .htm files.

Phase 2: I designed my own HttpHandler to control access to .mht and .htm files, and set up Application Extension Mappings for .htm and .mht files (aspnet_isapi.dll, all verbs). I also made the required entry in web.config (add path="*.mht" verb="*" type="MyHttpHandler" /.) This works fine for locally stored mht or htm pages (on the web-server), but not for the pages (.mht and .htm) on the virtual directory (network share). The error is listed below. When I remove the Application Extension Mappings then links work fine once again but the HttpHandler is not being used.

I have tried to set whatever permissions I thought could be set but attempts have so far been futile.

Any help would be greatly appreciated.

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: An error occurred loading a configuration file: Failed to start monitoring changes to '\\MyWebSite\MyDocumentation$ because access is denied.

Source Error:
[No relevant source lines]

Source File: \\MyWebSite\MyDocumentation$\web.config    Line: 0

推荐答案

。要访问网络共享,我使用的是IUSR_MYWEBSITE和手动设置的密码(不是由服务器管理),它与文件服务器上的用户名和密码相匹配。这工作正常,所有链接都可以正常工作,并显示页面是本地还是共享,包括.mht和.htm文件。



第2阶段:我设计了自己的HttpHandler来控制对.mht和.htm文件的访问,并为.htm和.mht文件设置应用程序扩展映射(aspnet_isapi.dll,所有动词)。我还在web.config中创建了所需的条目(add path =*。mhtverb =*type =MyHttpHandler/。)这适用于本地存储的mht或htm页面(在Web服务器上),但不适用于虚拟目录(网络共享)上的页面(.mht和.htm)。错误如下所示。当我删除应用程序扩展映射时,链接再次工作正常,但没有使用HttpHandler。



我试图设置我认为可以设置的任何权限,但到目前为止尝试都是徒劳的。



任何帮助将不胜感激。



. To access the network share I am using IUSR_MYWEBSITE and a manually set up password (not managed by the server), which matches a username and password on the file server. This works fine and all links work ok and show the pages whether these are local or on the share, including .mht and .htm files.

Phase 2: I designed my own HttpHandler to control access to .mht and .htm files, and set up Application Extension Mappings for .htm and .mht files (aspnet_isapi.dll, all verbs). I also made the required entry in web.config (add path="*.mht" verb="*" type="MyHttpHandler" /.) This works fine for locally stored mht or htm pages (on the web-server), but not for the pages (.mht and .htm) on the virtual directory (network share). The error is listed below. When I remove the Application Extension Mappings then links work fine once again but the HttpHandler is not being used.

I have tried to set whatever permissions I thought could be set but attempts have so far been futile.

Any help would be greatly appreciated.

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: An error occurred loading a configuration file: Failed to start monitoring changes to '\\MyWebSite\MyDocumentation


的更改,因为访问被拒绝。

来源错误:
[无相关源代码行]

源文件:\\MyWebSite \ MyDocumentation
because access is denied. Source Error: [No relevant source lines] Source File: \\MyWebSite\MyDocumentation


\web.config行:0
\web.config Line: 0


这篇关于httpsndler用于虚拟目录(网络共享)上的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆