Trying to use Windows Authentication for DotNetRemoting

Trying to use Windows Authentication for DotNetRemoting

Old forum URL: forums.lhotka.net/forums/t/5136.aspx


decius posted on Tuesday, July 22, 2008

Hi, I recently decided to try to get DotNetRemoting working for some Csla projects I have been working on. I'm fairly new to Csla, but have been loving it.  However, today I spent several hours troubleshooting and reading threads about this classic and well known exception when attempting DotNetRemoting:

Error:Principal must be of type BusinessPrincipal, not System.Security.Principal.GenericPrincipal

I got this resolved by creating my own custom csla principal and then forcing a logout on Page_Load.  Problem is that I was hoping to use Windows Authentication!  In my work environment, we have our own User Authentication system setup that we perform inside the rest of the application. 

It seems silly to me to have to create a Principal object from BusinessPrincipal that serves no purpose for every application in our environment...  Is there not any other way to not to have to do this????

ajj3085 replied on Wednesday, July 23, 2008

Setting CslaAuthentiation = Windows in your .config file should be all that's necessary. I never had to create a custom principal... but that value must be set both in your app.config and your remoting host's web.config.

JoeFallon1 replied on Wednesday, July 23, 2008

Andy is correct - as long as you *really* plan on using Windows authentication. Many people say they plan to but they really have a hybrid in mind. If you need to get roles or Permissions from some source other than Windows then you are planning on a hybrid - and that will require a custom Principal. There are many threads on this topic so you can do some research if your plans change.

Joe

 

decius replied on Thursday, July 24, 2008

Thanks for your responses.  That actually makes a lot of sense Fallon.

Copyright (c) Marimer LLC