Use Umbraco membership (and profile) provider in non-Umbraco ASP.NET web forms site
Hi, I have a mobile version of an Umbraco website which is just an ASP.NET web project, but I added the code necessary to allow users to login using the Umbraco v4 membership provider.
I've upgraded my main site (and therefore database) to v6 (planning to go to v7 ASAP) but using the v4 membership provider doesn't work any more. I tried to install the UmbracoCms.Core package - and I can run the site, but I get an error after it's been running about a minute - something to do with Umbrac.Core.Sync.ServerEnvironmentHelper.GetBaseUrl -> Core.StringExtensions.EnsureEndsWith :( (it's a generic 'Object reference not set to an instance of an object' error).
It feels like I'm just missing some config, but trying to copy all the config I could see didn't help unfortunately.
Surely other people have got this working? If so - please help! :)
Follow up: to try to make things as simple as possible I've created a new web forms application, added the UmbracoCms.Core package and set up the connectionstring and providers:
And when trying to call System.Web.Security.Membership.ValidateUser() with known-good user/pass I get an 'Object reference not set to an instance of an object' in umbraco.cms.businesslogic.member.Member.GetMemberFromLoginName.
Use Umbraco membership (and profile) provider in non-Umbraco ASP.NET web forms site
Hi, I have a mobile version of an Umbraco website which is just an ASP.NET web project, but I added the code necessary to allow users to login using the Umbraco v4 membership provider.
I've upgraded my main site (and therefore database) to v6 (planning to go to v7 ASAP) but using the v4 membership provider doesn't work any more. I tried to install the UmbracoCms.Core package - and I can run the site, but I get an error after it's been running about a minute - something to do with Umbrac.Core.Sync.ServerEnvironmentHelper.GetBaseUrl -> Core.StringExtensions.EnsureEndsWith :( (it's a generic 'Object reference not set to an instance of an object' error).
It feels like I'm just missing some config, but trying to copy all the config I could see didn't help unfortunately.
Surely other people have got this working? If so - please help! :)
Thanks!
(I also bumped this post: https://our.umbraco.org/forum/developers/api-questions/32259-How-to-use-umbraco-membership-provider-in-non-umbraco-NET-MVC-application which was similar - but I assume was also v4, which I had working).
Follow up: to try to make things as simple as possible I've created a new web forms application, added the UmbracoCms.Core package and set up the connectionstring and providers:
And when trying to call System.Web.Security.Membership.ValidateUser() with known-good user/pass I get an 'Object reference not set to an instance of an object' in umbraco.cms.businesslogic.member.Member.GetMemberFromLoginName.
Added the umbracoSettings.config, too.
is working on a reply...