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. Advertisements

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,739
    Ben Lovell
    Aug 30, 2004
  2. cungar
    Replies:
    0
    Views:
    465
    cungar
    Nov 8, 2007
  3. AAaron123
    Replies:
    2
    Views:
    2,956
    AAaron123
    Jan 16, 2009
  4. AAaron123
    Replies:
    1
    Views:
    1,631
    Oriane
    Jan 16, 2009
  5. Shailesh Patel
    Replies:
    0
    Views:
    635
    Shailesh Patel
    Nov 8, 2006
  6. Joeri KUMBRUCK
    Replies:
    4
    Views:
    461
    Joeri KUMBRUCK
    Sep 1, 2004
  7. Ashutosh

    Asp Page asks for username & password

    Ashutosh, Oct 5, 2005, in forum: ASP General
    Replies:
    2
    Views:
    239
    Alexandru TUDOSE
    Oct 7, 2005
  8. Charlotte
    Replies:
    3
    Views:
    265
    Anthony Jones
    Oct 3, 2007
Loading...