help solving: Could not load type 'mojoPortal.Web.AdminUI.DatabaseManager'

Post here for help with installing or upgrading mojoPortal pre-compiled release packages. When posting in this forum, please provide all relevant details. You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

Post here for help with installation of mojoPortal pre-compiled release packages

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.

You may also want to review the installation or upgrading documentation.

If you have questions about using the source code or working with mojoPortal in Visual Studio, please post in the Developer forum.

This thread is closed to new posts. You must sign in to post in the forums.
1/11/2009 9:00:59 PM
Gravatar
Total Posts 5

help solving: Could not load type 'mojoPortal.Web.AdminUI.DatabaseManager'


Hello To All,
I'm trying to run mojoportal on my local machine, so I can get familiar with it, before trying to work with it over the internet on a server, . . . but I can't get it to run on my machine. ugh!
I'm using VWD 9.0.30729.1SP, w/.NET Framework 3.5SP1 AND SSMSE 9.00.3042.00, with SQL Server Config Manager: 2005.090.3042.00
I get the same error using the most recent "source" files or "release" files. I tried the whole cotton-pickin scenario several times. ugh! ;-)
In VWD I have copied everything from wwwroot into C:\mojoportal-1, and created mojo.mdf in the App_Data folder.
I can connect to mojo.mdf from within VWD and also using SSMSE, either with Windows Authentication or SQL Authentication;
. . . but when I run the Default.aspx page from the setup folder, I get an error
Error 3 Could not load type 'mojoPortal.Web.AdminUI.DatabaseManager'. C:\mojoportal-1\Admin\DatabaseManager.aspx 1
and then also when the page finally loads in the start-up browser I get,
Probing system...
File system permissions ok.

The system cannot connect to the MSSQL database. Please check your connection string.

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) 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 mojoPortal.Data.DBPortal.DatabaseHelperGetConnectionError(String overrideConnectionInfo) etc. etc.

The connection string I use is real basic, and matches the same I use for SQL Authentication in other VWD sites, and is like the suggested one in the instructions(but I tried several other incarnations). I tried turning SQL server express off/on, & switching from connect Local Only, to Named Pipes, to TCP IP Remote, etc. etc., but still received the same errors.

Well, I was hoping someone might have some trouble fixing ideas? Maybe?? ;-)) What is this newbie doing wrong? Thanks in advance, for any help!
Mark Graves

1/12/2009 5:39:24 AM
Gravatar
Total Posts 18439

Re: help solving: Could not load type 'mojoPortal.Web.AdminUI.DatabaseManager'

Hi Mark,

In VWD I have copied everything from wwwroot into C:\mojoportal-1, and created mojo.mdf in the App_Data folder.
I can connect to mojo.mdf from within VWD and also using SSMSE, either with Windows Authentication or SQL Authentication;

I don't know about all that attaching to .mdf file stuff, there may be a way to do that but I'm not able to help you with it as I never do that. I recommend configure your SQL express for Mixed mode (using both windows authentication and sql authentication). Then create a database using SQL Express Management and don't worry about putting it in App_Data or attaching to it. Then use sql authentication in your connection string. I've updated the Using MS SQL article with some additional information about using "named" instances of SQL Srver which is typical when using SQLExpress.

Hope it helps,

Joe

1/12/2009 6:15:31 AM
Gravatar
Total Posts 18439

Re: help solving: Could not load type 'mojoPortal.Web.AdminUI.DatabaseManager'

Also the part about

Could not load type 'mojoPortal.Web.AdminUI.DatabaseManager'

Makes me think you are opening the web as a web site when it is meant to be a Web Application. The difference is that web application has a .csproj file which indicates what files are included in the project whereas a web site has no project files and assumes all files are part of the project. In this case its a false assumption as there is a file on disk for /Admin/DatabaseManager.aspx, but it is not included in the project. Its a stubb for something I never finished and could be deleted. There may be other files as well so its just not a good assumption. With a web application project all of the files included in the list in the project file .csproj will be compiled into a dll in the bin folder.

If you use the mojoportal source code and you use the mojoportal solution/projects then you will not get this type load error. Neither the mojoportal release files nor the source code for the web were meant to be opened in VS as a web site and it sounds like that it what you are doing.

For more info, google for "difference between website and web application project"

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.