Hi,
I've created a small forms based application in c# to test a vendor's
product and the web service interface that it exposes. We have deployed two
instances of the vendor product one which has an unprotected (no
authentication) interface and one that is protected using HTTP basic
authentication.
I can invoke methods on the unprotected instance and everything's fine. When
I attempt to invoke methods on the protected instance the request sent in
response to the challenge from the server is truncated and has no message
body.
Ethereal trace below:
POST /ProvisionInterf ace HTTP/1.1
VsDebuggerCausa lityData: <data snipped>
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 1.1.4322.2032)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.blug.com/wsdlUserExists"
Content-Length: 387
Expect: 100-continue
Connection: Keep-Alive
Host: 1.2.3.4:50000
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
<soap:Body>
<UserExists xmlns="http://www.blug.com/wsdl">
<PublicID>
<id>te***@bt.co .uk</id>
<type>1</type>
</PublicID>
</UserExists>
</soap:Body>
</soap:Envelope>
HTTP/1.1 401 UNAUTHORIZED
WWW-Authenticate: Basic realm="Provisio nInterface"
cache-control: no-cache
content-length: 25
content-type: text/html
date: Thu, 22 Jun 2006 12:35:34 GMT
last-modified: Thu, 22 Jun 2006 12:35:34 GMT
POST /ProvisionInterf ace HTTP/1.1
VsDebuggerCausa lityData: <data snipped>
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client
Protocol 1.1.4322.2032)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.blug.com/wsdlUserExists"
Authorization: Basic UFdTSToxMjM0
Content-Length: 387
Expect: 100-continue
Host: 1.2.3.4:50000
<*** message body missing/truncated ***>
The only means I know of influencing the authentication phase is by
attaching a NetworkCredenti al object to the SOAP proxy and the authentication
process is transparent to the application as far as I'm aware.
Has anyone else experienced this problem ?
Thanks,
Tony 1 9525
I've figured out what the problem was (for anyone else who's interested).
It appears that the vendor product is not responding to the
Expect:100-Continue header correctly (i.e. returning 417 Expectation Failed
to indicate it's not a supported feature) and so the SOAP proxy is waiting
for a 100 Continue provisional response prior to sending the message body.
The following line of code stops the SOAP proxy from adding this header to
the SOAP request:
System.Net.Serv icePointManager .Expect100Conti nue = false;
Regards,
Tony
"Tony Stephens" wrote: Hi,
I've created a small forms based application in c# to test a vendor's product and the web service interface that it exposes. We have deployed two instances of the vendor product one which has an unprotected (no authentication) interface and one that is protected using HTTP basic authentication.
I can invoke methods on the unprotected instance and everything's fine. When I attempt to invoke methods on the protected instance the request sent in response to the challenge from the server is truncated and has no message body.
Ethereal trace below:
POST /ProvisionInterf ace HTTP/1.1 VsDebuggerCausa lityData: <data snipped> User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.1.4322.2032) Content-Type: text/xml; charset=utf-8 SOAPAction: "http://www.blug.com/wsdlUserExists" Content-Length: 387 Expect: 100-continue Connection: Keep-Alive Host: 1.2.3.4:50000
<?xml version="1.0" encoding="utf-8"?> <soap:Envelop e xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/" xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http ://www.w3.org/2001/XMLSchema"> <soap:Body> <UserExists xmlns="http://www.blug.com/wsdl"> <PublicID> <id>te***@bt.co .uk</id> <type>1</type> </PublicID> </UserExists> </soap:Body> </soap:Envelope>
HTTP/1.1 401 UNAUTHORIZED WWW-Authenticate: Basic realm="Provisio nInterface" cache-control: no-cache content-length: 25 content-type: text/html date: Thu, 22 Jun 2006 12:35:34 GMT last-modified: Thu, 22 Jun 2006 12:35:34 GMT
POST /ProvisionInterf ace HTTP/1.1 VsDebuggerCausa lityData: <data snipped> User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.1.4322.2032) Content-Type: text/xml; charset=utf-8 SOAPAction: "http://www.blug.com/wsdlUserExists" Authorization: Basic UFdTSToxMjM0 Content-Length: 387 Expect: 100-continue Host: 1.2.3.4:50000
<*** message body missing/truncated ***>
The only means I know of influencing the authentication phase is by attaching a NetworkCredenti al object to the SOAP proxy and the authentication process is transparent to the application as far as I'm aware.
Has anyone else experienced this problem ?
Thanks,
Tony This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: conradwt |
last post by:
Hi, I'm configuring a PHP script to use HTTP Basic Authentication.
Thus, is it possible to test basic authentication using 'localhost'?
If so, could someone send me a working .htaccess file because the
following doesn't seem to launch the login dialog:
AuthType Basic
AuthName "TEST HOST"
AuthUserFile C:/wwwroot/testhost/passwd/.htpasswd
AuthGroupFile /dev/null
<Limit Get>
|
by: jeff |
last post by:
does anyone can help me with following situation.
I use win32com.client to dispatch IE for a URL
browing.
However, the URL I am going require a HTTP basic
authentication login.
When IE starts to brow,the Login window pop up.
I was trying to enter the right password for it, but
IE wouldn't take it. it just keep poping up login
window. How do I write auto login method to send
user/password with COM method to bypass pop window for
|
by: Vivek |
last post by:
Hi,
Can anyone provide me with sample code that will allow me to use
SOAPpy with a WSDL file using HTTP basic authentication? The only
thing I've been able to find on the net is SOAPpy.URLopener. However,
I am unclear what the relationship is between SOAPpy.URLopener and
SOAPpy.WSDL is.
Is it as straightforward as this?
> from SOAPpy import WSDL
|
by: Michael Foord |
last post by:
#!/usr/bin/python -u
# 15-09-04
# v1.0.0
# auth_example.py
# A simple script manually demonstrating basic authentication.
# Copyright Michael Foord
# Free to use, modify and relicense.
# No warranty express or implied for the accuracy, fitness to purpose
|
by: Yodai |
last post by:
Hi all...
I have this project on an embbeded system where I've programmed a very
simple dynamic web-server on C, which serves 1 connection at a time. I need
to implement a basic authentication system. I've heard the easiest is to go
for
HTTP 1.1 authentication, but I don't know ho to implement it.... Can anybody
give me some advice, guidelines on where to start?
Thank's ...... oh, and happy new year!!
| |
by: Pete |
last post by:
I'm cross posting from mscom.webservices.general as I have received no answer
there:
There has been a number of recent posts requesting how to satisfactorily
enable BASIC authorization at the HTTP level but as yet no fully useful
answer.
I too have been trying to call an apache/axis webservice which desires a
username/password from my C# Client. (ie the equivalent of
_call.setUsername("Myname") name from within a Java client proxy)...
|
by: Gilles Ganault |
last post by:
Hello
I have a PHP script rss.php that serves RSS to clients. It
work fine, but I'd like to server customized contents, and for this, I
need to know who the user is.
Unless there's a better way, it looks like the easiest way is to use
HTTP basic authentication:
http://en.wikipedia.org/wiki/Basic_authentication_scheme
|
by: Max |
last post by:
Following the tutorial at http://personalpages.tds.net/~kent37/kk/00010.html,
I understand how to access HTTP basic authenticated pages or form-
based authenticated pages. How would I access a page protected by both
form-based authentication (using cookies) *and* HTTP basic
authentication?
|
by: Tom |
last post by:
Hi,
I need to connect to a SOAP web service (Java server) that requires
basic HTTP authentication over HTTP (not HTTPS). I've tried the
following setup:
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Basic"
proxyCredentialType="Basic" />
</security>
|
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...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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...
|
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 captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |