What is cookie less session? How it works?

Answers were Sorted based on User's Feedback



What is cookie less session? How it works?..

Answer / chandra prakash

You can set the cookieless setting to one of the values defined by the HttpCookieMode enumeration,
as described

1)UseCookies - Cookies are always used, even if the browser or device doesn’t support cookies or they are disabled. This is the default. If the device does not support cookies, session information will be lost over subsequent requests,
because each request will get a new ID.

2)UseUri - Cookies are never used, regardless of the capabilities of the browser or device. Instead, the session ID is stored in the URL.

3)UseDeviceProfile- ASP.NET chooses whether to use cookieless sessions by examining the BrowserCapabilities object. The drawback is that this object indicates what
the device should support—it doesn’t take into account that the user may have disabled cookies in a browser that supports them.

4)AutoDetect- ASP.NET attempts to determine whether the browser supports cookies by attempting to set and retrieve a cookie (a technique commonly used on the Web). This technique can correctly determine whether a browser supports
cookies but has them disabled, in which case cookieless mode is used instead.

Is This Answer Correct ?    4 Yes 3 No

What is cookie less session? How it works?..

Answer / shalini

If cookies is not supported then cookieless sessions is
the best option. If you set the cookieless attribute of the
sessionState element to "true" in your web.config, you will
notice that sessions still work perfectly when invoking
your Web methods using the browser interface.Code for using
cookiless session is:(.aspx code)

<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href='/HttpSessionState/
(l2z3psnhh2cf1oahmai44p21)/service1.asmx'>here</a>.</h2>
</body></html>

Code for using cookiless session is:(aspx.cs code)

[WebMethod(EnableSession=true)]
public bool Login(string user, string pwd)
{
Session["extuser"] = user;
return true;
}

[WebMethod(EnableSession=true)]
public String getUser()
{
return Session["extuser"].ToString();
}

Is This Answer Correct ?    4 Yes 7 No

Post New Answer

More ASP.NET Interview Questions

How would you implement inheritance using c#?

0 Answers  


In a Repeater control how one can provide an alternating color scheme ?

0 Answers   Siebel,


What are the disadvantages of using session?

0 Answers  


Can we change the session timeout in ASP.NET, if yes then how and from where?

7 Answers   L&T,


If 200 is for all successful operation then why do we have 201 response codes?

0 Answers  






what is Repeater Control, When it is used,How it is used, what type of template is used for repeater control?

6 Answers   iSoft,


Where sessions are stored in asp.net?

0 Answers  


To call a Web service which transport protocol you can use?

3 Answers   Siebel,


What is reflection and disadvantages of reflection ?

2 Answers   CTC, Microsoft,


When we use cookie less session? Explain its working?

0 Answers   Sans Pareil IT Services,


What are the different types of Session state management options available with ASP.NET?

1 Answers  


i develop a web application and i gave security setting i.e autherization and athentication now it work properly on my local system , now question is ,is this security setting ie autherization and athentication which i gave in web.config will it be enough strong to secure my application on internet or i have to use some 3rd party tool or software to get security .if yes --how ? if no--what is the alternate?

0 Answers  


Categories