PetShop asymptotic memory (1)

Source: Internet
Author: User
Tags iis tagname

Starting today, to do the web, of course, it is necessary to start learning PetShop

First, installation

The authentication method for SQL Server that needs to be entered during the installation process is not described. After entering, hit vs, and open the PetShop project, a run prompted the following error:

?/mspetshop?????????????



?? ' NT authority\network serice '?????







Solving method

Step one: Add ' NT authority\network SERVICE ' to the group of administrators

My Computer--> right key--> admin--> Local Users and groups

Select group--> Double-click administrators--> Click Add--> click Advanced--> Click Find Now--> Select Network Service user--> two times in the following list click OK --> joined.





The second step is to join the Network Service user in Enterprise Manager

Open SQL Server Enterprise Manager--> Select the database instance--> open the Security node--> Select login--> Right-click in the list on the right-> select New Login--> on the General tab, click Name Next to the button "..."--> select Administrators Group-> Click the Members button below--> Select Network Service--> Click the Add button--> Click OK to return to the new login dialog box--> guarantee the authentication type is Windows Authentication and allow access--> Click OK--> Close Enterprise Manager





Forget the important point to add mspetshop These two DB access rights





Third Step

Rerun the ASP.net program, and the database connection string chooses Windows authentication.

Did you solve it? Not yet? I'll take a look at the book. <<.net Program Design Technology Insider >>

Well, let's just find the Web security topic.

asp.net the requester's legality after making a request to determine whether the request is legitimate

Verify that there are three kinds

1. Windows authentication: asp.net ask for help from IIS. After IIS authenticates the caller, the caller's identity is told to ASP.net. Of course, the results of this validation will be passed on to each subsequent request, this kind of authentication is more of an internal company, and the fundamental goal of Windows validation is to map incoming requests to a Web server's user account, allowing you to use the built-in security mechanisms of the OS to protect files and other resource files from unauthorized access by users who are not granted rights.

2. Passport verification: Relying on MS Passport to authenticate the user, the best example is the MSN, the more the case for everyone to download the Passport Sdk,ms website has

3. Form validation: This relies on the login form in the Web page to authenticate the user. For example, our general Website login Form

Questions? So how do I get asp.net to know what kind of validation I want? Oh, in the Web.config file,

Find <authentication mode= "Forms"/>

The other mode values are none,windows,passport.

Well, the problem has been solved, these issues aside for the time being not to say, or another big chapter

Open the Default.aspx and find some statements that have not been seen

<%@ Page language= "C #" autoeventwireup= "false" enablesessionstate= "ReadOnly"%>

<%@ Register tagprefix= "Petscontrol" tagname= "Banner" src= "Controls/banner.ascx"%>

<%@ Register tagprefix= "Petscontrol" tagname= "Navbarnomenu" src= "Controls/navbarnomenu.ascx"%>





All right, explain it.

The AutoEventWireup property of the page directive is set to True (or if this property is missing because it defaults to true), the page frame automatically invokes the page event, that is, the Page_Init and Page_Load methods. In this case, no explicit Handles clause or delegate is required.

Obviously, this homepage, just a pure static page bounds, do not need to load page events, it can be false,

The explanation for MSDN is as follows


EnableSessionState







Specifies whether session state is enabled.







True



Indicates that session state is enabled.







False



Indicates that session state is not enabled.







ReadOnly



Specifies that the application can read but not modify session state variables.








The third line <%@ Register tagprefix= "Petscontrol" tagname= "Navbarnomenu" src= "Controls/navbarnomenu.ascx"%>

TagPrefix



The alias associated with the namespace.



TagName



The alias associated with the class.



Namespace



The namespace associated with the TagPrefix.



Src



The location (relative or absolute) of the declarative user control file associated with the tagprefix:tagname pair.



Assembly



The assembly in which the namespace associated with the TagPrefix resides.



Note The assembly name does not include the file extension.







Today to understand a number of concepts of dongdong, tomorrow continue








Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.