473,385 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Q: User Agent String not passed during HTTP CONNECT w/ proxy

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. 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_ws();
ws.UserAgent = @"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
..NET+CLR+1.1.4322; InfoPath.1)";

WebProxy myProxy = new WebProxy();
myProxy.Address = new Uri(proxy_setting);
myProxy.Credentials = CredentialCache.DefaultCredentials;
ws.Proxy = myProxy;
Internet Protocol, Src: 111.111.111.111 (111.111.111.111), Dst:
222.222.222.222 (222.222.222.222)
Transmission Control Protocol, Src Port: 1281 (1281), Dst Port: 8080 (8080),
Seq: 1, Ack: 1, Len: 111
Hypertext Transfer Protocol
CONNECT server.domain.com:443 HTTP/1.1\r\n
Request Method: CONNECT
Request URI: server.domain.com:443
Request Version: HTTP/1.1
Proxy-Connection: Keep-Alive\r\n
Host: server.domain.com:443\r\n
\r\n
Jun 5 '07 #1
0 2326

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

Similar topics

1
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...
60
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 ...
4
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...
3
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:...
3
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...
3
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...
0
by: =?Utf-8?B?TWlrZTEz?= | last post by:
Sorry for the cross post from dontnet.framework 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...
9
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...
35
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
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.