26.02.2015 Views

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

DOT NET Interview Questions - DotNetSpider

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

√<br />

√<br />

VaryByCustom:-Lets you customize the way the cache handles page variations<br />

by declaring the attribute and overriding the GetVaryByCustomString handler.<br />

VaryByControl:-Caches different versions of a user control based on<br />

the value of properties of ASP objects in the control.<br />

(A) How will implement Page Fragment Caching ?<br />

Page fragment caching involves the caching of a fragment of the page, rather than the<br />

entire page. When portions of the page need to be dynamically created for each user<br />

request this is best method as compared to page caching.You can wrap Web Forms user<br />

control and cache the control so that these portions of the page don’t need to be recreated<br />

each time.<br />

(B) What are ASP.<strong>NET</strong> session and compare ASP.<strong>NET</strong> session with<br />

classic ASP session variables?<br />

ASP.<strong>NET</strong> session caches per user session state.It basically uses “HttpSessionState” class.<br />

Following are the limitations in classic ASP sessions :-<br />

√<br />

√<br />

√<br />

ASP session state is dependent on IIS process very heavily.So if IIS restarts<br />

ASP session variables are also recycled.ASP.<strong>NET</strong> session can be independent<br />

of the hosting environment thus ASP.<strong>NET</strong> session can maintained even if IIS<br />

reboots.<br />

ASP session state has no inherent solution to work with Web Farms.ASP.<strong>NET</strong><br />

session can be stored in state server and SQL SERVER which can support<br />

multiple server.<br />

ASP session only functions when browser supports cookies.ASP.<strong>NET</strong> session<br />

can be used with browser side cookies or independent of it.<br />

(B) Which various modes of storing ASP.<strong>NET</strong> session ?<br />

√<br />

InProc:- In this mode Session state is stored in the memory space of the<br />

Aspnet_wp.exe process.This is the default setting.If the IIS reboots or web<br />

application restarts then session state is lost.<br />

91

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!