Cannot Run Web Forms Version BlogEngine.Web WAP

Topics: ASP.NET 2.0, Business Logic Layer, Controls, Themes
Aug 23, 2012 at 1:11 AM

I was getting Parser Error Message: Unknown server tag 'blog:PostPager.

Per this answer, I updated my Web.config for SQL Server, new install:

<add namespace="App_Code.Controls" tagPrefix="blog"/>


<add assembly="BlogEngine.Net" namespace="App_Code.Controls" tagPrefix="blog"/>

Now I'm getting Parser Error Message: Could not load file or assembly 'BlogEngine.Net' or one of its dependencies. The system cannot find the file specified.

Can someone point me in the right direction?

Aug 23, 2012 at 3:21 AM

Are you trying to compile WAP version? The thread you are referring to is about web application project (WAP), not regular source that you download here.

Aug 23, 2012 at 3:36 AM

I'm trying to locate a WAP version that will run without error. I've now switched to the forks_rtur_bewap20_df61d5ef4eb6 version. I'm using SQLServerWeb.Config and am now getting the following error:

System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.


Line 70:     void Application_Start(object sender, EventArgs e)
Line 71:     {
Line 72:         Utils.LoadExtensions();
Line 73:     }

Aug 23, 2012 at 3:54 AM

I've downloaded the version and am getting the original Parser Error Message: Unknown server tag 'blog:PostPager message.

Aug 23, 2012 at 4:03 AM

I just downloaded, built and deployed to local this latest version with XML provider. If that works for you and only SQL server config for some reason causing issues,it might be simpler to modify regular web.config setting default providers to database and changing connection string.

Aug 24, 2012 at 12:37 AM
Edited Aug 24, 2012 at 1:25 AM

I have tried many times to amend the Web.config to work for SQL Server but there are too many differences when compared to the only other example I have which is for a 2.5 website version.

In short, we need a working Web.config set up for SQL Server for the WAP version...

Right now, getting:
Parser Error Message: Invalid column name 'BlogID'.

 <roleManager defaultProvider="DbRoleProvider" enabled="true" cacheRolesInCookie="false">
        <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"/>

Aug 24, 2012 at 3:57 AM

Here is what I did:

1. Removed Web.config

2. Replaced it with /setup/SQLServer/SQLServerWeb.Config moving it to root and renaming to Web.config

3. Added be26 database to local SQL express and ran /setup/SQLServer/MSSQLSetup2.6.0.0.sql to populate database

4. Modified connection string to:

<add name="BlogEngine" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=be26;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>

5. Modified "controls" section to look like this:

    <add assembly="BlogEngine.Web" namespace="App_Code.Controls" tagPrefix="blog"/>

In other words, the only change that needed to existing code is #5, which is pushed to latest WAP.

Aug 24, 2012 at 4:38 AM
Edited Aug 24, 2012 at 4:40 AM

The Web.config in this drop is still set to XML; all the providers are set to XML. Am using SQL Server (not Express) so I made the relevant changes and got it to work. Previously, I had modified the controls section the same way you did but still got Unknown server tag 'blog:PostPager' error message. So there has to be something else at play?

Thanks for your help :-)

Aug 24, 2012 at 2:04 PM

As it should, XML is a default and DB optional, nothing changes here. I'm not aware of anything else involved besides steps I outlined above, at least I haven't changed a single line accept connection string and controls section.