Open GoogleCodeExporter opened 9 years ago
Windows authentication is not supported as it is. You will have to tweak the
login page to validate the username and password against Windows and then use
Membership.CreateUser to create a user account using the username. After that
call this:
UserSetup FirstVisitHomeTab(string userName, string pageTitle, bool
isAnonymous, bool isFirstVisitAfterLogin)
isFirstVisitAfterLogin = true
Original comment by omaralzabir@gmail.com
on 11 Jun 2010 at 8:58
Thanks for the reply. I have now moved to Dropthings-2.6.2.
I coded the below in Default.aspx's Page_Load function:
if (!Membership.ValidateUser(Profile.UserName, "Password"))
{
bool activationRequired = ConstantHelper.ActivationRequired;
RegisterUserResponse registerUserResponse = null;
using (var facade = new Facade(AppContext.GetContext(Context)))
{
registerUserResponse = facade.RegisterUser(Profile.UserName, "Password", Profile.UserName, activationRequired);
}
}
My question is: where should I add the below that you mentioned in your reply?
UserSetup FirstVisitHomeTab(string userName, string pageTitle, bool
isAnonymous, bool isFirstVisitAfterLogin)
isFirstVisitAfterLogin = true
Original comment by albert...@gmail.com
on 11 Jun 2010 at 9:16
You need to call the FirstVisitHomeTab right before calling RegisterUser using
the Profile.UserName and pass isFirstVisitAfterLogin as true.
Original comment by omaralzabir@gmail.com
on 16 Jun 2010 at 12:50
[deleted comment]
I believe you mean FirstVisitHomePage not "FirstVisitHomeTab".
_Setup = facade.FirstVisitHomePage(Profile.UserName, pageTitle, false, true);
Original comment by romm...@gmail.com
on 16 Jun 2010 at 11:14
It should be tab. I changed "Page" to "Tab" in latest version to avoid
confusion.
Original comment by omaralzabir@gmail.com
on 17 Jun 2010 at 8:46
albertlse, did you have to do any more customization to get Dropthings-2.6.2 to
work with active directory / Windows authentication? If you could share /
publish your solution it would be very helpful. I tried just the steps here and
have not yet tweaked the login page.
Original comment by romm...@gmail.com
on 18 Jun 2010 at 2:40
rommelb, I am using Dropthings-2.6.4 now as 2.6.2 is no longer available.
I customized it to work with Windows Authentication.
My default.aspx Page_Load function looks like this:
protected void Page_Load(object sender, EventArgs e)
{
if (!Membership.ValidateUser(Profile.UserName, "Password"))
{
bool activationRequired = ConstantHelper.ActivationRequired;
RegisterUserResponse registerUserResponse = null;
var facade = Services.Get<Facade>();
{
registerUserResponse = facade.RegisterUser(Profile.UserName, "Password", Profile.UserName, activationRequired);
}
}
}
Also, I add <authentication mode="Windows"></authentication> to web.config.
It auto-register the user on the first load of the homepage.
However, I encountered a problem in 2.6.4. I have reported this problem in
Issue #118 (http://code.google.com/p/dropthings/issues/detail?id=118)
Till now there's no response to the issue I have reported.
rommelb, do you mind to check is you encounter the same in Issue #118?
Hope omaralzabir or anyone can help to resolve Issue #118.
Thank you.
Original comment by albert...@gmail.com
on 18 Jun 2010 at 2:54
albertlse - any more success in getting this to work with windows
authentication?
I have made the changes you suggested above. I added the Page_Load and also
changed the web config as above (and removed the existing Forms authentication).
Do I need to do anything else?
I have the latest version which I think is 2.6.5....
Thanks for any help!
Original comment by steran...@gmail.com
on 18 Nov 2010 at 4:55
Original issue reported on code.google.com by
albert...@gmail.com
on 5 May 2010 at 8:45