Problem running under VS2010

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.
12/20/2010 6:09:15 PM
Gravatar
Total Posts 9

Problem running under VS2010

I got some help from you before having to do with just getting MP to run on my local computer.  I got that figured out and it runs from VS2008.  That folder only included what I got from the Web Platform Installer.

I had some questions and it was suggested to me that I download all of the source code and then work with it under VS 2010.  Well, I installed TortoiseHG, created a folder and then downloaded all of the source.  I added a user.config file under the Web folder (same folder as web.config).  This contained my data connection string that worked under VS2008.  Here is the setting:

<appSettings>

<add key="MSSQLConnectionString" value="Data Source=.\SQLExpress;Database=mojoportal;uid=davem7714;Pwd=damar7714;" />
 

When I tried to build and run the web-site I got the following information:

Welcome to mojoPortal Setup
Probing system...
File system permissions ok.

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


System.Data.SqlClient.SqlException (0x80131904): Login failed for user 'davem7714'. 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) in G:\Projects\MojoPortal\mojoPortal.Data.MSSQL\dbPortal.cs:line 362

Note: This page shows some information that is helpful during setup and upgrades but for security it would be best not to show any information when the system is up to date. You can disable setup and suppress all information on this page by setting DisableSetup=true in Web.config. When you need to upgrade, you can set this back to false. If you are logged in as Administrator setup will run and you will be able to see this page even if it is disabled in Web.config so you can easily leave it disabled and just login before upgrading. But if you are not logged in you will need to enable setup in Web.config.
 

I don't quite understand why this connection string doesn't work.  It works in VS2008 but not VS2010.  Also, I don't have any connection string in my web.config file.

Any suggestions?

Dave :-)

12/21/2010 7:54:37 AM
Gravatar
Total Posts 18439

Re: Problem running under VS2010

The error looks very clear, login failed for the user, maybe the username is bad, maybe the password is bad, maybe the db name is bad, maybe the user does not have any permissions on the mojoportal database.

VS is not a factor in my opinion.

Note that if you make changes in user.config they are not automatically detected so you have to touch Web.config to make it reload all the settings.

Hope it helps,

Joe

12/21/2010 10:36:34 AM
Gravatar
Total Posts 9

Re: Problem running under VS2010

Yes, I would agree that the error looks very clear.  The only problem is that these same settings work under VS2008.  I will try to make a minor change to web.config and see if that works.  I did notice that the user.config file is not part of the solution.  Do I need to add this?

Dave :-)

12/21/2010 11:22:20 AM
Gravatar
Total Posts 1203
Proud member of the mojoPortal team

Help support mojoPortal!
Add-on modules

Re: Problem running under VS2010

user.config just needs to be in your Web directory under the mojoPortal source root. The web.config and user.config in that directory are the ones that will be loaded when you run from within VS.

Jamie

12/21/2010 3:55:37 PM
Gravatar
Total Posts 9

Re: Problem running under VS2010

Could it have anything to do with if my database is MSSQL or SQLExpress?

Dave :-)

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