Programaticly login to Blogengine.

Topics: ASP.NET 2.0, Business Logic Layer
Sep 9, 2009 at 11:04 PM
Edited Sep 9, 2009 at 11:05 PM

Hi.

I have a blogengine site that needs to be part of a regular asp.net website. As a prerequsite of the blog a user must first login. However this login must also be able to be shared with other directorys in the main website.

The logins must have a number of different roles some of which will or won't have access to the blog engine site and some will have different permissions within the blogengine..

So.. maybe 3 questions.

1. Is it possible to do this sort of thing in blog engine using just the asp.net membership providers.

or

2. Do (can) I need to use just the blog engine membership providers

or

3. Do I need to use a hybrid, and if so, can I programatically add a login to blogengine at the same time I create the asp.net one and can I programatically log the user into blog engine from the default.asp page in the blogengine directory?

 

Thanks in advance

 

Rob

 

 

Sep 10, 2009 at 3:28 PM

Ok.. I found this entry

http://www.ajaymatharu.com/integrating-blogengine-into-an-existing-site/

It allows me to have blogengines securtiy providers in the main site.. However how can I create a login via the blogengine api?

Do I need to hack the system tables (blogengines) e.g. do a direct insert? what about the encrypted password.. should I set it to clear?

 

Rob

 

Sep 10, 2009 at 6:21 PM

Ok... managed to get most of it working.

there were a few changes required from ajays fix sheet. As the blog was in a subdirectory I needed to point the appSettings keys at ~/blog/ instead of ~/

to get the blog integrated to the normal asp.net membership provider, the membership and rolemanages ended up getting pointed at the db that was setup for asp.net. Also The references to the XmlRoleProvider and XMLMembershipProvider needed to be commented out.

Now logins can be created easily via the "membership" object and roles can be managed via the "roles" provider of dotnet. All in all things seem to be working well with the only catch right now is that i can't get at the "Extensions" that are part of the BlogEngine install.

Any clues here would be appreciated.

 

Rob

Coordinator
Sep 11, 2009 at 7:58 AM

"i can't get at the "Extensions" that are part of the BlogEngine install."

What does that mean?