Click here to Skip to main content
16,004,924 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionfiles on a linux box? Pin
MaryAnne24-May-07 9:21
MaryAnne24-May-07 9:21 
AnswerRe: files on a linux box? Pin
eggsovereasy24-May-07 10:22
eggsovereasy24-May-07 10:22 
GeneralRe: files on a linux box? Pin
MaryAnne25-May-07 3:53
MaryAnne25-May-07 3:53 
GeneralRe: files on a linux box? Pin
eggsovereasy25-May-07 5:22
eggsovereasy25-May-07 5:22 
GeneralRe: files on a linux box? Pin
MaryAnne25-May-07 6:18
MaryAnne25-May-07 6:18 
AnswerRe: files on a linux box? Pin
Vasudevan Deepak Kumar24-May-07 22:15
Vasudevan Deepak Kumar24-May-07 22:15 
GeneralRe: files on a linux box? Pin
MaryAnne25-May-07 3:55
MaryAnne25-May-07 3:55 
Questionminimize SSL Pin
KBTibbs24-May-07 7:46
KBTibbs24-May-07 7:46 
Hello,

I'm writing a small page that uses Forms Authentication and cookies to help track a login session( My boss doesn't want me to track anything in session states, so a cookie with a token it is...). Currently the whole site is using SSL, but I would like to change it so that only the Forms Authentication and cookie transmission on SSL and have the rest of the site plain text (but restricted with forms authentication). To this end, I have two questions: 1) How do I get cookies to transmit over SSL? and 2) How do I get <asp:login> controls to postback to an SSL page (or however posting it on SSL works).

1) Cookies over SSL

I've read some about cookies over SSL, but I've got some questions about how Cookie.Secure works. I'm starting off this way:

HttpCookie cookie = new HttpCookie("CookieName");
cookie["key"] = result.ToString();
cookie.Secure = true;
Response.Cookies.Add(cookie);

So... after this the secure parameter is set... and I'm hoping that Response.Cookies.Add automatically knows to take care of the little guy with SSL (am I right?). Next, when I request the cookie on another page I

HttpCookie cookie = Request.Cookies["CookieName"];
string temp = cookie.Value;
temp = temp.Remove(0,4);

Guid session = new Guid(temp);

(Now, before you call me on how I'm getting the value from the cookie... Trust me... It's better for what I'm doing to get it this way.)

In short, I hope that Request.Cookies and Response.Cookies transmit over SSL based on the Cookie.Security value with no extra work from me. Is that true, or am I missing something? Also I've read that I can add <httpcookies requiressl="true"> to my web.config file. That sounds easy enough, but again I'm wondering... will Response and Request automatically take care of the change? Also, where in the XML tree does it go? Under Authentication?


2) Partial SSL

I would like an ASP.NET login control to be able to use SSL without requiring the whole site to be SSL. It seems to me that switching between an SSL login page and normal text pages is a bit of a pain with the absolute paths and whatnot. Also, from what I gather cookies don't cross between https:// addresses and http:// address, is my understanding correct? Anyway, it seems to me that it might be easier to get the login control to use SSL instead of the whole page. The problem is, <asp:login> controls don't have any postback attribute to modify. Any thoughts here would be appreciated.


Thanks in advance for reading that long wall of text, and thanks in advance for any advice you may have.

KBTibbs
AnswerRe: minimize SSL Pin
KBTibbs4-Jun-07 13:50
KBTibbs4-Jun-07 13:50 
QuestionRetrieving Windows Login Pin
robw188824-May-07 5:42
robw188824-May-07 5:42 
AnswerRe: Retrieving Windows Login Pin
Not Active24-May-07 8:30
mentorNot Active24-May-07 8:30 
AnswerRe: Retrieving Windows Login Pin
kiran kumar[Intelligroup]24-May-07 19:14
kiran kumar[Intelligroup]24-May-07 19:14 
AnswerRe: Retrieving Windows Login Pin
Vasudevan Deepak Kumar24-May-07 22:17
Vasudevan Deepak Kumar24-May-07 22:17 
QuestionDoes not supported by Mozilla Browser. Pin
PavanPareta24-May-07 4:29
PavanPareta24-May-07 4:29 
QuestionCustom Build Provider not workiNG Pin
gantww24-May-07 3:32
gantww24-May-07 3:32 
AnswerRe: Custom Build Provider not workiNG Pin
gantww24-May-07 3:32
gantww24-May-07 3:32 
QuestionPartial postbacks don’t work how I expect Pin
Senseicads24-May-07 3:09
Senseicads24-May-07 3:09 
AnswerRe: Partial postbacks don’t work how I expect Pin
Not Active24-May-07 3:54
mentorNot Active24-May-07 3:54 
GeneralRe: Partial postbacks don’t work how I expect Pin
Senseicads24-May-07 3:56
Senseicads24-May-07 3:56 
QuestionOnly numbers in textbox Pin
Jats_4ru24-May-07 3:06
Jats_4ru24-May-07 3:06 
AnswerRe: Only numbers in textbox Pin
Tarakeshwar Reddy24-May-07 3:55
professionalTarakeshwar Reddy24-May-07 3:55 
AnswerRe: Only numbers in textbox Pin
Not Active24-May-07 3:59
mentorNot Active24-May-07 3:59 
AnswerRe: Only numbers in textbox Pin
eggsovereasy24-May-07 10:25
eggsovereasy24-May-07 10:25 
AnswerRe: Only numbers in textbox Pin
Blumen24-May-07 18:39
Blumen24-May-07 18:39 
Question[Message Deleted] Pin
Kurmala24-May-07 2:48
Kurmala24-May-07 2:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.