473,786 Members | 2,398 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

User Agent String not passed during HTTP CONNECT w/ proxy

Sorry for the cross post from dontnet.framewo rk but I'm hoping this may see
more activity here.

I have written an application to access a web service. The application runs
at multiple sites and must cross a proxy server.

The application runs fine through all proxy servers but one that is
configured to require a "User-Agent" header. I have added the user agent
string, however it does not seem to be passed during the HTTP CONNECT to
utilize the proxy server. It does pass the user agent on requests to the
server hosting the web service though. As and aside, IE does send the
"User-Agent" during the HTTP CONNECT. Is there any way to emulate this?

Many Google searches have turned up one link that expresses the same issue
(http://thedotnet.com/nntp/358127/showpost.aspx) it was from 2005 and didn't
have an answer.

Any help would be appreciated.

I have tried this under .NET 1.1 and 2.0

Below is the C# code excerpt and network traces showing the missing
"User-Agent"; IP/Names have been changed in the trace.

I have tried this under .NET 1.1 and 2.0

Below is the C# code excerpt and network traces showing the missing
"User-Agent"; IP/Names have been changed in the trace.

ws = new Ticketmon.mon_w s();
ws.UserAgent = @"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET+CLR+1.1.4 322; InfoPath.1)";

WebProxy myProxy = new WebProxy();
myProxy.Address = new Uri(proxy_setti ng);
myProxy.Credent ials = CredentialCache .DefaultCredent ials;
ws.Proxy = myProxy;

Internet Protocol, Src: 111.111.111.111 (111.111.111.11 1), Dst:
222.222.222.222 (222.222.222.22 2)
Transmission Control Protocol, Src Port: 1281 (1281), Dst Port: 8080 (8080),
Seq: 1, Ack: 1, Len: 111
Hypertext Transfer Protocol
CONNECT server.domain.c om:443 HTTP/1.1\r\n
Request Method: CONNECT
Request URI: server.domain.c om:443
Request Version: HTTP/1.1
Proxy-Connection: Keep-Alive\r\n
Host: server.domain.c om:443\r\n
\r\n

Jun 5 '07 #1
0 2002

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

Similar topics

1
34075
by: DC_DBA | last post by:
I want to 'grant sysdba to a user' for an application. (At least that is what I believe so far after having had this problem dumped on me 2 days ago.) The support we get from the application vendor is lame, to say the least. Our application users dont know anything. 1. The Oracle 9i server is installed on a Sun Solaris system. 2. I work with Sybase and hence don't know any Oracle. 3. I can start sqlplus but dont know where to go after...
60
7309
by: Fotios | last post by:
Hi guys, I have put together a flexible client-side user agent detector (written in js). I thought that some of you may find it useful. Code is here: http://fotios.cc/software/ua_detect.htm The detector requires javascript 1.0 to work. This translates to netscape 2.0 and IE 3.0 (although maybe IE 2.0 also works with it)
4
6057
by: Wonderinguy | last post by:
Our websphere application uses a generic application userid to connect and query db2 on z/os via DB2 connect. The end user,logs in to the application using his regular userid, which is then authenticated with the mainframe and if its ok, then the application proceeds using the generic application id. We are not able to track the user in the DB2 on Mainframe. Is there anyway I can pass the end userid along with the generic userid, so I...
3
1741
by: Amir Eshterayeh | last post by:
Dear Friends Would you please give me your professional idea about this asp.net problem. I need different virtual directory for different customer with their names like these: www.oursite.com/Jack www.oursite.com/Sue www.oursite.com/Tom
3
1356
by: Raventhorn | last post by:
I am having problems that I also saw people having in the ASP.NET forums with menus and people coming to a site with weird user agent values. Is there a way to access the user agent before the user hits the site so we can determine which ones are screwing up our site? Also, is there a list of user agents available for different browsers?
3
1784
by: Funky | last post by:
Hi, I have developed an ASP.NET application which has been running in production for around 3 months without any major glitches. Recently, a user was attempting to upload a rather large CSV file and ran into a strange problem. After roughly 3 minutes of processing, the application reprompted the user for their user name and password (NT authentication). At this point, the ASP.NET page re-fired the last event that it was processing.
0
2382
by: =?Utf-8?B?TWlrZTEz?= | last post by:
Sorry for the cross post; I'm hoping this will get a response here... I have written an application to access a web service. The application runs at multiple sites and must cross a proxy server. The application runs fine through all proxy servers but one that is configured to require a "User-Agent" header. I have added the user agent string, however it does not seem to be passed during the HTTP CONNECT to utilize the proxy server. ...
9
6281
by: Gordon | last post by:
I want to add a feature to a project I'm working on where i have multiple users set up on my Postgres database with varying levels of access. At the bare minimum there will be a login user who only has read access to the users table so that users can log in. Once a user has been logged in successfully I want to escalate that user's access level to one appropriate to their role, which will include switching the postgres user they are...
35
2494
by: RobG | last post by:
Seems developers of mobile applications are pretty much devoted to UA sniffing: <URL: http://wurfl.sourceforge.net/vodafonerant/index.htm > -- Rob
0
9647
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7512
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4066
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
2
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.