Unable to access Database

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/26/2011 4:18:34 PM
Gravatar
Total Posts 3

Unable to access Database

Sorry folks for reposting this if it's been posted; a general search didn't find the answer I was looking for.

Here's the setup:

  • Windows Server 2008 R2
  • IIS 7.5
  • SQL 2008 R2 (default instance)

Here's the situation:

Lost my host server a while back, and had to rebuild my VMs.  I had a backup of the .mdf and .log files as well as the directory structure for the website.

I added the .mdf/.log file to SQL 2008 R2, and created a new website in IIS 7.5.

SQL seems to be acting fine (i can log onto it just fine, it's not throwing errors)
IIS seems fine, no errors.

However, when I launch http://www.mysite.com/setup/default.aspx, I'm getting the following errors:

Probing system...
File system permissions ok.

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


System.Data.SqlClient.SqlException: Login failed for user 'mpuser'. 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)

What I've done:

The mpuser is a local user account on my server.  In SQL, I've created a Login for that user "SERVER\mpuser" and added him to the database security and given him the default schema of [dbo].

 

I've tried using sa, tried using a domain account.  I've tried all sorts of combinations of the roles and schemas to grant permissions.

Looking at the docs, I only saw that you had to give [dbo] access, but nothing really calls out any differences with 2008R2 (if there are any).

 

Am I missing something? Is there another log where I could provide further info?

 

Thanks,

 

Chris

 

 

1/27/2011 12:30:17 PM
Gravatar
Total Posts 18439

Re: Unable to access Database

I recommend make sure your SQL Server is configured for mixed mode authentication ie both Windows and SQL authentication , then use a sql user rather than a windows user and specify the user and password in the connection string. It is possible to use a windows account for sql but its trickier to configure and it is rarely done that way in public hosting. sql authentication is much easier to work with.

Hope it helps,

Joe

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