1. Trang chủ
  2. » Công Nghệ Thông Tin

Asp.net slide10

32 239 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Nội dung

Asp.net slide

Session 19Configuring an Application in ASP.NET Exploring ASP.NET / Session 19 / 2 of 31ReviewA service has two characteristics: Interface and Registration.Web services reduce the “communication-gap” among the Web applications, enhancing interactivity. Web sites thereby group together to form a constellation, providing users a rich user experienceAdvantages of Web ServicesCross business integrationImproved efficiencyCloser customer relationshipsFacilitation of just-in-time integrationThe extension of a Web service file in .NET is .asmx.The [WebMethod] tag notifies the ASP.NET compiler that the method to follow should be a Web method, which is to be exported onto the Web.A proxy class can be created from any WSDL file. Exploring ASP.NET / Session 19 / 3 of 31Review contd A Web service could be called from a browser, an ASP page or even another Web service. Using the browser, the Web service can be accessed using either HTTP-GET or HTTP-POST. A SOAP request from an ASP page, or a Web service to another Web service can also be made.WSDL is the short form for Web Services Description Language. WSDL is the grammar for a Web service, or moreover, could be thought of as a language that describes or portrays a Web service.The proxy class does not contain any application logic. Instead, it contains the transporting logic as to how the parameters would be passed, and the result retrieved.The proxy class will also contain a list of all the methods that are present in the Web service and their prototypes.UDDI is the abbreviation for Universal Description, Discovery and Integration.UDDI helps in registering the services provided by the service providers, so that they can be shared. It also helps the service consumers or Web users in locating the Web services. Exploring ASP.NET / Session 19 / 4 of 31ObjectivesDiscuss Machine.ConfigDiscuss Web.ConfigDiscuss the structure of a configuration fileSecure your web pages using Authentication Exploring ASP.NET / Session 19 / 5 of 31Web Pages – Web ApplicationIndividual web pages together form a web applicationAdvantage of grouping individual pages together into an application, is that values can be set for all these pages at once, by setting the properties of the application The setting of values for the properties of an application that will control the application at runtime, is known as configuring the ASP.NET application Web PageWeb PageWeb PageWeb PageWeb Page------------------WEB APPLICATION Exploring ASP.NET / Session 19 / 6 of 31Configuration FilesIn ASP.NET, all that needs to be done to configure an application, is to create a configuration file called web.config, and place it in the root directory of the application This web.config is an XML based file <configuration><system.web><sessionState timeout=”20” /></system.web></configuration> ASP.NET provides the configuration files that are needed to customize the web site. These files offer remarkable flexibility to the web applications Exploring ASP.NET / Session 19 / 7 of 31Features of Configuration FilesStored in plain text formatWritten in XML. Rules for naming tags and attributesNo need to restart server in case of changes to fileEach directory overrides earlier configuration fileClients cannot view the file from browser Exploring ASP.NET / Session 19 / 8 of 31Rules for naming the TagsPascal-case : first character is uppercase, and the first letter of any subsequent concatenated words is uppercase. Exceptions being true and false, which are in lowercase.Attribute valuesCamel-cased : First character of a tag name is lowercase, and the first letter of any subsequent words is uppercaseTag and attribute namesRuleType of Tags Exploring ASP.NET / Session 19 / 9 of 31Types of Configuration FilesMachine.config Decides configuration for all the applications residing on the server Settings are applied to single application residing on the server XML based file is Stored in C:\WinNT\Microsoft.NET\Framework\v.1.xxxx\config Build number of .net CLRWeb.config Only one file per ASP.NET installation on a machine XML based file stored in the web application directory of the web server One file per each directory of the web application Exploring ASP.NET / Session 19 / 10 of 31Types of Configuration Files – Contd…Web Applications One per machineOne per applicationOverride settings of machine.config [...]... Exploring ASP.NET / Session 19 / 30 of 31 Summary  ASP.NET is a collection of all the ASP.NET pages, the custom controls and modules  It provides the configuration files to customize the web site  The ASP.NET configuration files are written in XML, which enables the developer to modify them using an XML parser  Two types of configuration files exist in ASP.NET:    Machine.Config... compilation of files For example, "C#; VB" Exploring ASP.NET / Session 19 / 17 of 31 Compilation Setting Configuration Exploring ASP.NET / Session 19 / 22 of 31 customErrors Example Exploring ASP.NET / Session 19 / 23 of 31 Authentication... Exploring ASP.NET / Session 19 / 24 of 31 Authentication Types WINDOWS Specifies Windows authentication as default authentication mode Used for any form of IIS authentication FORMS Specifies ASP.NET forms-based authentication as default authentication mode Widely used method PASSPORT Specifies Microsoft... None Both encryption and validation are disabled Exploring ASP.NET / Session 19 / 26 of 31 Attributes of tag Attribute Option Description timeout The amount of time, in minutes, after which the authentication cookie expires Default value is 30 path Path for cookies issued by the application Default value is a backslash (/) Exploring ASP.NET / Session 19 / 27 of 31 Forms Authentication Example... configuration file There are around 30 different configuration settings already defined in the Machine.config file Exploring ASP.NET / Session 19 / 14 of 31 Page Configuration Settings The page configuration settings allow the developer to control some of the default behaviors for all the ASP.NET pages in the application or machine . Session 19Configuring an Application in ASP. NET Exploring ASP. NET / Session 19 / 2 of 31ReviewA service has two characteristics:. known as configuring the ASP. NET application Web PageWeb PageWeb PageWeb PageWeb Page------------------WEB APPLICATION Exploring ASP. NET / Session 19 / 6

Ngày đăng: 15/11/2012, 14:44

Xem thêm

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN