How to require username and password to users requesting an .ashx page?

Discussion in 'ASP .Net' started by jens Jensen, May 2, 2006.

  1. jens Jensen

    jens Jensen Guest

    Hello,
    I have my httphandler application running under IIS 6.0.

    How can i authenticate users based on username and password?

    no login page here. The client will do this:


    HttpWebRequest req =
    (HttpWebRequest)HttpWebRequest.Create(ConfigurationManager.AppSettings["URI"]);
    req.Credentials =new
    NetworkCredential("username","password");




    req.ContentType = "text/xml; charset=utf-8";



    req.Method = "POST";

    ....
    ........



    Many thanks in advance
    JJ
    jens Jensen, May 2, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joeri KUMBRUCK
    Replies:
    1
    Views:
    4,502
    Ben Lovell
    Aug 30, 2004
  2. cungar
    Replies:
    0
    Views:
    365
    cungar
    Nov 8, 2007
  3. AAaron123
    Replies:
    2
    Views:
    2,079
    AAaron123
    Jan 16, 2009
  4. AAaron123
    Replies:
    1
    Views:
    1,305
    Oriane
    Jan 16, 2009
  5. Joeri KUMBRUCK
    Replies:
    4
    Views:
    271
    Joeri KUMBRUCK
    Sep 1, 2004
Loading...

Share This Page