In ASP.NET how do I setup a page that require authorization?

eXpiReD

New Member
I don't mean form athentication. You know how some webpage just have a popup in the browser with something along the line of "This webpage require authorization"? And you have to enter username/password or it return you a "HTTP Status Code - 401 Unauthorized" error? How do you set that up?I assume this is done with post header right? Because it doesn't have a form.On the client end. I am posting using ServerXMLHTTP using the following code:\[code\]Dim connection As ServerXMLHTTPDim inXML As MSXML2.DOMDocumentDim outXMLstr, inXMLstr As StringDim itemsList As IXMLDOMNodeListDim itemNode As MSXML2.IXMLDOMNodeSet connection = New ServerXMLHTTPSet inXML = New DOMDocumentDim name As Stringconnection.Open "POST", "http://localhost:46284/", False, CStr("user"), CStr("pass")\[/code\]In other word, how do I authenticate "user" and "pass" on the server side from the code above.
 
Back
Top