This project is read-only.

Only the Welcome screen for me

Topics: ASP.NET 2.0
Nov 5, 2010 at 2:41 PM
Edited Nov 5, 2010 at 2:42 PM
My blog has been using (version 1.4.5) for over a year now. I attempted to upgrade to version 1.6.1, but I received a lot of errors. I then uninstalled version 1.6.1 and reinstalled version 1.4.5. Now when I go to my blog url ( all I see is the Welcome screen. My database (my posts, comments, etc.) as well as my css file seem to be intact, but it obviously is not being read correctly. I don't know if my web.config file got changed somehow or what. Any suggestions would be helpful. 
Below is my web.config file: (all of the sensitive data is in red to protect the innocent)
<?xml version="1.0"?>
  <sectionGroup name="BlogEngine">
   <section name="blogProvider" requirePermission="false" type="BlogEngine.Core.Providers.BlogProviderSection, BlogEngine.Core" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>
  <blogProvider defaultProvider="XmlBlogProvider">
    <add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider, BlogEngine.Core"/>
    <add name="DbBlogProvider" type="BlogEngine.Core.Providers.DbBlogProvider, BlogEngine.Core" connectionStringName="BlogEngine" />
 <!-- configSource is not implemented in Mono.
    <connectionStrings configSource="sql.config" />
  <add name="LocalSqlServer" connectionString="dummy"/>
  <!-- Mono complains if LocalSqlServer isn't specified -->
  <add name="BlogEngine" connectionString="Data Source=DATABASE; Initial Catalog=CATALOG; User ID=ID; Password='PASSWORD';persist security info=False;initial catalog=BlogEngine;" providerName="System.Data.SqlClient"/>
  <add key="BlogEngine.FileExtension" value=".aspx"/>
  <!-- You can e.g. use "~/blog/" if BlogEngine.NET is not located in the root of the application -->
  <add key="BlogEngine.VirtualPath" value="~/"/>
  <!-- The regex used to identify mobile devices so a different theme can be shown -->
  <add key="BlogEngine.MobileDevices" value="(nokia|sonyericsson|blackberry|samsung|sec\-|windows ce|motorola|mot\-|up.b|midp\-)"/>
  <!-- The name of the role with administrator permissions -->
  <add key="BlogEngine.AdminRole" value="Administrators"/>
  <!--This value is to provide an alterantive location for storing data.-->
  <add key="StorageLocation" value="~/App_Data/"/>
    <!--A comma separated list of script names to hard minify. It's case-sensitive. -->
    <add key="BlogEngine.HardMinify" value="blog.js,widget.js,WebResource.axd"/>
  <compilation debug="true">
    <add assembly="System.Management, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Configuration, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Data, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Drawing, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Web, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Xml, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    <globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="auto" uiCulture="auto"/>
  <httpRuntime enableVersionHeader="false" useFullyQualifiedRedirectUrl="true" maxRequestLength="16384" executionTimeout="3600" requestLengthDiskThreshold="16384"/>
  <machineKey validationKey="D9F7287EFDE8DF4CAFF79011D5308643D8F62AE10CDF30DAB640B7399BF6C57B0269D60A23FBCCC736FC2487ED695512BA95044DE4C58DC02C2BA0C4A266454C" decryptionKey="BDAAF7E00B69BA47B37EEAC328929A06A6647D4C89FED3A7D5C52B12B23680F4" validation="SHA1" decryption="AES"/>
    <authentication mode="Forms">
   <forms timeout="129600" name=".AUXBLOGENGINE" protection="All" slidingExpiration="true" loginUrl="~/login.aspx" cookieless="UseCookies"/>
    <pages enableSessionState="false" enableViewStateMac="true" enableEventValidation="true">
    <add namespace="Controls" tagPrefix="blog"/>
    <customErrors mode="Off">
    <membership defaultProvider="XmlMembershipProvider">
    <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"/>
    <roleManager defaultProvider="XmlRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".BLOGENGINEROLES">
    <add name="XmlRoleProvider" type="BlogEngine.Core.Providers.XmlRoleProvider, BlogEngine.Core" description="XML role provider"/>
    <add name="SqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="BlogEngine" applicationName="BlogEngine"/>
    <add name="DbRoleProvider" type="BlogEngine.Core.Providers.DbRoleProvider, BlogEngine.Core" connectionStringName="BlogEngine"/>
    <siteMap defaultProvider="PageSiteMap" enabled="true">
    <add name="PageSiteMap" description="The site map provider that reads in the .sitemap XML files." type="BlogEngine.Core.Web.Controls.PageSiteMap, BlogEngine.Core"/>
    <add name="SecuritySiteMap" description="Used for authenticated users." type="System.Web.XmlSiteMapProvider, System.Web, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" securityTrimmingEnabled="true" siteMapFile="Web.sitemap"/>
   <add name="WwwSubDomainModule" type="BlogEngine.Core.Web.HttpModules.WwwSubDomainModule, BlogEngine.Core"/>
   <add name="UrlRewrite" type="BlogEngine.Core.Web.HttpModules.UrlRewrite, BlogEngine.Core"/>
   <add name="CompressionModule" type="BlogEngine.Core.Web.HttpModules.CompressionModule, BlogEngine.Core"/>
   <add name="ReferrerModule" type="BlogEngine.Core.Web.HttpModules.ReferrerModule, BlogEngine.Core"/>
   <!--Remove the default ASP.NET modules we don't need-->
   <remove name="PassportAuthentication"/>
   <remove name="Profile"/>
   <remove name="AnonymousIdentification"/>
   <add verb="*" path="file.axd" type="BlogEngine.Core.Web.HttpHandlers.FileHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="image.axd" type="BlogEngine.Core.Web.HttpHandlers.ImageHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="syndication.axd" type="BlogEngine.Core.Web.HttpHandlers.SyndicationHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="sitemap.axd" type="BlogEngine.Core.Web.HttpHandlers.SiteMap, BlogEngine.Core" validate="false"/>
   <add verb="*" path="trackback.axd" type="BlogEngine.Core.Web.HttpHandlers.TrackbackHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="pingback.axd" type="BlogEngine.Core.Web.HttpHandlers.PingbackHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="opensearch.axd" type="BlogEngine.Core.Web.HttpHandlers.OpenSearchHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="metaweblog.axd" type="BlogEngine.Core.API.MetaWeblog.MetaWeblogHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="rsd.axd" type="BlogEngine.Core.Web.HttpHandlers.RsdHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="css.axd" type="BlogEngine.Core.Web.HttpHandlers.CssHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="js.axd" type="BlogEngine.Core.Web.HttpHandlers.JavaScriptHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="rating.axd" type="BlogEngine.Core.Web.HttpHandlers.RatingHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="opml.axd" type="BlogEngine.Core.Web.HttpHandlers.OpmlHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="blogml.axd" type="BlogEngine.Core.Web.HttpHandlers.BlogMLExportHandler, BlogEngine.Core" validate="false"/>
   <add verb="*" path="sioc.axd" type="BlogEngine.Core.Web.HttpHandlers.Sioc, BlogEngine.Core" validate="false"/>
   <add verb="*" path="apml.axd" type="BlogEngine.Core.Web.HttpHandlers.Apml, BlogEngine.Core" validate="false"/>
   <add verb="*" path="foaf*.axd" type="BlogEngine.Core.Web.HttpHandlers.Foaf, BlogEngine.Core" validate="false"/>

Nov 5, 2010 at 7:27 PM

When upgrading to BE 1.6.x, one thing that needs to be done is to delete the ExtensionManager folder under App_Code as documented here.

Right now on your blog, it looks like there are files that are physically missing.  The right side widget zone is reporting messages like:

The file '/blog/widgets/TextBox/widget.ascx' does not exist

This sounds like that file/folder physically does not exist.

It also looks like you're storing data in the DB.  When upgrading from 1.4.5 to 1.6.1, you'll want to run the DB upgrade scripts in the setup\SQLServer folder.  You would want to run 2 of them, it looks like.


Nov 5, 2010 at 8:16 PM

Thanks for the reply.

I had so many problems trying to upgrade to 1.6.1 that I just want to get back to version 1.4.5 for now. I'm just trying to get back to where I was three days ago.

I uninstalled 1.6.1 and reloaded 1.4.5 yesterday. The only folder I have now in /blog/widgets/ is Quotes. I don't remember altering this folder when I reloaded. Can I somehow install the other widgets I'm missing? 

When I did the upgrade to 1.6.1 I did run the 2 upgrade scripts and when I went to the blog url I ended up with a blank screen. This was one of many problems I ran into.

Nov 5, 2010 at 8:38 PM

It's always a good idea to have a backup before an upgrade, so you can just restore.  If you have one, I would restore to that.

The BE 1.4.5 download is here.  It has all the files, including the widgets.

Nov 5, 2010 at 9:03 PM

Yeah, I totally messed up by not backing up first. I'll never do that again.

I just uploaded the widget files and now I get this message:

Top element must be siteMap.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Configuration.ConfigurationErrorsException: Top element must be siteMap.

Source Error:

Line 17: 	private void BindMenu()
Line 18: 	{
Line 19: 		SiteMapNode root = SiteMap.Providers["SecuritySiteMap"].RootNode;
Line 20: 		if (root != null)
Line 21: 		{

Source File: d:\hosting\cleve1212a\blog\admin\menu.ascx.cs    Line: 19

Stack Trace:

[ConfigurationErrorsException: Top element must be siteMap.]
   System.Web.XmlSiteMapProvider.BuildSiteMap() +1329
   System.Web.XmlSiteMapProvider.get_RootNode() +15
   admin_menu.BindMenu() in d:\hosting\cleve1212a\blog\admin\menu.ascx.cs:19
   admin_menu.Page_Load(Object sender, EventArgs e) in d:\hosting\cleve1212a\blog\admin\menu.ascx.cs:14
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6741
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.default_aspx.ProcessRequest(HttpContext context) in App_Web_n8m8qnkt.8.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
Nov 5, 2010 at 10:29 PM

It looks like it's more than just the widget files that are out of sync.  I would delete all files and folders, except for the App_Data folder and your web.config file, and upload all the BE 1.4.5 files.

Nov 6, 2010 at 3:22 PM

I uploaded all of the BE 1.4.5 files, but I still get the above Top element must be siteMap error. I was thinking since I previously ran the 2 upgrade scripts against my database that I need to load the BE 1.6.1 files instead. I guess this is what I'll do next.

Nov 6, 2010 at 7:02 PM

The siteMap error I haven't seen before, but it's referring to the contents of the Web.sitemap file in the blog root.  The Web.sitemap file in BE 1.4.5 looks like:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="" >
  <siteMapNode url="default.aspx" title="Blog Engine"  description="" roles="administrators, editors">
    <siteMapNode url="~/admin/Pages/Add_entry.aspx" title="add_entry"  description=""  roles="administrators, editors"/>
    <siteMapNode url="~/admin/Pages/Blogroll.aspx" title="blogroll"  description=""  roles="administrators, editors"/>
    <siteMapNode url="~/admin/Pages/Controls.aspx" title="controls"  description=""  roles="administrators"/>
    <siteMapNode url="~/admin/Pages/Categories.aspx" title="categories"  description=""  roles="administrators, editors"/>
    <siteMapNode url="~/admin/Pages/Pages.aspx" title="pages"  description=""  roles="administrators, editors"/>
    <siteMapNode url="~/admin/Pages/PingServices.aspx" title="PingServices"  description=""  roles="administrators"/>
    <siteMapNode url="~/admin/Pages/referrers.aspx" title="referrers"  description=""  roles="administrators, editors"/>
    <siteMapNode url="~/admin/Pages/Settings.aspx" title="settings"  description=""  roles="administrators"/>
    <siteMapNode url="~/admin/Pages/Profiles.aspx" title="profiles"  description=""  roles="administrators, editors"/>
    <siteMapNode url="~/admin/Pages/Users.aspx" title="users"  description=""  roles="administrators"/>
    <siteMapNode url="~/admin/Extension Manager/Default.aspx" title="Extensions"  description=""  roles="administrators"/>


Nov 8, 2010 at 7:45 PM
Edited Nov 8, 2010 at 7:53 PM

I now have uploaded BE 1.6.1 and have done everything I think I need to do (run 2 upgrade scripts against the database, renamed sqlserverweb.config to web.config, updated the connection string in web.config, made sure App_Data has full permission, etc.) and I get the following error: (I know my login info in web.config is correct)

Cannot open database "BlogEngine" requested by the login. The login failed.
Login failed for user 'xxxxx'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Cannot open database "BlogEngine" requested by the login. The login failed.
Login failed for user 'xxxxx'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Cannot open database "BlogEngine" requested by the login. The login failed.
Login failed for user 'xxxxx'.]
   System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +428
   System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +65
   System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +117
   System.Data.SqlClient.SqlConnection.Open() +122
   BlogEngine.Core.Providers.DbBlogProvider.LoadSettings() in DbBlogProvider.cs:1512
   BlogEngine.Core.BlogSettings.Load() in BlogSettings.cs:858
   BlogEngine.Core.BlogSettings..ctor() in BlogSettings.cs:48
   BlogEngine.Core.BlogSettings.get_Instance() in BlogSettings.cs:75
   BlogEngine.Core.Web.HttpModules.ReferrerModule..cctor() in ReferrerModule.cs:81

[TypeInitializationException: The type initializer for 'BlogEngine.Core.Web.HttpModules.ReferrerModule' threw an exception.]

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +67
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1051
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
   System.Web.Configuration.Common.ModulesEntry.Create() +39
   System.Web.Configuration.HttpModulesSection.CreateModules() +164
   System.Web.HttpApplication.InitModules() +28
   System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +729
   System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +298
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +107
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +289


Nov 8, 2010 at 10:27 PM

I guess you've decided to go to BE 1.6.1.

What does your connection string look like?  The error message is unambiguous -- the password doesn't appear to be valid for the username specified.

Nov 8, 2010 at 10:45 PM

Yeah, I thought if I'm going to get into it I might as well as go to BE 1.6.1.

Below is my connection string in web.config:

<add name="BlogEngine" connectionString="Data;
Initial Catalog=DatabaseName; User ID=DatabaseName; Password=Password;persist security info=False;initial catalog=BlogEngine;" providerName="System.Data.SqlClient"/>

This is how GoDaddy says the connection string should look (i.e. where the DatabaseName and Password are displayed above)

I don't know if this matters, but when I have everything the way it is right now but replace this new web.config file with my original web.config file I get the BE 1.6.1 Welcome screen and I can't get any further.

Nov 8, 2010 at 11:11 PM

You have "initial catalog" in there twice.  I don't think it hurts, but I would still remove one of them -- two are definitely not needed.

The only other part that looks suspicious is the User ID.  Are you sure it should be the same as DatabaseName?

I have an older DB at GoDaddy that's been around for 2 years.  For that DB, the Username and DatabaseName are different.  The Data Source is quite a bit different than what you have too, but they probably have changed their system / servers.

Not sure if this or this article might help.

Nov 9, 2010 at 8:56 PM

I took out the second instance of "initial catalog" and it now works! This is my first time looking at BE 1.6.1, but so far so good.

Thank you very much for your time spent on this.