Click here to Skip to main content
15,915,513 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to connect to MS Access database that is plased on a hosting server using C# Pin
sher_azam2-Dec-09 1:39
sher_azam2-Dec-09 1:39 
GeneralRe: How to connect to MS Access database that is plased on a hosting server using C# Pin
Dave Kreskowiak2-Dec-09 6:06
mveDave Kreskowiak2-Dec-09 6:06 
AnswerRe: How to connect to MS Access database that is plased on a hosting server using C# Pin
David Skelly2-Dec-09 0:52
David Skelly2-Dec-09 0:52 
GeneralRe: How to connect to MS Access database that is plased on a hosting server using C# Pin
sher_azam2-Dec-09 1:38
sher_azam2-Dec-09 1:38 
GeneralRe: How to connect to MS Access database that is plased on a hosting server using C# Pin
Calla2-Dec-09 2:01
Calla2-Dec-09 2:01 
GeneralRe: How to connect to MS Access database that is plased on a hosting server using C# Pin
sher_azam2-Dec-09 19:33
sher_azam2-Dec-09 19:33 
GeneralRe: How to connect to MS Access database that is plased on a hosting server using C# Pin
Calla2-Dec-09 21:37
Calla2-Dec-09 21:37 
Question(NegotiateStream) The server has rejected the client credentials Pin
abiemann1-Dec-09 22:30
abiemann1-Dec-09 22:30 
I've followed the following tutorial: http://msdn.microsoft.com/en-us/library/system.net.security.negotiatestream%28VS.80%29.aspx[^]

and have implemented a server and client application. Smile | :)


When I use the client to connect to the server on the same machine (i.e. the IP is 127.0.0.1) it makes a secure connection. Smile | :)

When I use the client on my XP machine to connect to the server on my Vista machine then the line:
authStream.EndAuthenticateAsServer(ar);

fails with the exception I pasted into the subject of this post. Frown | :(

What I want to do is allow any client on any machine over the internet or LAN to connect to my server on port 9000 over an encrypted connection.
I would be happy if I could allow the client to specify a username and password - but I don't know how to implement that functionality.


details on the exception:

$exception
-		$exception	{"The server has rejected the client credentials."}	System.Exception {System.Security.Authentication.InvalidCredentialException}
+		[System.Security.Authentication.InvalidCredentialException]	{"The server has rejected the client credentials."}	System.Security.Authentication.InvalidCredentialException
+		Data	{System.Collections.ListDictionaryInternal}	System.Collections.IDictionary {System.Collections.ListDictionaryInternal}
		HelpLink	null	string
+		InnerException	{"The logon attempt failed"}	System.Exception {System.ComponentModel.Win32Exception}
		Message	"The server has rejected the client credentials."	string
		Source	"System"	string
		StackTrace	"   at System.Net.Security.NegoState.EndProcessAuthentication(IAsyncResult result)\r\n   at System.Net.Security.NegotiateStream.EndAuthenticateAsServer(IAsyncResult asyncResult)\r\n   at RemoteDiagnostics.Server.class_RDServer.EndAuthenticateCallback(IAsyncResult ar) in C:\\Users\\Nuclear\\Documents\\Visual Studio 2008\\Projects\\RemoteDiagnostics\\RemoteDiagnostics\\Server\\class_RDServer.cs:line 280"	string
+		TargetSite	{Void EndProcessAuthentication(System.IAsyncResult)}	System.Reflection.MethodBase {System.Reflection.RuntimeMethodInfo}


authStream
-		authStream	{System.Net.Security.NegotiateStream}	System.Net.Security.NegotiateStream
+		base	{System.Net.Security.NegotiateStream}	System.Net.Security.AuthenticatedStream {System.Net.Security.NegotiateStream}
		CanRead	false	bool
		CanSeek	false	bool
		CanTimeout	true	bool
		CanWrite	false	bool
+		ImpersonationLevel	'authStream.ImpersonationLevel' threw an exception of type 'System.Security.Authentication.InvalidCredentialException'	System.Security.Principal.TokenImpersonationLevel {System.Security.Authentication.InvalidCredentialException}
		IsAuthenticated	false	bool
		IsEncrypted	false	bool
		IsMutuallyAuthenticated	false	bool
		IsServer	true	bool
		IsSigned	false	bool
+		Length	'authStream.Length' threw an exception of type 'System.NotSupportedException'	long {System.NotSupportedException}
+		Position	'authStream.Position' threw an exception of type 'System.NotSupportedException'	long {System.NotSupportedException}
		ReadTimeout	-1	int
+		RemoteIdentity	'authStream.RemoteIdentity' threw an exception of type 'System.Security.Authentication.InvalidCredentialException'	System.Security.Principal.IIdentity {System.Security.Authentication.InvalidCredentialException}
		WriteTimeout	-1	int

AnswerRe: (NegotiateStream) The server has rejected the client credentials Pin
abiemann2-Dec-09 7:18
abiemann2-Dec-09 7:18 
QuestionUnexpected Errors in Multithreading Pin
Razanust1-Dec-09 21:35
Razanust1-Dec-09 21:35 
AnswerRe: Unexpected Errors in Multithreading Pin
Calla1-Dec-09 21:37
Calla1-Dec-09 21:37 
AnswerRe: Unexpected Errors in Multithreading Pin
Richard MacCutchan1-Dec-09 21:40
mveRichard MacCutchan1-Dec-09 21:40 
Questionhow to waiti for specific events that occurs Pin
Ronenb1-Dec-09 21:30
Ronenb1-Dec-09 21:30 
AnswerRe: how to waiti for specific events that occurs Pin
freakyit1-Dec-09 22:55
freakyit1-Dec-09 22:55 
AnswerRe: how to waiti for specific events that occurs Pin
abiemann2-Dec-09 7:37
abiemann2-Dec-09 7:37 
QuestionHow to check a groupbox for checked radiobuttons dynamicaly Pin
gwithey1-Dec-09 21:16
gwithey1-Dec-09 21:16 
AnswerRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
dan!sh 1-Dec-09 21:49
professional dan!sh 1-Dec-09 21:49 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
gwithey1-Dec-09 21:53
gwithey1-Dec-09 21:53 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
freakyit1-Dec-09 22:06
freakyit1-Dec-09 22:06 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
gwithey1-Dec-09 22:41
gwithey1-Dec-09 22:41 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
gwithey1-Dec-09 22:20
gwithey1-Dec-09 22:20 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
freakyit1-Dec-09 22:39
freakyit1-Dec-09 22:39 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
gwithey1-Dec-09 22:50
gwithey1-Dec-09 22:50 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
freakyit1-Dec-09 22:57
freakyit1-Dec-09 22:57 
GeneralRe: How to check a groupbox for checked radiobuttons dynamicaly Pin
gwithey1-Dec-09 23:08
gwithey1-Dec-09 23:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.