This project is read-only.

configuration error: connection name 'BlogEngine' was not found

Topics: ASP.NET 2.0
Jan 4, 2011 at 2:57 AM

I'm new to this, so I'm not sure what happened.  I installed BlogEngine.NET as it was available from the web host's list of apps to install in the hosting config panel.


Then, I created a virtual directory named "blog" and pointed the path to the blogengine path.  It was working fine so that users could go to and would see the blog.  This worked for a few months.


Now, I get this error when going to

Server Error in '/blog' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: The connection name 'BlogEngine' was not found in the applications configuration or the connection string is empty.

Source Error:

Line 65:         <clear />
Line 66: <add name="XmlRoleProvider" type="BlogEngine.Core.Providers.XmlRoleProvider, BlogEngine.Core" description="XML role provider" />
Line 67: <add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="BlogEngine" applicationName="BlogEngine" />
Line 68: <add name="DbRoleProvider" type="BlogEngine.Core.Providers.DbRoleProvider, BlogEngine.Core" connectionStringName="BlogEngine" />
Line 69: </providers>

Source File: D:\inetpub\vhosts\\httpdocs\blogenginenet\web.config    Line: 67

Version Information: Microsoft .NET Framework Version:2.0.50727.4206; ASP.NET Version:2.0.50727.4209

I'm not sure what changed, but looked in the hosting panel section for ASP.NET Configuration for my domain, there isn't a Connection String named BlogEngine.  Did it somehow get deleted or am I looking the wrong place?  If this is where that connection string belongs, can someone share exactly what i should enter?  I just used the default install that my web host provided.

I was thinking of just removing the app and reinstalling it, but is there a better way to restore access?


I should note that I also get an error while trying to access, but it's different:

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 7:    </configSections>
Line 8: <BlogEngine>
Line 9: <blogProvider defaultProvider="XmlBlogProvider">
Line 10: <providers>
Line 11: <add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider, BlogEngine.Core" />

Source File: D:\inetpub\vhosts\\httpdocs\blogenginenet\web.config    Line: 9



Jan 4, 2011 at 7:53 AM

The first error is happening because, according to the error message, there is not a connection string defined for "BlogEngine" in your web.config file.  There should be a <connectionStrings> section in the web.config file that looks like:

		connectionString="Data Source=MySQLServer;User ID=user;Password=password;persist security info=False;initial catalog=BlogEngine;"

According to the error message, either the <connectionStrings> section doesn't exist, or a connection string for "BlogEngine" does not exist.  Have you modified the web.config file that was installed, or you're just using the same one that was installed for you?  Do you know if any of your blog data is being stored in a DB?  BlogEngine has two options -- storing data in XML format on the file system, or storing data in a DB.

The second error is happening because the "blogenginenet" folder is not marked as a Virtual Directory.  It sounds like you marked the "blog" directory as a Virtual Directory though (based on your message).  The "blogenginenet" folder should also be marked as a Virtual Directory -- if you're going to run multiple instances of BE.

Jan 4, 2011 at 9:50 AM

Hi there,

Can you tell, what is your default role provider, I believe it's determined by line 64 of your web.config file. 



Jan 4, 2011 at 11:52 PM

Thanks for your help!



Do you mean in the web.config file within the blogengine directory?  In that case, I do not see the xml tag connectionStrings, so it must have been deleted somehow.  I know that I did not touch the blogenginenet directory.

I did check the directories under blogenginenet and it seems the posts are being stored in XML format at /httpdocs/blogenginenet/App_Data/posts/



It looks like the default provider is XmlMembershipProvider:

<membership defaultProvider="XmlMembershipProvider">
- <providers>
  <clear />
  <add name="XmlMembershipProvider" type="BlogEngine.Core.Providers.XmlMembershipProvider, BlogEngine.Core" description="XML membership provider" passwordFormat="Hashed" />
  <add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="BlogEngine" applicationName="BlogEngine" />
  <add name="DbMembershipProvider" type="BlogEngine.Core.Providers.DbMembershipProvider, BlogEngine.Core" passwordFormat="Hashed" connectionStringName="BlogEngine" />
Jan 5, 2011 at 12:20 AM

Hi there,

Your site is configured to use Xml as a data storage and is not configured to use SQL Server.

Your default Membership provider is XmlMembershipProvider and I believe if you delete or comment out the other two providers, the problem will go away.


BTW. I don't know why the system is trying to initialize SqlMembershipProvider. Can yo give more details about your environment, like .NET Framework, IIS etc?




Jan 5, 2011 at 1:00 AM



Thanks, that worked!  I'm not sure why things changed.  Once I removed those lines, the /blog/ page loaded but the comment and rating text was not in English.  I checked the web config and it had this line (which I definitely did not put in):
    <globalization culture="af-ZA" uiCulture="af-ZA" />

So I removed it and now it loads them in English.  Again, I'm not sure how these changes occurred.

Jan 5, 2011 at 11:45 AM

Perhaps you've hacked :)

I suggest you find out what else has changed in your web,config file

Glad I could help you.