473,385 Members | 1,757 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,385 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 1786
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
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
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,...

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.