简体   繁体   English

Windows身份验证自动登录

[英]windows authentication auto login

I have link to local network server which requires windows authentication . 我已经链接到需要Windows身份验证的本地网络服务器。 How to do this automaticly from asp.net page? 如何从asp.net页面自动执行此操作?

See Access files from network share in c# web app 请参阅从C#Web应用程序中的网络共享访问文件

But the better way is to use your own win-service between ASP.NET and local network server. 但是更好的方法是在ASP.NET和本地网络服务器之间使用自己的Win服务。

Configure Impersonation and deny unauthenticated users. 配置模拟并拒绝未经身份验证的用户。 Then the users will be able to access the network server IF they have permissions to the server, and to the specific files/folders on the server. 然后,如果用户有权访问服务器以及服务器上的特定文件/文件夹,则他们将能够访问网络服务器。 Note that if you are using a File Share that permissions need to be set on BOTH the file share AND the underlying files and folders for users to access them. 请注意,如果您使用的是文件共享,则必须同时设置文件共享以及基础文件和文件夹的权限,以供用户访问。

If this is an Intranet app, then I would suggest configuring the entire ASP.NET app to use impersonation. 如果这是Intranet应用程序,则建议您将整个ASP.NET应用程序配置为使用模拟。 If you need to impersonate only for access to the network file share, try one of the options here: http://msdn.microsoft.com/en-us/library/ff647404.aspx 如果只需要模拟访问网络文件共享,请尝试以下一种方法: http : //msdn.microsoft.com/zh-cn/library/ff647404.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM