473,943 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Webservice client fails on even numbered calls

Hi,

I have an unmanaged VC7 app calling a C# dotnet service. I'm using the
VS2003 generated proxy class derived from
CSoapSocketClie ntT. The client app works fine for most of my customers, but
for some it appears to be upset by their firewall / proxy.

If I use CSoapSocketClie ntT.SetProxy(NU LL) to pick up the proxy settings
from IE, attempting to call a web method fails on every second call with
SOAP_CLIENT_SEN D_ERROR, any idea on what is happening here? I can change
the order of the calls to the web methods and it still fails on every second
call. If I don't call SetProxy(NULL) then it works fine on all calls. I
have tested the proxy settings in IE and they are correct and working.

Also, I'm trying to handle the situation where a proxy requires
authentication. After a bit of searching I came up with:

m_pSUws->SetProxy(NULL) ;
CAtlHttpClient& httpClient = m_pSUws->m_socket;
CNTLMAuthObject authNTLM;
CBasicAuthObjec t authBASIC;
httpClient.AddA uthObj(_T("NTLM "), &authNTLM);
httpClient.AddA uthObj(_T("BASI C"), &authBASIC);
httpClient.Nego tiateAuth(true) ;

m_pSUws is the CSoapSocketClie ntT derived proxy class. Am I on the right
track with this?

Thanks,

Paul
Nov 12 '05 #1
3 2793
Ok, I found out I need to derive a class from CBasicAuthObjec t and collect
the username / password. I'm still stuck with calls to the web method
failing on every even numbered attempt.

Thanks,

Paul

<pa**@palmnospa m.com> wrote in message
news:uw******** ******@tk2msftn gp13.phx.gbl...
Hi,

I have an unmanaged VC7 app calling a C# dotnet service. I'm using the
VS2003 generated proxy class derived from
CSoapSocketClie ntT. The client app works fine for most of my customers, but for some it appears to be upset by their firewall / proxy.

If I use CSoapSocketClie ntT.SetProxy(NU LL) to pick up the proxy settings
from IE, attempting to call a web method fails on every second call with
SOAP_CLIENT_SEN D_ERROR, any idea on what is happening here? I can change
the order of the calls to the web methods and it still fails on every second call. If I don't call SetProxy(NULL) then it works fine on all calls. I
have tested the proxy settings in IE and they are correct and working.

Also, I'm trying to handle the situation where a proxy requires
authentication. After a bit of searching I came up with:

m_pSUws->SetProxy(NULL) ;
CAtlHttpClient& httpClient = m_pSUws->m_socket;
CNTLMAuthObject authNTLM;
CBasicAuthObjec t authBASIC;
httpClient.AddA uthObj(_T("NTLM "), &authNTLM);
httpClient.AddA uthObj(_T("BASI C"), &authBASIC);
httpClient.Nego tiateAuth(true) ;

m_pSUws is the CSoapSocketClie ntT derived proxy class. Am I on the right
track with this?

Thanks,

Paul

Nov 12 '05 #2
Hello Paul,

Thanks for your post. As I understand, the problem you are facing is that
your ATL client fails to call a web service on even number, and it works
fine if you do not call CSoapSocketClie ntT::SetProxy. Please correct me if
there is any misunderstandin g. I think more information is needed before
moving forward:

1. As I know, m_pSUws is an instance of the CSoapSocketClie ntT derived
proxy class. Do you delete the m_pSUws object and create a new one for each
call?

2. Did you call CSoapSocketClie ntT::CleanupCli ent which should be called to
clean up the current request and response before making another request?

3. Is it possible to post a sample project and tell us the detailed steps
to reproduce the problem? I will be glad to test it on my side.

I look forward to your response.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 12 '05 #3
Hi Tian,

Thanks for looking at this.

1), no, I create a single instance and delete it only when the app closes

2) yes

3) Here is a condensation of the code:

m_pSUws = new CSmartUpdateT<C SoapSocketClien tT<> > ();
m_pSUws->SetTimeout(300 00);
if (m_dlgOptions.m _bUseProxy)
m_pSUws->SetProxy(NULL) ;
CAtlHttpClient& httpClient = m_pSUws->m_socket;
CNTLMAuthObject *authNTLM = new CNTLMAuthObject ;
CSampleBasicAut h *authBASIC = new CSampleBasicAut h;
httpClient.AddA uthObj(_T("basi c"), authBASIC,authB ASIC);
httpClient.AddA uthObj(_T("NTLM "), authNTLM);

m_pSUws->CleanupClient( );
HRESULT hres = m_pSUws>WebMeth od1(..);
m_pSUws->CleanupClient( );
hres = m_pSUws->WebMethod2(..) ;
m_pSUws->CleanupClient( );
hres = m_pSUws->WebMethod3(..) ;
m_pSUws->CleanupClient( );
hres = m_pSUws->WebMethod4(..) ;
m_pSUws->CleanupClient( );

WebMethod 1 & 3 will succeed, 2 & 4 will fail.

The app fails to launch on Windows 98 clients, the implementation of
CNTLMAuthObject is linked to some missing exports in secure32.dll. The
HTTPClientSampl e also has this problem - there an update to the source that
fixes this?

Also, is there an example of how to do derive from CNTLMAuthObject when the
windows logon credentials fail the proxy authentication and the user should
be prompted to supply different ones?

Kind Regards,

Paul

"Tian Min Huang" <ti******@onlin e.microsoft.com > wrote in message
news:3d******** *****@cpmsftngx a06.phx.gbl...
Hello Paul,

Thanks for your post. As I understand, the problem you are facing is that
your ATL client fails to call a web service on even number, and it works
fine if you do not call CSoapSocketClie ntT::SetProxy. Please correct me if
there is any misunderstandin g. I think more information is needed before
moving forward:

1. As I know, m_pSUws is an instance of the CSoapSocketClie ntT derived
proxy class. Do you delete the m_pSUws object and create a new one for each call?

2. Did you call CSoapSocketClie ntT::CleanupCli ent which should be called to clean up the current request and response before making another request?

3. Is it possible to post a sample project and tell us the detailed steps
to reproduce the problem? I will be glad to test it on my side.

I look forward to your response.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 12 '05 #4

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

Similar topics

2
5725
by: Miguel | last post by:
Hi, I'm developing an application in C# with Windows Forms for my company that is similar to the MSN Messenger. This application uses a webservice for registering users, etc... and as 2 webbrowser controls on it. Besides that i'm using the firewall client for isa server 2004 and it seems that the browsers aren't able to pass thru it... if i disable the firewall the browsers work fine, if i don't, the 2 browsers just stay there...
5
8277
by: jb | last post by:
*Please* help --- I'm tearing my hair out. I want to use sessionstate in a webservice, accessed from a client, written in script (JScript, InfoPath). I have written my webservice (C# .NET). I have marked the method(s) with EnableSession=true. I have read everything there is to read! I am told that to reuse session, my client needs to receive a cookie in the header from the webservice and then pass this back in all future calls. ...
6
1583
by: kenneth fleckenstein nielsen | last post by:
Hi guru's It runs ok on my developmaschine, and on the test server that i've set up. but fails after installing on the customers server. I made a XML webservice that does these steps: a) access a db for updating ( fails on client ) b) saves some associated files (DIMES/SOAP) ( not testet outside development ) c) writes a log file ( fails on client ) I think a and c has to do with setting ISS up correctly on the customers server.
2
2232
by: Naeem Sarfraz | last post by:
Any advice for the following situation? I've deployed my webservice on a remote server, e.g. http://mywebservice.co.uk/summary.asmx. The windows clients attempts to access this webservice and fails, the error returned is "there was an error processing the <Security> header". If I run the client on the server there is no problem. Help!
2
3024
by: dhow | last post by:
I hava a simple webservice(Just sleep for 30 seconds) which is developed using Java and deployed on WebLogic,and I aslo make a client using VB.net. In the client I create 5 threads to call the webservice. The question is why only 2 threads are successe to call the webservice, the others call the webservice method but their status is waiting.
0
1877
by: alberich | last post by:
I have a problem securing my webservice with Windows authentication. The goal is a client app transfering (large amounts of) data to a server which is blocked for anonymous requests. To do this, the client app asks the user for credentials, build some NetworkCredential wit them & adds them to the CredentialCache. When i look at the iis log, each call to my webmethod appears twice in the log - first try without credentials (which fails with...
1
2028
by: intrepid_dw | last post by:
All: I have prepared a .NET 1.1 client application that consumes a remote, public web service. All the functions work as expected, and, in general, the application has been successful for my purposes. I have discovered one bit of behavior that surprises me, however. At certain times, under heavy server-side loads, my calls to certain web service methods will time out on the *client* side (proxy timeout). My assumption was that the...
3
1576
by: James | last post by:
Hi, I have built a windows app that makes calls to a webservice. Both webservice and windows apps are built with .net 2.0. The problem is... when I run the client Windows app on the dev machine, calls to the production webservice are very fast (milliseconds). When I run the exact same Windows app on a different machine... same log in, calling a webservice on the same production server.... EVERY call takes 5 seconds (not just the first...
0
11532
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
11298
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
10662
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...
0
9864
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8219
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
7390
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4910
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
4510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3511
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.