RE: XmlUrlResolver not working right



Hello Dave,

I think the problem you meet is is due to the server-side web
application/page is using Forms Authentication, the httpwebrequest based
programmatic http web requesting does not support interactive with forms
authentication. Forms Authentication always require an interactive client
user. There does exists means to programmatically request pages secured
through forms authentication, you can construct a http post message with
the username/password forms data pair and send it to the login page, after
that hold the returned cookie collection so that you can use httpwebrequest
to access other pages secured by the forms authentication later. here is a
good web article demonstrate on this:

http://odetocode.com/Articles/162.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • Re: forms auth, authenticate against already encrypted password?
    ... i actually tried using a WebClient implementation first, sending a POST request to login.aspx which handled Request.Formetc in the Page_Load event. ... i have tried it again using the HttpWebRequest class and now i can share the CookieContainers, ... programamtically send request to forms authentication protected webpage. ... you can consider share a cookie container ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: httpwebrequest when RSA/ACE securid server is involved
    ... IE & HTTPWebRequest have their own connection ... HttpWebRequest instance you are using. ... You will have to replicate the same authentication into the HttpWebRequest ... DefaultCredentials wont work. ...
    (microsoft.public.dotnet.framework)
  • Re: How to import XML RSS though proxy with authentication
    ... authentication for out going requests though the proxy server, ... Dim myProxy As New WebProxy ... Dim myHttpWebRequest As HttpWebRequest = CType, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: forms auth, authenticate against already encrypted password?
    ... I agree with Dominick. ... programamtically send request to forms authentication protected webpage. ... And in webservice scenario, the client proxy just use the httpwebrequest ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: How to fetch the default HTTP proxy
    ... I apparently don't need to do authentication. ... Dim wr As HttpWebRequest = DirectCast, ... dim response as HttpWebResponse = DirectCast, ... I just don't want to hard-code my proxy address in my code. ...
    (microsoft.public.dotnet.framework)