410 likes | 595 Views
Web.Config Part 3. Web Site Administration Tool. Ahmed Moosa. Download Slides. http://ahmedmoosa.wordpress.com. Agenda. This Is Web Site Administration Tool. What is Web Site Administration Tool ?. WAT Allow you to Configure Web Site With Simple Interface Manage Users Manage Roles
E N D
Web.ConfigPart 3 Web Site Administration Tool Ahmed Moosa
Download Slides http://ahmedmoosa.wordpress.com
What is Web Site Administration Tool ? • WAT Allow you to Configure Web Site With Simple Interface • Manage Users • Manage Roles • Manage Access Rules • SMTP Settings • Generate Database (ASPNetDB.mdf) • Debug and Trace • Error Page • Application Settings
How Can I Get It ? • Easy To Open and Start • Web Site Menu >> And Choose : • ASP.Net Configuration • OR in Solution Explorer Window Click on This Button
Home Tab • Just Navigation Menu to other tabs
Security Tab • Choose Authentication Type • set up and edit users • Cerate & Manage roles • Set access permissions (Access Rules ) • Authorization • Allow User ,Role • deny Other
Select authentication type • Choose From The internet authentication type and Press Done
Come Back Automatically • Now You Can create and Manage User
Create User • Fill Your Data and Press Create User
Welcome Member • Press Continue To Create New User • Or Press Back To Return to Security Tab again
Create Roles • If You Press Back Will Find this :: • Press Enable Roles To Enable and Create
Enable Roles • Press Highlight Below To Create
Create Roles • Enter Role Name and Press Add Role • Repeat Step if You Need More Or Press Back To Finish
Back To Web.Config • Without Closing Window Switch To Web.Config • Will See this ! Agree Press Yes to All • Remember that you will See above Dialog Every time you Modify Something in WAT • Did you Notes Additional information Like This : <roleManager enabled="true" />
Access Rules • In other Name Call Authorization – Access Permission • Press Create Access Rules • Allow/Deny
Allow / Deny • Admin directory • Allow Administrator Role and Deny Users
Manage Rules • After Press Ok Press Manage Access Rules • Notes Who is Allowed and Denied ! • Who is Allowed and Denied !
Web.Config Again • In This Case not top root but in Subfolder (Admin) • Dynamically another web.config Created inside • If you can’t see it in Admin Folder Make a refresh • You will get it’s Content Like This <?xml version="1.0" encoding="utf-8"?> <configuration> <system.web> <authorization> <allow roles="Adminstrator" /> <deny users="*" /> </authorization> </system.web> </configuration>
Application Tab • Application Settings • SMTP Settings (Mail) • Application Status • Debugging and Tracing • Define Error Page
Application Settings • After Press Create Application Settings Enter Your Data • When you Finished Press Save
Add another • Want to add another key an value Press Add another • Press Ok to return to Application Tab • Switch to Web.Conifg to See this <appSettings> <add key="Your" value="SomeValue" /> </appSettings>
Manage Application Settings • Edit Or Delete • Press Back to return to Parent tab
SMTP Settings • Press Configure SMTP E-Mail Settings • SMTP = Simple Mail Transfer Protocol • SMTP responsible For Sending Not receiving
Don’t Forget Web.Config • After You Can Press OK • Again Switch to Web.Config Will Find Following:: • <system.net> • <mailSettings> • <smtp from="info@yoursite.com"> • <network host="smtp.yoursite.com" password="xxxxxxx" userName="admin" /> • </smtp> • </mailSettings> • </system.net> Note : WAT (Website Adminstration Tool ) Just User interface to Web.Config
Application Status • Online When Publishing • Offline When Repairing
Taking Applications Offline • Related with <httpRuntime> • Take an applications Offline will generated This Code in Web.Config : <system. Web> <httpRuntime enable="False" /> </system. Web> • Your Web applications Can’t be Started • Get Error : HTTP 404 (The Resource Can’t be Found )
Some Details • Enable debugging ::Check it When Maintain Website • Uncheck :: when Deploy . • Capture tracing information ::Check it to see More info • Display tracing information on individual pages :: Don’t check it (will show trace details With Controls in Page ) • Uncheck:: show trace in Own Page (trace.axd) type it manually • Display trace output for :: • Local requests only :: it’s Ok ( only You ) • All requests :: Don’t Do this (All user will See it ) • Select the sort order for trace results:: As You Want • Number of trace requests to cache :: Not More • Select which trace results to cache: AS you Want
Default Error Page • Just Choose Error Page and Press Save
Debug ,Trace , Error PageWeb.Config • Switch To Web.Config to See the Following :- <system.web> <customErrorsdefaultRedirect="~/ErrorPages/DefaultErrorPage.aspx" /> <trace enabled="true" mostRecent="true" /> <compilation debug="true"> <system.web>
Provider Tab • Two Choice (all in One Or Different for Each )
Single Provider for All • Select a single provider for all site management data • One Database For All : • Membership , Roles, Personalization , Profile • Make a refresh to See Database in App_Data Folder
Different Providers For Each • Define One for Membership and One For Roles
Membership in Web.config • Feel free to return To Part 1,2 will Find Here http://www.ahmedmoosa.wordpress.com • Custom Membership:: use another Database • Find the way in Part 2 • Don’t forget To Open Generated Database in Solution Explorer (ASPDB.mdf )
Good Bye Keep in Touch For Part 4 (إن شاء الله ) Hope this Help Thanks For Reading