This message was discovered on microsoft.public.dotnet.framework.remoting.
| Michael G. |
I have this bit of code which works for my Remoting client. The server is hosted in IIS and requires authentication. IDictionary Props = new Hashtable();
Props.Add("useDefaultCredentials", true);
BinaryClientFormatterSinkProvider clientFormatter = new BinaryClientFormatterSinkProvider();
BinaryServerFormatterSinkProvider serverFormatter = new BinaryServerFormatterSinkProvider();
HttpChannel channel = new HttpChannel(Props, clientFormatter, serverFormatter);
ChannelServices.RegisterChannel(channel);
I want to make 2 changes.
1) I want all connection through my HttpChannel to PRE-Authenticate. According to the IIS logs, every request is done in pairs: once without the authentication (server returns 401), then again with authentication. I need this to work for both Well Known Objects and Client Activated Objects.
2) I'd like to pass other authentication information in case the default credentials are no good.
Ideas?
TIA
|
|
|
| |
|
| |
| |
| Michael G. |
I figured out the second part - I can now specify other credentials than the defaults. To do this, I implemented a customer Channel Sink Provider and dynamically updated the credentials property of the transport sink (the last in the chain) to new NetworkCredential(<username>, <password>, <domain>). Works great.
However, even though the properties on the transport sink already include "preauthenticate" = false, when I set it to true, it doesn't work -- all calls over the channel are done in pairs - once without the authentication information, then once with. Did MS forget to implement support for that property?
Ideas?
Michael G.
"Michael G." <Click here to reveal e-mail address> wrote in message news:uSpjIx7DCHA.1696@tkmsftngp05... [Original message clipped]
|
|
|
| |
|
| |
| |
| Greg Reinacker |
Are you using Integrated Windows Authentication? You can't avoid multiple round-trips with this. If you're using Basic or Digest, you can limit round-trips with the PreAuthenticate property.
-- Greg Reinacker Reinacker & Associates, Inc. http://www.rassoc.com http://www.rassoc.com/gregr/weblog/
"Michael G." <Click here to reveal e-mail address> wrote in message news:uS5k4$BECHA.2540@tkmsftngp05... > I figured out the second part - I can now specify other credentials than the [Original message clipped]
|
|
|
| |
|
|
| |
|
|
|
|
|
|