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
相关文档:
如果你已经有较多的面向对象开发经验,跳过以下这两步:
第一步 掌握一门.NET面向对象语言,C#或VB.NET 我强烈反对在没系统学过一门面向对象(OO)语言的前提下去学ASP.NET。 ASP.NET是一个全面向对象的技术,不懂OO,那绝对学不下去!
第二步 对.NET Framework类库有一定的了解 可以通过开发Windows Form应用程 ......
测试环境:windows server 2003+visual studio 2008
''' <summary>
''' 获取Excel文件所有工作表的名称
''' </summary>
''' <param name="iSubPath">Excel文件路径,如:D:\test.xls</param>
  ......
ASP.NET中的身份验证(authentication)有哪些
=========================================
Forms身份验证:
通过其可将没有通过身份验证的请求重定向到使用 HTTP 客户端重定向的 HTML 窗体的系统。用户提供凭
据并提交该窗体。如果应用程序验证该请求,系统就会发出包含凭据或密钥的 Cookie 以重新获取该标识
。后续的 ......
如果仅仅是上传一个文件,最好是使用FileUpload控件, 可以使用FileUpload1.FileContent.Length得到文件大小, FileUpload1.FileBytes得到其字节数组, 代码略.
如果要上传多个文件, 其客户端代码与使用ASP.NET上传多个文件到服务器基本相同, 本例中加入了下载的示例代码。
效果图如下:
数据库脚本
create data ......
上下文对象
===================================
一种对象,它当MTS服务器组件在一个活动中运行时跟踪该组件的属性,包括被跟踪组件的激活状态、安全信息、事务处理状态(如果存在)等。这样就免除了让组件去跟踪其自身状态。
上下文对象是web服务器上基于web应用的一个背景环境对象,上下文对象提供了一个同一web应用 ......