如何显示C#.NET 3.5 SP1认证对话框 [英] How to show authentication dialog in C# .Net 3.5 SP1

查看:129
本文介绍了如何显示C#.NET 3.5 SP1认证对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想访问网络共享文件。
如何显示系统的身份验证对话框,使用户可以输入用户名和密码?

I'd like to access network shared files. How do I show the system authentication dialog box so that user can enter username and password?

PS:
通过UNC,
在WinForm的。

ps: Through UNC, In WinForm.

我正在写一个探索的控制,我想显示在网络共享文件夹的用户双击后该对话框。

I'm writing a explore control, I'd like to show the dialog after the user double click on a network shared folder.

推荐答案

你怎么现在访问的共享?通过UNC还是你先映射到一个驱动器号?一种想法是与 wnetaddconnection2 API和的 CONNECT_INTERACTIVE和CONNECT_PROMPT标志的。

How do you currently access the share? Through a UNC or do you first map it to a drive letter? One idea is to map it with the wnetaddconnection2 api call with the CONNECT_INTERACTIVE and CONNECT_PROMPT flags.

这篇关于如何显示C#.NET 3.5 SP1认证对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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