This project is read-only.

1.4 Complilation Errors

Jul 1, 2008 at 4:11 AM
Hi, I keep getting the following 2 errors - Any suggestions?

1) I get this just trying to go to the site

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS1518: Expected class, delegate, enum, interface, or struct

Source Error:

Line 391:  /// <param name="name">Extension name</param>
Line 392:  /// <returns>True if new</returns>
Line 393: private static bool IsNewExtension(string name)Line 394:  {
Line 395:    if (_newExtensions.Contains(name))

Source File: \App_Code\ExtensionManager\Manager.cs    Line: 393

And 2) If I attempt to log in

Invalid object name 'be_Users'.

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: Invalid object name 'be_Users'.

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): Invalid object name 'be_Users'.]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +925466
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +800118
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +186
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1932
   System.Data.SqlClient.SqlDataReader.ConsumeMetaData() +31
   System.Data.SqlClient.SqlDataReader.get_MetaData() +62
   System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +297
   System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +1005
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +132
   System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +32
   System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +122
   System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +12
   System.Data.Common.DbCommand.ExecuteReader() +9
   BlogEngine.Core.Providers.DbMembershipProvider.ValidateUser(String username, String password) +343
   System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
   System.Web.UI.WebControls.Login.AttemptLogin() +105
   System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1746

Jul 1, 2008 at 8:21 AM
Not sure about the first error, but the second error is occurring because of a web.config issue - the new version's web.config defaults to a DbMembershipProvider - which is new in 1.4.

If you're upgrading, switch it back to a XmlMembershipProvider or SqlMembershipProvider depending on where your data is stored. This wiki article shows you the parts of the web.config to update

If you're doing a fresh install, the be_Users table is part of the new set of providers. I can't help with setting up a custom provider at the moment (lack of familiarity), and the wiki is still talking about 1.3. Hopefully someone else can jump in here and provide some links.
Jul 1, 2008 at 7:38 PM
Here's an update. I have reverted back to my 1.3 installation because I have a feeling this is something to do with my hosting provider. However, I do have some details on the two error above.

Error 1: I would get this on a fresh install of the application as well as upgrading my live site. I get this when trying to reach the home page or anything with publicly visible content. This did not happen in the admin section however.

Error 2: Again, on both the clean and upgrade of my site, this occurred only when I tried to use any of the providers used for Roles, Profiles or Membership in conjunction with a SQL Database. I'm assuming this also due to my provider since after doing some research into it, it looks like you have to do specially installations via SQL to get these tables in place.

So, if anyone with a lot more development knowledge than I have (I work in .NET all the time, however, I'm a UX person so the code behind is not really in my realm) happens to know more about what would cause these errors and some information about them, it would be greatly appreciated! (What can I say, I love new features!)

Thanks a ton and if anyone would like more information about my step or whatnot, just let me know.
Jul 8, 2008 at 1:03 PM
Edited Jul 8, 2008 at 1:17 PM
I just ran into this myself (problem 2, be_users), and thought I don't have a solution at the moment, I just wanted to let you know what the problem is...

The MSSQLSetup1.4.0.0.sql and MSSQLUpgrade1.4.0.0.sql provided in the setup directory DO NOT contain any references to the be_users table... Going to have to reverse-engineer the xml tables and build them yourself. If I have time, I might build/upload a patch for this.

Otherwise, I just found a post detailing what would be required:
Jul 11, 2008 at 9:12 AM
Hello Guys,

Here is the scripts of the missing tables

CREATE TABLE [be_Roles](
    [RoleID] [int] IDENTITY(1,1) NOT NULL,
    [Role] [varchar](100) NOT NULL,
    [RoleID] ASC

CREATE TABLE [be_Users](
    [UserID] [int] IDENTITY(1,1) NOT NULL,
    [UserName] [varchar](100)  NULL,
    [Password] [varchar](255)  NULL,
    [LastLoginTime] [datetime] NULL CONSTRAINT [DF_be_users_LastLoginTime]  DEFAULT (getdate()),
    [EmailAddress] [varchar](100)  NULL,
    [UserID] ASC

CREATE TABLE [dbo].[be_UserRoles](
    [UserRoleID] [int] IDENTITY(1,1) NOT NULL,
    [UserID] [int] NOT NULL CONSTRAINT [DF_be_userroles_UserID]  DEFAULT ((0)),
    [RoleID] [int] NOT NULL CONSTRAINT [DF_be_userroles_RoleID]  DEFAULT ((0)),
    [UserRoleID] ASC

INSERT INTO be_Users (UserName, Password, LastLoginTime, EmailAddress)
    VALUES ('Admin', '', Getdate(), '');
declare @AdminId as int
set @AdminId = Scope_Identity()

INSERT INTO be_Roles (Role)
    VALUES ('Administrators');

declare @AdminRoleID as int
set @AdminRoleID= Scope_Identity()

INSERT INTO be_Roles (Role)
    VALUES ('Editors');

INSERT INTO be_userroles (UserID, RoleID)