访问路径....被拒绝 [英] Access to the path .... is denied

查看:99
本文介绍了访问路径....被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


一周前我为这个问题创建了一个较旧的thead,但后来

我有一些假期,并且不能参与。

基本上我正在访问路径路径名称当我在我的生产服务器上执行以下代码时,我们被拒绝了(W2003)


Dim myFolder As String = Server.MapPath(" .. \ .. \..\sDirectory \")

Dim FileName As String


对于Directory.GetFiles中的每个FileName(myFolder," * .doc")

Response.Write(FileName)

退出

下一页


这段代码在我的测试机上运行得很好(Windows XP)


sDirectory是一个虚拟目录。

Anonymous被关闭。

选择了Windows域服务器的DIgest身份验证。

选择基本身份验证。

..Net密码身份验证未被选中。

文件权限:

管理员(Domain \Administrator)

aspnet_wp帐户(computerName\ASPNET)

经过身份验证的用户

每个人

我在web.confi中不使用身份模仿g。

我发现很多关于这个问题的讨论,不幸的是还是

我自己无法解决它...

Hi there,

There was older thead i created for that question a week ago, but then
I had some sort of vacations, and couldn''t participate.
Basically I am getting Access to the path "Path name" is denied when I
execute the following code on my production server (W2003)

Dim myFolder As String = Server.MapPath("..\..\..\sDirectory\")
Dim FileName As String

For Each FileName In Directory.GetFiles(myFolder , "*.doc")
Response.Write(FileName)
Exit For
Next

This code will run just fine on my testing machine (Windows XP)

sDirectory is a virtual directory.
Anonymous is turned off.
DIgest authentication for Windows domain servers is selected.
Basic authentication is selected.
..Net Password authentication is not selected.
Permissions on the file:
Administrator (Domain\Administrator)
aspnet_wp account (computerName\ASPNET)
Authenticated Users
Everyone
I don''t use identity impersonate in my web.config.
I found many discussions regarding that problem, unfortunatelly still
cannot resolve it by myself...

推荐答案

我知道这听起来很糟糕,但是你看了一下填充的myFolder

字符串变量来查看实际翻译的路径是什么,以及是否

有效吗?您可以对此进行跟踪写入并暂时打开页面跟踪

来查看它。


否则,您的应用运行的身份(无论是ASPNET)帐户IUSR

或者其他配置)需要在目标计算机上具有

此文件夹所需的权限。


Peter


-

联合创始人,Eggheadcafe.com开发者门户网站:
http://www.eggheadcafe.com

UnBlog:
http://petesbloggerama.blogspot.com


" j_****@hotmail.com"写道:
I know this sounds hokey, but have you looked at the populated myFolder
string variable to see what the translated path actually is, and whether it
is valid? You could do a Trace write of this and turn on page tracing
temporarily to see it.

Otherwise, the identity your app runs under (whether the ASPNET account IUSR
or however else it''s configured) needs to have the required permissions on
this folder on the target machine.

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"j_****@hotmail.com" wrote:
你好,

我一周前为那个问题创建了一个较旧的thead,但是后来我有一些假期,并且无法参与。
基本上我正在访问路径路径名称。当我在生产服务器上执行以下代码时被拒绝(W2003)

Dim myFolder As String = Server.MapPath(" .. \..\..\ sDirectory \")
Dim FileName As String

对于Directory.GetFiles中的每个FileName(myFolder," * .doc")
Response.Write(FileName)<退出
下一步

这段代码在我的测试机上运行得很好(Windows XP)

sDirectory是一个虚拟目录。
Anonymous已关闭。
选择了Windows域服务器的DIgest身份验证。
选择了基本身份验证。
..未选择密码身份验证。
文件权限:<管理员(Domain \ Administrator)
aspnet_wp帐户(computerName\ASPNET)
经过身份验证的用户
每个人
我不会在我的web.config中使用身份模拟。

我发现很多关于这个问题的讨论,不幸的是lly仍然无法自己解决...
Hi there,

There was older thead i created for that question a week ago, but then
I had some sort of vacations, and couldn''t participate.
Basically I am getting Access to the path "Path name" is denied when I
execute the following code on my production server (W2003)

Dim myFolder As String = Server.MapPath("..\..\..\sDirectory\")
Dim FileName As String

For Each FileName In Directory.GetFiles(myFolder , "*.doc")
Response.Write(FileName)
Exit For
Next

This code will run just fine on my testing machine (Windows XP)

sDirectory is a virtual directory.
Anonymous is turned off.
DIgest authentication for Windows domain servers is selected.
Basic authentication is selected.
..Net Password authentication is not selected.
Permissions on the file:
Administrator (Domain\Administrator)
aspnet_wp account (computerName\ASPNET)
Authenticated Users
Everyone
I don''t use identity impersonate in my web.config.
I found many discussions regarding that problem, unfortunatelly still
cannot resolve it by myself...



re:
Dim myFolder As String = Server.MapPath(" .. \..\..\sDirectory \")
sDirectory是一个虚拟目录。


您是否将AspEnableParentPaths设置为true?

为了提高安全性,默认情况下禁用父路径。

http://msdn.microsoft.com/library/de...1ed541e3a5.asp


Juan T. Llibre,asp。净MVP

aspnetfaq.com: http://www.aspnetfaq.com /

asp.net faq: http:/ /asp.net.do/faq/

foros de asp.net,en espa?ol: http://asp.net.do/foros/

=============== ====================

< j _ **** @ hotmail.com>在留言新闻中写道:11 ******************** @ g10g2000cwb.googlegrou ps.com ...你好,

年龄较大我一个星期前为这个问题创建的那个,但是后来我有一些假期,并且无法参与。
基本上我正在访问路径路径名称。当我在生产服务器上执行以下代码时被拒绝(W2003)

Dim myFolder As String = Server.MapPath(" .. \..\..\ sDirectory \")
Dim FileName As String

对于Directory.GetFiles中的每个FileName(myFolder," * .doc")
Response.Write(FileName)<退出
下一步

这段代码在我的测试机上运行得很好(Windows XP)

sDirectory是一个虚拟目录。
Anonymous已关闭。
选择了Windows域服务器的DIgest身份验证。
选择了基本身份验证。
.Net密码身份验证未被选中。
文件权限: aspnet_wp帐户(computerName\ASPNET)
经过身份验证的用户
每个人
我不会在我的web.config中使用身份模仿。

我发现很多关于这个问题的讨论,不幸的是仍然无法自己解决...
Dim myFolder As String = Server.MapPath("..\..\..\sDirectory\")
sDirectory is a virtual directory.
Do you have AspEnableParentPaths set to true ?
To increase security, parent paths are disabled by default.

http://msdn.microsoft.com/library/de...1ed541e3a5.asp


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espa?ol : http://asp.net.do/foros/
===================================
<j_****@hotmail.com> wrote in message news:11********************@g10g2000cwb.googlegrou ps.com... Hi there,

There was older thead i created for that question a week ago, but then
I had some sort of vacations, and couldn''t participate.
Basically I am getting Access to the path "Path name" is denied when I
execute the following code on my production server (W2003)

Dim myFolder As String = Server.MapPath("..\..\..\sDirectory\")
Dim FileName As String

For Each FileName In Directory.GetFiles(myFolder , "*.doc")
Response.Write(FileName)
Exit For
Next

This code will run just fine on my testing machine (Windows XP)

sDirectory is a virtual directory.
Anonymous is turned off.
DIgest authentication for Windows domain servers is selected.
Basic authentication is selected.
.Net Password authentication is not selected.
Permissions on the file:
Administrator (Domain\Administrator)
aspnet_wp account (computerName\ASPNET)
Authenticated Users
Everyone
I don''t use identity impersonate in my web.config.
I found many discussions regarding that problem, unfortunatelly still
cannot resolve it by myself...



我实际打印myFolder路径,然后复制并粘贴到资源管理器并且可以

访问它...

AspEnableParentPaths未设置为true,我这样做但是没有解决

我的问题。

我的xp机器禁用此选项仍然有效...

I actually print myFolder path, then copy and paste to explorer and can
access it...
AspEnableParentPaths was not set to true, I did that but it didn''t fix
my problem.
My xp machine has this option disabled and still works...


这篇关于访问路径....被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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