This project is read-only.

BlogEngine.NET Integration

Topics: ASP.NET 2.0
Apr 24, 2009 at 12:48 PM
Hi All,

I have a BlogEngine.NET Integration Issue.

I am currently building a new website which has three components - an MS SQL driven Main Site; an ASP.NET Forum, and a BlogEngine.NET Blog. At present the Main site and the Forum are a single IIS applicatiion which both use the same login for the member areas, and access the same MS SQL DB. The Blog however I am currently running as a separate IIS application but installed as a sub folder within the main site - I found this the easiest way.

What I would like to do is integrate all three together into a single IIS application and for members to use a single login username and password, but with only moderators and admins to be given access to the restricted parts of the forum and blog.

I tried to use a single MS SQL DB, but I found that although I had managed to create the right BlogEngine tables within the DB, and see the welcome screen to MS SQL, I could not login with admin admin, but when I created a second DB it worked.

Any ideas on the best way to achieve this!

Much appreciated

Apr 24, 2009 at 5:10 PM
If you're using the Asp.Net SQL Membership on the other websites, you can configure BE.Net to use it as well (change the defaultProvider on membership to "SqlMembershipProvider" and the defaultProvider on roleManager to "SqlRoleProvider"). That'll unify the login, though if BE.Net is still its own application, people will still have to login twice. I'm not sure about BE.Net as part of a larger application, though I've seen others detail the config required.
Jun 16, 2009 at 3:30 AM

mercsd I like the approach you posted above, and it seems to work somewhat as is shows the admin widget but the only link that shows up is the change password.

I have been trying to figure out why but I am not having luck. I tried changing the name of the admin roles on the /admin/pages/web.config and on the Web.sitemap

To see that I have to login with the login page provoded by the root application. if I use the BE login I get " Ooops! I cant find the page your looking for"

If anyone has any insight it would be greatly appreciated.

Thanks  BE v1.5 IIS7



Jun 30, 2009 at 11:54 PM


I have it integrated, I combined the web configs. everything is working accept a few pages. add entry, profiles, users. not sure what the deal is. but this is what I see when I go to onw of those pages, it was garbage that I saw untill I change the app pool to classic.

I have search for a solution but have come up empty handed. I hope someone can shed some light on the issue. Thanks    (SQL 2008, II7 Blog integrated with AspDotNetStoreFront)

System.Web.HttpException: Unable to connect to SQL Server database. ---> System.Web.HttpException: Unable to connect to SQL Server database. ---> System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject) at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart) at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.SqlClient.SqlConnection.Open() at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) --- End of inner exception stack trace --- at System.Web.Management.SqlServices.GetSqlConnection(String server, String user, String password, Boolean trusted, String connectionString) at System.Web.Management.SqlServices.SetupApplicationServices(String server, String user, String password, Boolean trusted, String connectionString, String database, String dbFileName, SqlFeatures features, Boolean install) at System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString) --- End of inner exception stack trace --- at System.Web.DataAccess.SqlConnectionHelper.CreateMdfFile(String fullFileName, String dataDir, String connectionString) at System.Web.DataAccess.SqlConnectionHelper.EnsureSqlExpressDBFile(String connectionString) at System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) at System.Web.Security.SqlMembershipProvider.GetAllUsers(Int32 pageIndex, Int32 pageSize, Int32& totalRecords) at System.Web.Security.Membership.GetAllUsers() at admin_profiles.SetDDLUser() in c:\HostingSpaces\ShawnT\\web\admin\Pages\Profiles.aspx.cs:line 113 at admin_profiles.Page_Load(Object sender, EventArgs e) in c:\HostingSpaces\ShawnT\\web\admin\Pages\Profiles.aspx.cs:line 22 at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.admin_pages_profiles_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\root\d47c7f2e\408db7ef\App_Web_futuaupy.8.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Mar 21, 2012 at 5:01 PM

Hi everyone

I'm about the same problem/issue - is anybody still following this thread or interested to reopen it ?

Danish Freddy