473,761 Members | 10,684 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WCF: Passing Windows-credentials to service

I have created a WCF-service running on IIS. The virtual directory has
anonymous access disabled and requires integrated windows authentication.

The proxy to the service is auto-generated using Visual Studio 2008's
"Add Service reference".

My problem is that when I try to execute a method on the service, I get
the following exception:

The HTTP request is unauthorized with client authentication scheme
'Anonymous'. The authentication header received from the server was
'Negotiate,NTLM '

How do I solve this? I can't seem to get my head around passing the
correct windows-credentials to my channel, so any help will be greatly
appreciated.

My instatiation of my client in code is this:

BWServiceClient BWClient = new BWServiceClient ();

List<Bathingwat erStationlist = new List<Bathingwat erStation>();
list.AddRange(
BWClient.GetBat hingWaterStatio nList(
year_, stationNumber_, stationName_, municipalityCod e_
)
);

Thanks,

--
Jesper ____ Stocholm
MVP - in something totally different ... :o)
Nov 7 '08 #1
0 2867

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

Similar topics

2
1574
by: MuZZy | last post by:
Hi, I am starting a new Smart Client project and wanted to employ th enew WF techniques, Communication Foundation in particular, but i can't find a good book - seems like all are scheduled to go out early next year, so i'm trying to get the idea by reading blogs and msdn articles but i do feel i'm still missing it. Any idea on a good (and up-to-date) WFC book?
7
10827
by: =?Utf-8?B?TW9iaWxlTWFu?= | last post by:
Hello everyone: I am looking for everyone's thoughts on moving large amounts (actually, not very large, but large enough that I'm throwing exceptions using the default configurations). We're doing a proof-of-concept on WCF whereby we have a Windows form client and a Server. Our server is a middle-tier that interfaces with our SQL 05 database server.
10
2476
by: ochocki | last post by:
Hi, Reading about WCF I had this feeling that .net remoting has been left behind. There's a lot about webservices but nothing about remoting which suprises me as MS was encouraging to use it in non-heterogeneous applications before .net 3.0 was released. This is not a technical question, it is rather about the direction MS heads in this matter. What's their vision?
1
6451
by: John Cosmas | last post by:
I need an example of a project where by WCF Host passes a known DATATABLE to the CLIENT. Can someone please do me a big favor. The examples posted by MSFT is just too basic and passes simple strings. I need to pass large set of rows, record to/from client. TIA John
0
1127
by: mlaanti | last post by:
Hello, I asked this couple weeks ago but didn't get answers. So, does Silverlight 2 Beta 2 understand anything about WCF's Exceptions? Trying to passing a fault reason as Exceptions parameters does not appear to Silverlight client. So, could some please tell how to manage this kind of issue?
1
4113
by: =?Utf-8?B?QnJhZA==?= | last post by:
Generally on a Windows system the services file (located in Windows\System32\Drviers\Etc\Services) would specify port allocation to different applications. It contains registered ports and dynamic/private ports. This was used to reduce the chance of Port conflicts. This allowed applications to use a port name or alias instead of a number. In WCF, a common paradigm is to allocate your port number in the app.config file of your...
0
1497
by: bramoin | last post by:
Hi, We are trying to decide if we should use Sockets or WCF for our project. We have two type of clients: 1. Users with IE accessing the server and so we know the answer there is WCF. 2. Processes that communicate with each other on the server. We don't know about WCF internals or dependancies like does it use WCF use IIS? Our testing shows that for file transfers, we get close transfer times to sockets and i think the initial connection is...
5
1919
by: ....DotNet4Ever.... | last post by:
OK here the big problem... My organization is not yet ready to move to .NET 3.5 and even .NET 3.0 is still seen as something "not quite stable" (don't ask me why). For those reasons the project I am working on is still based on .NET 2.0 with Visual Studio 2005 so a migration to Visual Studio 2008 is very unlikely in the near future so I am stuck with that. So this is what I have:
1
11403
by: lmod | last post by:
I am developing an application using WPF and WCF. This app on the server side will need for WCF services hosted in IIS6 to communicate with WCF services that are hosted as Windows services on the same server / or network. Also the WCF services hosted in IIS6 has to communicate with the WPF client apps that will be installed on computers that are not in the same network as the server/s. Right now I am creating small test apps so I can...
0
2477
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi misters, i have an app.config of my App that uses WCF. I need change the configuration servicemodel, and I want update somes values.
0
9333
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,...
0
10107
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...
0
9945
jinu1996
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...
1
9900
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
9765
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
6599
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();...
0
5361
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3863
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
3
3442
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.