易截截图软件、单文件、免安装、纯绿色、仅160KB

Explained: Forms Authentication in ASP.NET 2.0

原地址:
http://msdn.microsoft.com/en-us/library/aa480476.aspx
IIS Authentication
ASP.NET authentication is a two-step process. First, Internet Information Services (IIS) authenticates the user and creates a Windows token to represent the user. IIS determines the authentication mode that it should use for a particular application by looking at IIS metabase settings. If IIS is configured to use anonymous authentication, a token for the IUSR_MACHINE account is generated and used to represent the anonymous user. IIS-then passes the token to ASP.NET.
Second, ASP.NET performs its own authentication. The authentication method used is specified by the mode attribute of the authentication element. The following authentication configuration specifies that ASP.NET uses the FormsAuthenticationModule class:
Copy Code
<authentication mode="Forms" />

Note   Because forms authentication does not rely on IIS authentication, you should configure anonymous access for your application in IIS if you intend to use forms authentication in your ASP.NET application.
ASP.NET Forms Authentication
ASP.NET forms authentication occurs after IIS authentication is completed. You can configure forms authentication with the forms element.
Forms Authentication Configuration
The default attribute values for forms authentication are shown in the following configuration-file fragment.
Copy Code
<system.web>
<authentication mode="Forms">
<forms loginUrl="Login.aspx"
protection="All"
timeout="30"
name=".ASPXAUTH"
path="/"
requireSSL="false"
slidingExpiration="true"
defaultUrl="default.aspx"
cookieless="UseDeviceProfile"
enableCrossAppRedirects="false" />
</authentication>
</system.web>

The default attribute values are described below:
loginUrl points to your application's custom logon page. You should place


相关文档:

ASP.NET中常用的三十三种代码

1. 打开新的窗口并传送参数 [返回目录]
传送参数: 
response.write("<script>window.open('*.aspx?id="+this.DropDownList1.SelectIndex+"&id1="+...+"')</script>") 
接收参数: 
string a = Request.QueryString("id"); 
string b = Request.QueryString("id1"); 
2.为按钮 ......

ASP.NET判断URL参数是否存在

ASP.NET中,若要将一个URL参数值赋值给一个变量,都得先判断参数是否存在,否则等待你的很可能就是"未将对象引用设置到对象的实例",以前都是
Request.QueryString["xx"] != null比较后再赋值,但今天在一个项目中发现竟还报错,代码大致结构如下:
复制内容到剪贴板
程序代码
int id = 0;
if (R ......

使用ASP.NET MVC(C#)15分钟内创建一个电影数据库程序

    这篇教程的目的是让你体会一下创建一个 ASP.NET MVC 程序是一种什么样的感觉。在这篇教程里,我通过从头到尾地创建一整个ASP.NET MVC程序来进行说明。我会教你如何创建一个简单的数据库驱动程序,此程序会演示你如何以列表显示、新建和编辑数据库记录。
    为了简化我们创建程序的过程 ......

asp.net___web.config详解 (转载)

在开发中经常会遇到这样的情况,在部署程序时为了保密起见并不将源代码随项目一同发布,而我们开发时的环境与部署环境可能不一致(比如数据库不一样),如果在代码中保存这些配置这些信息部署时需要到用户那里更改代码再重新编译,这种部署方式非常麻烦。
在.net中提供了一种便捷的保存项目配置信息的办法,那就是利用配置 ......

ASP.NET之二 ASP.NET安全及部署

ASP.NET中的身份验证(authentication)有哪些
=========================================
Forms身份验证:
通过其可将没有通过身份验证的请求重定向到使用 HTTP 客户端重定向的 HTML 窗体的系统。用户提供凭
据并提交该窗体。如果应用程序验证该请求,系统就会发出包含凭据或密钥的 Cookie 以重新获取该标识
。后续的 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号