add "Refresh" with some values in sec to the page header
c# - Response.AddHeader("Refresh", "30");
Wednesday, September 17, 2008
Thursday, September 11, 2008
Popup a save dialog box along with refreshing the same page
insert a label on the page which is visible-false
when you need to pop the save dialog box.
insert "" into the label text and make the control visible.
this will result in pop up of dialog box (because of iframe, it is treated as a separate request) and refresh the page too.
when you need to pop the save dialog box.
insert "" into the label text and make the control visible.
this will result in pop up of dialog box (because of iframe, it is treated as a separate request) and refresh the page too.
Wednesday, September 10, 2008
Force Windows Authentication popup (Firefox)
C sharp:
Response.ClearHeaders();
Response.AppendHeader("Cache-Control", "no-cache; private; no-store; must-revalidate; max-stale=0; post-check=0; pre-check=0; max-age=0"); // HTTP 1.1
Response.AppendHeader("Pragma", "no-cache"); // HTTP 1.1
Response.AppendHeader("Keep-Alive", "timeout=3, max=993"); // HTTP 1.1
Response.AppendHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); // HTTP 1.1
Response.Close();
Execute the following code on some action and browser will popup a dialog box for authentication
no-cache here refers to asp.net Session. If you remove it from the Cache-Control list, it will retain the Session variables.
Response.ClearHeaders();
Response.AppendHeader("Cache-Control", "no-cache; private; no-store; must-revalidate; max-stale=0; post-check=0; pre-check=0; max-age=0"); // HTTP 1.1
Response.AppendHeader("Pragma", "no-cache"); // HTTP 1.1
Response.AppendHeader("Keep-Alive", "timeout=3, max=993"); // HTTP 1.1
Response.AppendHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); // HTTP 1.1
Response.Close();
Execute the following code on some action and browser will popup a dialog box for authentication
no-cache here refers to asp.net Session. If you remove it from the Cache-Control list, it will retain the Session variables.
Firefox Windows Authentication - removing dialog box
Note to self: Firefox Windows Authentication
To enable windows authentication on your domain.
1. Open Firefox
2. Navigate to the url about:config
3. Locate the following preference names and put as the value the comma separated values of the address roots.
network.automatic-ntlm-auth.trusted-uris
network.negotiate-auth.delegation-uris
network.negotiate-auth.trusted-uris
Your value should look something like this: localhost,server1,server2,serverX
Contents from
To enable windows authentication on your domain.
1. Open Firefox
2. Navigate to the url about:config
3. Locate the following preference names and put as the value the comma separated values of the address roots.
network.automatic-ntlm-auth.trusted-uris
network.negotiate-auth.delegation-uris
network.negotiate-auth.trusted-uris
Your value should look something like this: localhost,server1,server2,serverX
Contents from
Subscribe to:
Posts (Atom)