Forum Moderators: open
it said that cookies is blocked? and i have no problem login if i permit it. i would like to know why it is happening? is it because of my hosting?
thanks for the help
A good practice when using session varaiables as logins is to perform a quick cookie test and if the client has cookies swithed off - provide them with a message explaining why cookies are needed to login.
I included those lines in my ASP page, and with every setting it doesn't write (or read - can't tell which) the cookie until after the page is refreshed.
The first time the page loads, it doesn't find the cookie, yet the code looks like this:
Response.Buffer = true;
var nocookies = false;
Response.Cookies("mycookie") = "test";
if (Request.Cookies("mycookie")!= "test" ) {
var nocookies = true;
}
At first load, nocookies = true, yet when I Refresh the page, nocookies is set to false.
Am I missing something here?
This article explains the details:
[asp101.com ]
If a program is running under localhost, and requires cookies (Session variables) , does the browser setting still matter?
I cranked up my Privacy on IE to Block all Cookies, and the program still launched and ran successfully.
I would have thought that the blocking would have prevented the program from running.
If someone else wants to test it, sticky me and I'll send the URL for the download.
Thanks.