You are on page 1of 7

Demonstration 6

Application Settings

Development Tips And Tricks


Cookieless sessions

Session State no longer requires client cookie


support for SessionID

Can optionally track SessionID in URL

Requires no code changes to app

All relative links continue to work

Development Tips And Tricks


Cookieless sessions steps
<configuration>
1.
2.

<system.web>
Create
web.config file in app vroot
<sessionState
Add following
text: cookieless=true/>
</system.web>

</configuration>

Development Tips And Tricks


Smart navigation

Eliminates browser flicker/scrolling on browse


navigation

Smooth client UI but with server code


Automatic down-level for non-IE browsers

No client code changes required

<%@ Page SmartNavigation=true %>


Alternatively set in web.config file

Agenda

Development Tips and Tricks


Error Handling Tips and Tricks
Production Tips and Tricks

Error Handling Tips And Tricks


Page tracing

ASP.NET supports page and app tracing

Easy way to include debug statements


No more messy Response.Write() calls!

Great way to collect request details

Server control tree


Server variables, headers, cookies
Form/Querystring parameters

Error Handling Tips And Tricks


Page tracing steps
1.

Add trace directive at top of page


<%@ Page Trace=True %>

2.

Add trace calls throughout page


Trace.Write(Button Clicked)
Trace.Warn(Value: + value)

3.

Access page from browser

You might also like