473,548 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

"401 Unauthorized" returned in cookieless mode

Hi,

I've worte a program that will grab the html file content from web server.
It's work

------------------------------------------------------------------------------------------------------------------------------
string strURL = "http://127.0.0.1/webapp/requestview.asp x?id=1185";
HttpWebRequest request = (HttpWebRequest )WebRequest.Cre ate(strURL);
HttpWebResponse response = null;
NetworkCredenti al credentials = new NetworkCredenti al("abc", "password",
"svr001");
request.Credent ials = credentials;
response = (HttpWebRespons e)request.GetRe sponse();
------------------------------------------------------------------------------------------------------------------------------

But when I change Cookieless to "true" in web.config file, the URL will
redirect to other URL with session id

http://127.0.0.1/webapp/(fadfasdfade...w.aspx?id=1185

And I will receive "401 Unauthorized" from WebException when I call
request.GetResp onse().
How can I solve this problem? and grab the file content

Thanks
Daatmor
Dec 6 '05 #1
0 1113

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
5788
by: jerrygarciuh | last post by:
Hello, I am finding that on a new server where I am developing $_SERVER and $_SERVER Do not show up in $_SERVER when I when they should be defined I test using print_r($_SERVER) or this
1
395
by: CLEAR-RCIC | last post by:
I'm trying to use the Webclient class to "POST" to a web site. The website is using basic authentication. Im getting a "(401) Unauthorized" error. Here is my basic code: dim myWebClient as WebClient = New WebClient myWebClient.Credentials = New NetworkCredential("user", "pass") bytReturn = myWebClient.UploadData(strURL, bytRequest) I...
1
841
by: ag | last post by:
Hi guys.. need your help. We have abc.asp page on the source server which calls a .net component on that server. The component is in MTS running under say "domain2\id1" identity. The component uses HttpWebRequest to call xyz.asp on the target server. Both servers are under the same domain say domain1 and there is a trust between domain1 and...
0
1867
by: diarmaid | last post by:
Hi, I have a password-protected area on my site. I'm not using any server authentication methods: Instead I prompt the user for a username and password using an HTML form and check these against a database of registered users. I was thinking that this page should be returning a HTTP status code of "401 Unauthorized" instead of its...
0
1559
by: Sean OConnor | last post by:
I have three servers, public web server (e.g. web1), file server (file1), and web services server (service1). web1 is in the DMZ and file1 and service1 are internal. I'm calling the webservices from an ASP page using the Microsoft SOAP Toolkit 2.0. I'm seting impersonation in my web.config using an service account that has the appropriate...
0
2183
by: Shree | last post by:
While invoking the web service from client, I am setting the credentitals using the following code... ReportingService.Credentials = System.Net.CredentialCache.DefaultCredentials; But in debugger when I check the properties - 'domain', 'user name' and 'password' set in the ReportingService.Credentials; they are blank!!!
1
6813
by: robert | last post by:
In a DAV scheme with PROPFIND or GET (PROPFIND /test/ HTTP/1.1) and Basic AUTH to a MS SharePoint over https server (AUTH required), he responds 'WWW-Authenticate: NTLM' only: reply: 'HTTP/1.1 401 Unauthorized\r\n' header: Content-Length: 1656 header: Content-Type: text/html header: Server: Microsoft-IIS/6.0 header: WWW-Authenticate:...
0
1877
by: =?Utf-8?B?R2VvcmdlIFNodWk=?= | last post by:
I have a folder structure such like this. A ---A1 -----a1.aspx ---A2 A1 and A2 are the subfolder of A. And under the A1 folder, it contains one aspx file named a1.aspx. I set the IIS virtual dictionary to A folder. And IIS has allowed annoymous access. But when I use following code to access the webpage and I got the error" The
11
8304
by: jjw92 | last post by:
I've been banging my head against the wall with this one for a couple days so I'm hoping someone has some ideas. I have a web service that I created that is called by a .NET class library (which in turn is called by another application). This all works fine in my development environment. Test environment: Windows Server 2003, ASP 6.0, .NET...
0
7518
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7954
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6039
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5367
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5085
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3497
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1932
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1054
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
755
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.