Topaz Filer: if you use e-mail for business, we can save you money and decrease your risk.
web services (proxy port)
Messages   Related Types
This message was discovered on microsoft.public.dotnet.framework.webservices.


Afsheen
Hi,

I have a client calling a web service. I need to check at the client end the auto detect proxt setting if they are not set then the client should connect to internet by specifying the proxy port and proxy number for them to start using a web service. I have to port code from vb 6 to vb.net. In vb 6 there are properties to do that when creating a soap object with soap toolkit ... Whats the equivalent of this in .net .. the vb 6 code is given below. How can i check in .net whether the proxy settings are automatic or not.

Set ObjSP = New MSSOAPLib30.SoapClient30

ObjSP.MSSoapInit Trim(gObjSys.ExtractWSDLUrl), Trim(ExtractService), Trim(ExtractPort)

ObjSP.ConnectorProperty("ConnectTimeout") = 5000

'// if auto detect then use these settings
If gObjSys.ProxyUse = "1" Then
ObjSP.ConnectorProperty("ProxyServer") = ProxyName & ":" & ProxyPort
Else
ObjSP.ConnectorProperty("ProxyServer") = "<CURRENT_USER>"
ObjSP.ConnectorProperty("EnableAutoProxy") = True
End If

If gObjSys.SOAPTimeOut <> "0" Then
If IsNumber(SOAPTimeOut) Then
ObjSP.ConnectorProperty("Timeout") = CLng(SOAPTimeOut)
End If

thnaks
Afsheen
Reply to this message...
Vote that this is a GOOD answer...
 
Auto-following on Twitter
Ubuntu and XP on one “desktop”
 
    
Jan Tielens
You can use the GetDefaultProxy method:
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemnetwebproxyclassgetdefaultproxytopic.asp

For more info on web services behind proxy servers:
http://codeproject.com/vb/net/web_service_by_proxy.asp

--
Greetz
Jan
________________
Read my weblog: http://weblogs.asp.net/jan

"Afsheen" <Click here to reveal e-mail address> schreef in bericht
news:Click here to reveal e-mail address...
[Original message clipped]

connect to internet by specifying the proxy port and proxy number for them
to start using a web service. I have to port code from vb 6 to vb.net. In
vb 6 there are properties to do that when creating a soap object with soap
toolkit ... Whats the equivalent of this in .net .. the vb 6 code is given
below. How can i check in .net whether the proxy settings are automatic or
not.
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
Outlook interop - stopping user properties appearing on Outlook message print
Seriously, why is “cut and paste” majorly newsworthy???
 
 




Ad
BootFX
Reliable and powerful .NET application framework.
Recession Busting Bespoke Software
Get through the recession by investing in bespoke software to decrease costs and create commercial opportunities.
Other DN247 Network Sites
.NET 247
SQL Server Wins
Old Skool Developer
 
Copyright © AMX Software Ltd 2008-2009. Portions copyright © Matthew Baxter-Reynolds 2001-2009. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - .NET 247 is a member of the DN247 Network - 4.0.30129.1734