Asp.net访问网络共享 [英] Asp.net Access To Network Share

查看:161
本文介绍了Asp.net访问网络共享的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ASP.net应用程序,需要将文件保存到网络共享(桑巴)。

中所占的份额需要用户名和密码进行连接。

我制订一个持续性到共享驱动器和提供的登录凭证,同时登录到服务器域\\ WEBUSER。

我已经改变了它承载我的应用程序,而不是使用IWAM账号域\\ WEBUSER帐户虚拟目录。

但是,用户仍然无法看到映射驱动器。

我缺少了?


解决方案

最好是使用UNC,如果你能为映射驱动器通常被链接到交互式用户和虚拟目录可能与服务或netwrok连接登录类型。

当您配置IIS以使用Samba网络共享作为发生

另一个可能的修复程序在此知识库文章错误描述它的根。摘录如下。


  

重要这些步骤可能会增加
  您的安全风险。这些步骤可能
  也使计算机或网络
  更容易受到恶意攻击
  用户或恶意软件如
  病毒。我们建议的过程,
  本文介绍启用
  程序进行操作,因为它们是
  设计或实施具体
  程序功能。在您做出
  这些变化,我们建议您
  评估所带来的风险
  与实施在这个过程中你
  特定的环境。如果您决定
  实施此过程,采取任何
  适当的附加措施来帮助
  保护系统。我们建议
  您使用此过程仅当您
  真正需要这一过程。


  
  

警告此方法涉及
  安全风险,因为用户谁
  创建映射必须保持记录
  到本地控制台。因此,
  唯一的安全是通过锁定
  电脑。要解决此问题,
  做到以下几点:


  
  

      
  1. 映射一个驱动器号\\服务器\\ iisroot使用根和
      密码。

  2.   
  3. 在Samba的虚拟目录,改变从共享的主目录
      在另一台计算机的本地
      目录,然后指定驱动器
      您在步骤1中映射的盘符。

  4.   
  5. 重新启动Web站点,然后通过浏览测试。

  6.   

I have an ASP.net app which needs to save files to a network share(samba).

The share requires a username and password to connect.

I have mapped a persistant drive to the share and provided the login credentials whilst logged in to the server as DOMAIN\WEBUSER.

I have changed the virtual directory which hosts my app to use the DOMAIN\WEBUSER account instead of the IWAM account.

However the user still cannot see the mapped drive.

What am I missing out?

解决方案

It is best to use the UNC if you can as the mapped drives generally are linked to the interactive user and the virtual directory is probably connecting with a service or netwrok login type.

Another possible fix is described in this KB articleError occurs when you configure IIS to use a Samba network share as its root. Excerpted below.

Important These steps may increase your security risk. These steps may also make the computer or the network more vulnerable to attack by malicious users or by malicious software such as viruses. We recommend the process that this article describes to enable programs to operate as they are designed to or to implement specific program capabilities. Before you make these changes, we recommend that you evaluate the risks that are associated with implementing this process in your particular environment. If you decide to implement this process, take any appropriate additional steps to help protect the system. We recommend that you use this process only if you really require this process.

Warning This method involves a security risk because the user who created the mapping must remain logged on to the local console. Therefore, the only security is by locking the computer. To work around this problem, do the following:

  1. Map a drive letter to \servername\iisroot using "root" and "password."
  2. In the Samba virtual directory, change the home directory from Share on Another Computer to Local Directory, and then specify the drive letter that you mapped in step 1.
  3. Restart the Web site, and then test it by browsing.

这篇关于Asp.net访问网络共享的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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