Re: 401 While Accessing Web Service

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Apr 29, 3:32 pm, "Nirosh" <Nir...@xxxxxxxx> wrote:
I am not sure whether this is the only way.. When you say it worked with C++
and now is not working with aspx/c# web site, that is interesting..

The WSE 3.0 should work fine with framework 3.0/3.5. But if you want it to
work with VSS 2008 IDE then you need to trick it.

e.g.:-http://devlicio.us/blogs/derik_whittaker/archive/2008/04/03/wse-3-0-s...
But I din't do this.. so please do it with extra care..

--
L.W.C. Nirosh

"Ben" <benm5...@xxxxxxxxx> wrote in message

news:d424f374-f2ae-4691-bfa5-a2186116e223@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Apr 29, 3:03 pm, "Nirosh" <Nir...@xxxxxxxx> wrote:





okay, check WSE (Web Service Enhancement) to see how to improve the web
service security..

to avoid the dependacy with integrated authentication, create a new web
site
for your web service, that way it should work fine.

--
L.W.C. Nirosh

"Ben" <benm5...@xxxxxxxxx> wrote in message

news:693f7c2e-35f2-4ace-b6d5-fb427b2547e6@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Apr 29, 2:30 pm, "Nirosh" <Nir...@xxxxxxxx> wrote:

http://www.dotnetbips.com/articles/dbd724e9-78f0-4a05-adfb-190d151103....

check this and see..

--
L.W.C. Nirosh"Ben" <benm5...@xxxxxxxxx> wrote in message

news:b5138c67-4566-4595-84a2-336f6a582d1e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

I'm trying to access a c# web service from a web form.

I set up the web reference proxy object as follows:

proxy.PreAuthenticate = true;
proxy.Credentials = CredentialCache.DefaultCredentials;

but i get a 401 error. If I switch the IIS website from Integrated
Windows Auth to Anonymous, it works... but i want it to use windows
security.

my web.config of the web form is set to imperonsate the logged on
user, and i verified that's working by checking that
this.User.Identity.Name is my domain user (which has access to the web
service).

Any ideas what i'm doing wrong? (btw, the web service is SSL if that
makes a difference).

Thanks!- Hide quoted text -

- Show quoted text -

thanks,
anyway to do it without using web form authentication?

the crazy thing is that if i fire up my web form from Visual Studio it
works just fine and can access the web service, but if i publish it to
another server and try from there I get the 401 (the site i'm
publishing to is using 'intergrated windows auth') .- Hide quoted text -

- Show quoted text -

I'm using VS2008... is there WSE for that version? i can only find it
for VS2005?

is this the only way?  i made C# web services before that were hosted
on an IIS site with intergrated windows auth, but the client side was C
++ and i was able to pass current nt credentials without a problem....
this is my first attempt where the client side is another c# web page.- Hide quoted text -

- Show quoted text -

I switched the project to VS2005 just to test and enabled WSE 3.0
support -- is there any additional settings i need to change since it
still throws the same error...
.



Relevant Pages

  • Re: How to call Web Service Securely
    ... Maybe I am complicating WSE too much - can you point me to a simple ... you could provide a logon screen in the client app and create a NetworkCredential ... tokens - but that is tied to .NET 2.0 ... make a web method via dialup to my IIS Web Service. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • WSE3 web farm problem: "Key not valid for use in specified state"
    ... I have a web service in ASP.NET 2.0 and WSE 3.0. ... server1, and the actual request went to server2, like the following ... Client output: RST ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Web Services, Security, X.509
    ... We have a smart client application which consumes an internet-facing ... (At this time the web service and the client use ... WSE 3.0 and it is working ... Finally, if a X.509 certificate is required, which certificate is the ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • had to elevate ASPNET account user rights assignment
    ... I have a client running in our office and asp.net web service ... I finally got the wse 2.0 enabled asp.net web service ... authenticate my username and password as cleartext? ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: Problem invoking WSE 2.0 enabled WebService
    ... Yes I mean secure web service implemented with WSE. ... enabled web service by manually creating the security header from the ... you can not consume it from a client application that ...
    (microsoft.public.dotnet.framework.webservices.enhancements)