在Web.config文件中不使用标识impersionate访问文件 [英] Access file without using identity impersionate in Web.config file

查看:141
本文介绍了在Web.config文件中不使用标识impersionate访问文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我正在使用ASP.NET 2005,



我想要确保,有没有其他方法来访问服务器中的文件而不使用web.config文件中的下面的标签



identity impersonate =trueuserName =rajkumar .t @mydomain.compassword =xxxxxx



我目前正在做的是,



服务器中会有一些文件例如



\\storageserver \ project \ Rajkumar \ file1.xls



以上是服务器中的文件,如果我想在点击Web应用程序中的按钮时访问或打开文件,



i必须提及有权访问该位置文件的用户名和密码,除非没有人无法通过网络应用程序访问该文件。



现在我想知道是否有任何其他方式来访问该文件而不使用用户名和密码i n身份模仿标签。





提前致谢。

Hi all,

I am working on ASP.NET 2005,

I wants to make sure, is there any other way to access a file in a server without using tag below in web.config file

identity impersonate="true" userName="rajkumar.t@mydomain.com" password="xxxxxx"

What currently i am doing is,

There will be some files in a server for example

\\storageserver\project\Rajkumar\file1.xls

The above is the file in the server, if i wants to access or open the file while clicking a button in the web application,

i have to mention a username and password of those who have rights to access the file in the location unless and otherwise no one can not access the file through the web application.

Now i wants to know whether any other way to access the file without using user name and password in identity impersonate tag.


Thanks in advance.

推荐答案

您可以在web.config中使用identity标记,也可以向IIS中运行应用程序池的帐户授予权限。或者您可以冒充每个用户(基本上作为Windows身份验证运行)然后单独授予每个用户,但我认为使用应用程序池帐户要容易得多。



当然,您可以随时授予EVERYONE帐户权限,但我不建议这样做。
Either you use the identity tag in web.config or you grant permissions to the account running the application pool in IIS. Or you can impersonate each user (essentially running as Windows authentication) and then grant each user individually but I think using the app pool account is much easier.

Of course, you could always grant the EVERYONE account permissions but I would not recommend that.


这篇关于在Web.config文件中不使用标识impersionate访问文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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