Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Calling Web Service that calls other Web Service with Windows Authentication

Reply
Thread Tools

Calling Web Service that calls other Web Service with Windows Authentication

 
 
manuelserpabrandao@gmail.com
Guest
Posts: n/a
 
      06-14-2006
Hi all


I would like to now the answer to the following problem, if someone can

help.


Given a windows application client that's calling a web service (using
default credentials) the
web service gets invoked fine with the users credentials. However they
need
to call a second web service from the first one. When it hits the
second web
service, the web service (even though configured correctly) always
reports (401) Unauthorized.


Is there any possibility to do this or is impossible ?


Is possible to implement any workaround for this problem ?


Thanks in advance


Manuel Brandão

 
Reply With Quote
 
 
 
 
Balasubramanian Ramanathan
Guest
Posts: n/a
 
      06-14-2006
you can do this...

In webservice1 code behind you will be creating the reference object of the
second webservice.

There you can specify whet credential you have to use when calling web
service2.
for example

WebService2 ws = new WebService2();
ws.Credentials = ................

and call the 2nd web service..

since be default webservice2 will be called with the credential of asp.net
worker process you will be gettting this error.

Hope this helps

<> wrote in message
news: oups.com...
Hi all


I would like to now the answer to the following problem, if someone can

help.


Given a windows application client that's calling a web service (using
default credentials) the
web service gets invoked fine with the users credentials. However they
need
to call a second web service from the first one. When it hits the
second web
service, the web service (even though configured correctly) always
reports (401) Unauthorized.


Is there any possibility to do this or is impossible ?


Is possible to implement any workaround for this problem ?


Thanks in advance


Manuel Brandão


 
Reply With Quote
 
 
 
 
bruce barker \(sqlwork.com\)
Guest
Posts: n/a
 
      06-16-2006
the second web service must be on the same server as the first web service
for this to work.

if its on a different server, then you must switch to basic or Kerberos
authentication.

-- bruce (sqlwork.com)

"Balasubramanian Ramanathan" <> wrote in message
news:...
> you can do this...
>
> In webservice1 code behind you will be creating the reference object of
> the second webservice.
>
> There you can specify whet credential you have to use when calling web
> service2.
> for example
>
> WebService2 ws = new WebService2();
> ws.Credentials = ................
>
> and call the 2nd web service..
>
> since be default webservice2 will be called with the credential of asp.net
> worker process you will be gettting this error.
>
> Hope this helps
>
> <> wrote in message
> news: oups.com...
> Hi all
>
>
> I would like to now the answer to the following problem, if someone can
>
> help.
>
>
> Given a windows application client that's calling a web service (using
> default credentials) the
> web service gets invoked fine with the users credentials. However they
> need
> to call a second web service from the first one. When it hits the
> second web
> service, the web service (even though configured correctly) always
> reports (401) Unauthorized.
>
>
> Is there any possibility to do this or is impossible ?
>
>
> Is possible to implement any workaround for this problem ?
>
>
> Thanks in advance
>
>
> Manuel Brandão
>
>



 
Reply With Quote
 
Martin.Kunc@gmail.com
Guest
Posts: n/a
 
      06-17-2006
Hello all,
this is problem known as dual hop. You are passing credentials (by
token) to one server, this is correct (just windows token is passed),
but you cannot pass token somewhere else on remote computer, this would
be potential security bug (program could use passed access to do
something).
Solution is as was written by Bruce Barker,
- either using basic authentication (passing user and password using
cleartext) Then you can easily use name and password for login without
troubles, but you are facing risk of network listening ..
- either kerberos network token passing - this also is not as secure as
it should be. You need to configure remote computer for using this
access in Active Directory.
- and the last passibility is easily use the same computer for two web
services - then you do not need to pass token remotely and windows can
handle this on single computer.

Martin Kunc

Balasubramanian Ramanathan wrote:
> you can do this...
>
> In webservice1 code behind you will be creating the reference object of the
> second webservice.
>
> There you can specify whet credential you have to use when calling web
> service2.
> for example
>
> WebService2 ws = new WebService2();
> ws.Credentials = ................
>
> and call the 2nd web service..
>
> since be default webservice2 will be called with the credential of asp.net
> worker process you will be gettting this error.
>
> Hope this helps
>
> <> wrote in message
> news: oups.com...
> Hi all
>
>
> I would like to now the answer to the following problem, if someone can
>
> help.
>
>
> Given a windows application client that's calling a web service (using
> default credentials) the
> web service gets invoked fine with the users credentials. However they
> need
> to call a second web service from the first one. When it hits the
> second web
> service, the web service (even though configured correctly) always
> reports (401) Unauthorized.
>
>
> Is there any possibility to do this or is impossible ?
>
>
> Is possible to implement any workaround for this problem ?
>
>
> Thanks in advance
>
>
> Manuel Brandão


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in running a basic code in python 3.3.0 that includes HTML file Satabdi Mukherjee Python 1 04-04-2013 07:48 PM
Ajax calls web service in wcf(windows service) Billy Zhang ASP .Net 7 07-31-2008 07:37 AM
Calling Web Service that calls other Web Service with Windows Authentication manuelserpabrandao@gmail.com ASP .Net Security 1 06-14-2006 08:55 PM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
User authentication on Web Service calls from an NTD app Mike Friel ASP .Net Web Services 0 10-24-2003 10:12 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57