Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / October 2007

Tip: Looking for answers? Try searching our database.

.NET Remoting and Credential Caching

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael Bray - 15 Oct 2007 16:05 GMT
I have a client/server application that utilizes Impersonation on a TCP
Channel.  So I create the channel with the version of the constructor
that takes an IDictionary of channel properties, and specify
"impersonate = true".  

OK great - everything works - I can confirm on the server that the
process runs in the context of the user that is making the remote call
from the client.

However, I also want to give the user the ability to specify the
credentials to use - so in the user interface I give a checkbox that
says "Use pass-thru authentication" and if they check it, it runs as
above, and if the  uncheck it they can enter a username, password, and
domain, which I then specify in the channel properties of the same name.

OK great - this works too...   I can specify the username and password,
and verify on the server that the connection runs as the user I've
specified.

BUT...  when I switch between the two in the same instance of the
application, only the FIRST connection's credentials get used.  So if I
select "Use Pass-thru" then on the server it shows the user that I'm
running the client as.  If I then disconnect (and yes, I also Unregister
the channel), then change the option to specify the username and
password, and then reconnect, the connection is still successful, but as
the user that I'm running as.  In fact, I can put anything I want, even
an invalid username and/or password, and it still connects as the user
I'm running as.  It works the same way if I first connect as a specified
user - subsequent requests to connect with pass-thru authenticate only
as the user I entered.

Obviously there is some credential caching going on here...  Is there a
way to disable this?  I'm aware of socket caching, which I believe I
have disabled (using 'socketCacheTimeout=0' and
socketCachePolicy=absoluteTimeout') but it appears to still be caching
the credentials.  I am also unregistering the channel before I re-
register the TCP channel with the new properties.

Any help?  Thanks!

-mdb
Mr. Arnold - 16 Oct 2007 02:36 GMT
>I have a client/server application that utilizes Impersonation on a TCP
> Channel.  So I create the channel with the version of the constructor
[quoted text clipped - 35 lines]
>
> Any help?  Thanks!

I myself think you need to abandon this credential checking using the
Remoting application. It may come down to using one or the other but not
both. The one .Net Remoting application I have written was using SQL Server
table authentication using a user-id and password. Sometimes, it's best just
to keep things simple.
Michael Bray - 16 Oct 2007 14:24 GMT
> I myself think you need to abandon this credential checking using the
> Remoting application. It may come down to using one or the other but
> not both. The one .Net Remoting application I have written was using
> SQL Server table authentication using a user-id and password.
> Sometimes, it's best just to keep things simple.

Unfortunately it is a requirement to support both.  I know there must be a
solution buried deep down in the framework somewhere.

-mdb

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.