为 Windows 用户配置 Webmatrix [英] Configure Webmatrix for Windows Users

查看:24
本文介绍了为 Windows 用户配置 Webmatrix的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了 asp .net 页面,并且我使用 Windows 用户进行身份验证.

<前><代码><认证模式=Windows"/>

我用一个标签创建简单的页面并显示信息.

<前><代码>如果(Page.User.Identity.IsAuthenticated){Label1.Text = "Authenticated = 'TRUE'
";Label1.Text = Page.User.Identity.Name;}别的{Label1.Text = "Authenticated = 'FALSE'
";}

我经常得到 Authenticated = 'FALSE'

如何配置 web.config 和 WebMatrix 以从 Windows 获取用户?

解决方案

try

<add key="enableSimpleMembership" value="false"/></appSettings>

I create asp .net page and i have use windows user to authenticate.


<authentication mode="Windows" />

I create simply page with one label and display information.


if (Page.User.Identity.IsAuthenticated)
{
        Label1.Text = "Authenticated = 'TRUE'<br/>";
        Label1.Text = Page.User.Identity.Name;
}
else
{
        Label1.Text = "Authenticated = 'FALSE'<br/>";
}

I often get Authenticated = 'FALSE'

How configure web.config and WebMatrix to take user from Windows?

解决方案

try

<appSettings>
  <add key="enableSimpleMembership" value="false" />
</appSettings> 

这篇关于为 Windows 用户配置 Webmatrix的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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