如何从 Internet 访问内部 ASP.NET Web 应用程序?

发布于 2024-09-13 01:30:15 字数 344 浏览 5 评论 0原文

我在内部 Windows 域中有一个 ASP.NET Web 应用程序,它调用 wcf 服务。在 wcf-service 中,我使用 SecurityContext.Identity.Name,因此它需要模拟。 我们的任务是可以从任何地方访问 Web 应用程序。 第一步是管理员通过 ISA Server 2006 发布 Web 应用程序。该解决方案的主要问题是浏览器不会在 ISA 身份验证表单中保存用户的登录名和密码。此外,用户希望通过 Opera Mini 来从诺基亚移动设备访问网络应用程序。

我能以一种简单的方式做什么,让浏览器保存登录名/密码,以便用户可以使用该应用程序,而无需每 30/60 分钟重新输入登录数据?????? 有什么最佳实践吗?

I have an asp.net web application in an internal windows domain which calls a wcf-service. In the wcf-service I use the SecurityContext.Identity.Name, so it needs impersonation.
Our task is that the web application can be accessed from anywhere.
The first step was that the administrators published the web application throught ISA server 2006. The main problem with this solutions is that the browser doesn't save the user's loginname and password in the ISA authentication form. In addition the users want to access the webapp from Nokia Mobile with Opera Mini.

What can I do in a simple way that the browser saves the loginname/password in order to the user can use the application without reentering the login data in every 30/60 minutes?????
Any best practise?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

夏见 2024-09-20 01:30:15

标准是将用户名/密码存储在 cookie 中,并让登录页面从 cookie 中提取登录信息以自动登录。如果您愿意,您可以让此 cookie 在一个月后过期。

以下是一些使用不同语言添加“记住我”类型功能以将用户名和密码保存在 cookie 中的示例。

Cookie

php 示例

asp.net 示例

asp 示例


回复创建者的评论:

为了修改ISA 登录页面,请查看这篇文章。您应该能够通过编辑位于目录 C:\Program Files\Microsoft ISA Server\CookieAuthTemplates\ISA\HTML 中的登录页面文件来添加代码顶部句柄 cookie(假设您将 ISA 安装到该位置)。

我认为没有开箱即用的配置允许您进行设置,但我确实看到了一些您可能想要使用的用于设置信任级别的配置(文章中的#18)。

The standard is to store the username/password in a cookie and have the login page pull the login info from the cookie to auto-login. You can have this cookie expire in a month if you want to.

Here are some examples using different languages to add a "remember me" type functionality to save username and password in a cookie.

Cookies

php example

asp.net example

asp example


Response to creator's comments:

In order to modify the ISA login page, look at this article. You should be able to add the code top handle cookies by editing the login page file located in the directory C:\Program Files\Microsoft ISA Server\CookieAuthTemplates\ISA\HTML (assuming you installed ISA to that location).

I do not think there is an out of the box configuration that allows you to set this up, but I did see some configuration for setting trust level (#18 from the article) that you might want to play with.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文