473,289 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,289 software developers and data experts.

.NET Windows Service: Credentials

Sakalicek
Hello.

I have problem with network credentials on my Windows service.

I have 2 PCs.
On the first PC I create controller which calls windows service on the other PC.
Always I got InvalidCredentialException when I try to call service.

Coud you please help me to fix it?
I have read something about it and also tried something, but it doesnt help much.

One solution of this problem coud be to set the windows service on the second PC to run under some speficied acccount instead of local account.

But I d not like to make it this way.

Thx for eny hep.

Zdenek.
Nov 13 '07 #1
6 1783
radcaesar
759 Expert 512MB
You should have the exact same account setup on both machines.
Nov 13 '07 #2
Yes, that I thought, but isnt there some way how to solve it more "like programmer"?

I thought something about channels or something like that.

You should have the exact same account setup on both machines.
Nov 14 '07 #3
Frinavale
9,735 Expert Mod 8TB
Yes, that I thought, but isnt there some way how to solve it more "like programmer"?

I thought something about channels or something like that.
Could you please provide us with a bit more information about the application you are developing.

Is it a Web Application, a Web Service, or other?

Thanks

-Frinny
Nov 14 '07 #4
On the first PC there is installed Windows Service.
This one calls other Windows Service on the other PC.
Both PCs are Virtual Machines on Virtual Machine Server.
So both PCs run under the VMuser account.
So I think that there cant be any problem with credentials, but there is.

If I try to call the Windows Service on the second PC from my computer (connected), I get an error with network credentials.

Could you please provide us with a bit more information about the application you are developing.

Is it a Web Application, a Web Service, or other?

Thanks

-Frinny
Nov 15 '07 #5
Frinavale
9,735 Expert Mod 8TB
On the first PC there is installed Windows Service.
This one calls other Windows Service on the other PC.
Both PCs are Virtual Machines on Virtual Machine Server.
So both PCs run under the VMuser account.
So I think that there cant be any problem with credentials, but there is.

If I try to call the Windows Service on the second PC from my computer (connected), I get an error with network credentials.
Sorry I had miss read the question earlier....you had already stated that it was a Windows Service.
>>blushes<<

I'm not sure I can help with this problem but here's what MSDN has to say on the exception you're facing:

"The NegotiateStream and SslStream classes throw this exception when authentication fails. This exception indicates that the underlying stream is not in a valid state and you cannot retry the authentication using the NegotiateStream or SslStream instance."

Could it be that your Virtual Machine Server is some how unable to get this stream that is talked about here?

This is probably something that's not configured properly.
Nov 15 '07 #6
Hi, I already solved it.
So I created another Remote provider with channels and network credentials.
It s now working.
Nov 22 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Joao Correia | last post by:
Hi all, First of all, sorry about my english :-) I created a Windows Service with the function of watch some folders, and if exists, copy all files of those folders to a central server. The...
2
by: Jm | last post by:
Hi all Im writing a windows service app that accepts some remote control commands and reports to a database server. One command i would like to use is basically remote execution. When i start a...
0
by: Steve DeLong | last post by:
I have a C# Web Service (anonymous access has been disabled) that I would like to connect to with a standard Windows Service, also in C# as part of a scheduled synchronization system. I have...
1
by: webserviceUser189 | last post by:
Hi, I'm trying to authenticate the user based on the credentials that I get from the client app, but I'm getting empty string as user name. Can somebody tell me if I'm doing anything wrong here....
1
by: Manuel Brandao | last post by:
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...
3
by: =?Utf-8?B?RGFuZGFuIFpoYW5n?= | last post by:
Now I have a web application, a web service and a SQL Server database. The Web application will invoke the web service, the web service invokes the SQL Server stored procedure. I let the web...
9
by: dm3281 | last post by:
Hello -- I plan on writing a C# service using VS2005. If I want my service to have a tray icon, is this typically done from within my service or do/should I create a controller application and...
5
by: dm3281 | last post by:
I'm really starting to hate writing services -- or trying to, anyway. Why do I need to rename my project to the service name? Why do I need to set the "ServiceName" property to my service name?...
1
by: =?Utf-8?B?c3VidGlsZQ==?= | last post by:
Hi :-) I'm having some trouble with LDAP and Active Directory on Win2k3 I use Windows Authentication and the code System.Threading.Thread.CurrentPrincipal.Identity.Name gives me the correct...
5
by: Max2006 | last post by:
Hi, I am trying to limit my wcf service endpoint to response to only given windows user or group. How can I do that? Is there any way to configure that in the .config file? Thank you, Max
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.