如何为单击一次应用程序指定用户凭据? [英] How to specify user credentials for a click-once application?

查看:83
本文介绍了如何为单击一次应用程序指定用户凭据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于常规的.exe文件,我总是可以右键单击并选择运行为..。我如何以类似的方式在不同的凭据下运行Click-Once应用程序?

For a regular .exe file i can always right click and select "run as..". How can i run a Click-Once application under different credentials in a similar way?

我在说的是应用程序本身,而不是安装程序。

I am talking about the application itself, not the installer.

推荐答案

答案是肯定的,您不应该这样做。 ClickOnce应用程序安装在用户配置文件下,并且仅属于该用户。不会,也不能作为所有用户安装。

The answer really is no, you shouldn't do this. ClickOnce applications are installed under the user profile and belong only to that user. THey will not and do not work as an all-user installation.

还请注意,如果双击[exe]文件(其位置会随时间变化)时间(如果有更新),它将不会查找更新,也不会检查文件以确保它们没有被篡改。换句话说,它不会作为ClickOnce应用程序运行。

Also note that if you double-click on the [exe] file (the location of which changes every time there is an update), it will not look for updates, it will not check the files to make sure they haven't been tampered with. In other words, it will not run as a ClickOnce application.

我还认为在查询字符串中传递用户名和密码是不明智的,因为任何运行提琴手或查尔斯的人或任何其他网络流量嗅探器将能够看到凭据。

I also think passing the username and password in the query string is ill-advised because anybody running fiddler or charles or any other network traffic sniffer will be able to see the credentials.

这篇关于如何为单击一次应用程序指定用户凭据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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