401 - Unauthorized Returned from Webrequest

Results 1 to 2 of 2

Thread: 401 - Unauthorized Returned from Webrequest

  1. #1
    Join Date
    Dec 1969

    Default 401 - Unauthorized Returned from Webrequest

    Hi,<BR>I&#039;m using an asp.net page to answer server posts and then call applications. The asp.net page processes the web post and then uses webrequest to call the relevant asp.net application page. Thus I&#039;m saved from having to do response.redircts old style.<BR>Problem is that though my applications were working using response.redirect they now want authorisation even though they are on the same server. Asp pages are working fine.<BR>Do I need to set permissions for this kind of page sucking in web.config?<BR>Any help appreciated.<BR>Thanks<BR>Ronan<BR>CODE:<BR>&#039; Initialize the WebRequest.<BR> Dim myRequest As WebRequest = WebRequest.Create(strTarget)<BR> &#039; Return the response. <BR> Dim myResponse As WebResponse = myRequest.GetResponse()<BR> Dim respStream As Stream = myResponse.GetResponseStream()<BR>ERROR:<BR>A WebException has been caught.System.Net.WebException: The remote server returned an error: (401) Unauthorized. at System.Net.HttpWebRequest.CheckFinalStatus() at System.Net.HttpWebRequest.EndGetResponse(IAsyncRes ult asyncResult) at System.Net.HttpWebRequest.GetResponse() at ASP.receive_aspx.Page_Load(Object Source, EventArgs E) in C:sites
    eceive.aspx:line 42 401 - Unauthorized

  2. #2
    Join Date
    Dec 1969

    Default RE: 401 - Unauthorized Returned from Webrequest

    hmm soo are all the pages that ur "redirecing" too are part of the same project or different projects ..Also what kinda authentication u have windows or forms ...fill in more details about what ur enviroment is....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts