s***@gmail.com
2005-09-07 14:13:30 UTC
Hello
I am hosting remoting within IIS. Everything works just fine as long as
I allow anonymous access at the IIS level.
When I allow only Windows Authenticated sessions, something very
strange happens:
If the client activates the remote object with IP address -
works fine
If the client activates it using a machine name - get http
401 exception is thrown.
The exception is thrown when the client calls the remote
method.
I set the channel's useDefaultCredentials property to true.
Any idea how to allow Windows Authentication?
Here is the call stack:
System.Net.WebException: The remote server returned an error: (401)
Unauthorized
. ---> System.ComponentModel.Win32Exception: The target principal name
is incorrect
at System.Net.NTAuthentication.GetOutgoingBlob(Byte[] incomingBlob,
Boolean handshakeComplete)
at System.Net.NTAuthentication.GetOutgoingBlob(String incomingBlob,
Boolean handshakeComplete)
at System.Net.NegotiateClient.DoAuthenticate(String challenge,
WebRequest webRequest, ICredentials credentials, Boolean
preAuthenticate)
at System.Net.NegotiateClient.DoAuthenticate(String challenge,
WebRequest webRequest, ICredentials credentials, Boolean
preAuthenticate)
at System.Net.NegotiateClient.Authenticate(String challenge,
WebRequest webRequest, ICredentials credentials)
at System.Net.AuthenticationManager.Authenticate(String challenge,
WebRequest request, ICredentials credentials)
at System.Net.AuthenticationState.AttemptAuthenticate(HttpWebRequest
httpWebRequest, ICredentials authInfo)
--- End of inner exception stack trace ---
Server stack trace:
at
System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessResponseException(WebException
webException, HttpWebResponse response)
at
System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage
msg)
Exception rethrown at [0]:
at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
at Noga.Interfaces.IInformationReader.Get(RequestContext
requestContext, String dsId, String logicalQueryId, MessagesList&
messages)
at RemotingIISHosting.Client.Query() in d:\develop\smart
tests\remotingiishosting\client\class1.cs:line 43
I am hosting remoting within IIS. Everything works just fine as long as
I allow anonymous access at the IIS level.
When I allow only Windows Authenticated sessions, something very
strange happens:
If the client activates the remote object with IP address -
works fine
If the client activates it using a machine name - get http
401 exception is thrown.
The exception is thrown when the client calls the remote
method.
I set the channel's useDefaultCredentials property to true.
Any idea how to allow Windows Authentication?
Here is the call stack:
System.Net.WebException: The remote server returned an error: (401)
Unauthorized
. ---> System.ComponentModel.Win32Exception: The target principal name
is incorrect
at System.Net.NTAuthentication.GetOutgoingBlob(Byte[] incomingBlob,
Boolean handshakeComplete)
at System.Net.NTAuthentication.GetOutgoingBlob(String incomingBlob,
Boolean handshakeComplete)
at System.Net.NegotiateClient.DoAuthenticate(String challenge,
WebRequest webRequest, ICredentials credentials, Boolean
preAuthenticate)
at System.Net.NegotiateClient.DoAuthenticate(String challenge,
WebRequest webRequest, ICredentials credentials, Boolean
preAuthenticate)
at System.Net.NegotiateClient.Authenticate(String challenge,
WebRequest webRequest, ICredentials credentials)
at System.Net.AuthenticationManager.Authenticate(String challenge,
WebRequest request, ICredentials credentials)
at System.Net.AuthenticationState.AttemptAuthenticate(HttpWebRequest
httpWebRequest, ICredentials authInfo)
--- End of inner exception stack trace ---
Server stack trace:
at
System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessResponseException(WebException
webException, HttpWebResponse response)
at
System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage
msg)
Exception rethrown at [0]:
at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
at Noga.Interfaces.IInformationReader.Get(RequestContext
requestContext, String dsId, String logicalQueryId, MessagesList&
messages)
at RemotingIISHosting.Client.Query() in d:\develop\smart
tests\remotingiishosting\client\class1.cs:line 43