我不能从C#访问UNC路径。获取访问被拒绝 [英] I can't access unc path from C#. Getting access is denied

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

问题描述

我使用的是Windows Server 2008和IIS 7.5
我试图访问一个文件是这样的:\server\C $ \temp\testFile.log从C#代码的另一台服务器上运行

I'm using Windows Server 2008 and IIS 7.5 I'm trying to access a file this way: \server\C$\temp\testFile.log from C# code running on another server.

我的用户名是两个服务器上的管理员。该代码是该帐户下运行。临时文件夹已被设置为(我的用户)和ASP.NET的全部权利。

My username is an admin on both servers. The code is running under that account. The temp folder has been set to full rights for (my user) and ASP.NET.

为什么我不能访问它?

我不能做一个共享文件夹;违反规则。我已经在充分考虑运行;因此,我并不需要做模拟,对吧?

I can't do a shared folder; against the rules. I am already running under full account; therefore, I don't need to do impersonation, right?

推荐答案

这是一个web应用程序?你确定应用程序被冒充您的帐户?被匿名访问设置为true在IIS中?

Is this a web app? Are you sure the app is impersonating your account? Is anonymous access set to true in IIS?

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

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