MSSQL...Please Check Your Connection String

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/8/2010 1:24:27 PM
Gravatar
Total Posts 11

MSSQL...Please Check Your Connection String

OS: Microsoft Windows Server 2003(Standard Edition/Service Pak 1)

Database Platform: SQL Server 2000

Version of Mojo: mojoportal-2-3-3-2-msql-deploymentfiles

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 'Grimoire\Administrtaor'. 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)

Not to difficult of a problem I just dont have my SQL book to troubleshoot it.

Any help would be appreciated!

Thank you in advance...

 

 

 

 

 

 

 

1/9/2010 9:36:07 AM
Gravatar
Total Posts 18439

Re: MSSQL...Please Check Your Connection String

Hi,

Please see the document Using MS SQL Server.

Hope it helps,

Joe

1/13/2010 5:55:54 PM
Gravatar
Total Posts 11

Re: MSSQL...Please Check Your Connection String

Hey Joe !

Initially in the user.config file I was using ...

<add key="MSSQLConnectionString" value="server=(LOCAL);UID=IUSR_machine name;PWD='*';database=MOJO" />

Which create the error message "Please Check Your Connection String" I mentioned in my first post. Afterwards I changed the user.confg file to use

                                       <appSettings>

                                               <add key="MSSQLConnectionString" value="server=(local);database=mojo;Trusted_Connection=true" />
 

                                       </appSettings>

And the web.config file to include

                             <system.web>

                                           <identity impersonate="true" />
 

                                </system.web>

 

These setting use the aspnet_client. Although I have read that the user must have a login account. There are two types of login accounts that you can give the users: Standard and integrated.  An intergrated account is also referred to as a <i>trusted connection</i>, because with this type of login, SQL Server trusts windows NT to verify the username and password. This type of login can be used only for Microsoft Clients, such as windows 98 or Windows NT. Standard accounts do not trust Windows NT to verify account information and therefore are useful for clients that do not have a Windows NT account, such as Macintosh or Unix clients. Either type of account will give users access to SQL Server as a whole, but not the individual databases.

To give users access to individual databases you must create a database user account for them in each database where they require access.

This having been done...  The new error message reads


Welcome to mojoPortal Setup


Probing system...
File system permissions ok.
MSSQL database connection ok.

mojoSetup has detected that the database user does not have permission to alter the database schema.

You need to correct this or provide a connection string with sufficient permission.

database initial schema needs to be created.

Any ideas on where to go with this? Thanks in Advance... If your ever in town the beers are on me !
 

1/15/2010 9:11:32 AM
Gravatar
Total Posts 18439

Re: MSSQL...Please Check Your Connection String

Hi,

I recommend configure your SQL Server installation for Mixed Mode Authentication which allows both Windows users and SQL users, then create a SQL user, make it dbo on the db and use that user in the connection string.

I would not recommend using IUser_MachineName as the user, by default that user has no permissions in MS SQL and I would not give that user permissions.

For more information see Using MS SQL Server.

Hope it helps,

Joe

1/15/2010 1:59:31 PM
Gravatar
Total Posts 11

Re: MSSQL...Please Check Your Connection String

Hey Joe !

Authenication was already set to mixed mode. Created mojo user and...

Welcome to mojoPortal Setup
Probing system...
File system permissions ok.
MSSQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema already exists.
database core schema needs upgrade.
0 site(s) found.
Running script mojoportal-core - 2.2.1.5 - 00:00:00.1902736

An Error Occurred:The stored procedure 'mp_SchemaVersion_SelectOne' doesn't exist.
Source:System.Data
Stack Trace at System.Data.SqlClient.SqlCommand.DeriveParameters() at System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command) at mojoPortal.Data.SqlHelperParameterCache.DiscoverSPParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter) at mojoPortal.Data.SqlHelperParameterCache.GetSPParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) at mojoPortal.Data.SqlHelperParameterCache.GetSPParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) at mojoPortal.Data.SqlParameterHelper.InitializeArray() at mojoPortal.Data.SqlParameterHelper.Initialize(String pConnectionInfo, String pCommandText, CommandType pCmdType, Int32 pParamCnt) at mojoPortal.Data.DBPortal.SchemaVersionGetSchemaVersion(Guid applicationId) at mojoPortal.Data.DBPortal.SchemaVersionExists(Guid applicationId) at mojoPortal.Business.DatabaseHelper.UpdateSchemaVersion(Guid applicationId, String applicationName, Int32 major, Int32 minor, Int32 build, Int32 revision) at mojoPortal.Web.UI.Pages.SetupHome.RunUpgradeScripts(Guid applicationId, String applicationName, String pathToScriptFolder, Version versionToStopAt) at mojoPortal.Web.UI.Pages.SetupHome.UpgradeSchema(String applicationName) at mojoPortal.Web.UI.Pages.SetupHome.RunSetup() at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

I've developed PHP/MySQL sites and applications for over 7 years. Think I might try the installation of the mojoportal on one of my sites though I need this version running ASP.Net framework with the C#.

Where do I go from here? Thanks once again!

1/15/2010 2:41:04 PM
Gravatar
Total Posts 18439

Re: MSSQL...Please Check Your Connection String

Ok, it should start with script 2.2.7.8 not 2.2.1.5. Its trying to upgrade rather than install. The way it determines if it is an upgrade or clean install is by detecting the mp_Sites table, so your db is not empty, the mp_Sites table exists somehow.

If you can start again with an empty db it should work.

Hope it helps,

Joe

1/18/2010 11:46:15 AM
Gravatar
Total Posts 11

Re: MSSQL...Please Check Your Connection String

Hey Joe,

"If you can start again with an empty db it should work"... ?

Can you be a little more detailed. "Empty DB" referencing to the mojo db  being empty? Or are you refering to the other db's existing on the SQL Server 2000.

I emptyied out the db tables but that didn't work. Came up with a connection error again. reloaded the db tables for mojo again and Im at the last error where the connection is good.

Welcome to mojoPortal Setup
Probing system...
File system permissions ok.
MSSQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema already exists.
database core schema needs upgrade.
0 site(s) found.
Running script mojoportal-core - 2.2.1.5 - 00:00:00.1902736

 

1/18/2010 11:52:55 AM
Gravatar
Total Posts 18439

Re: MSSQL...Please Check Your Connection String

I mean any db with no existing mojoportal tables or stored procedures. The problem is somehow your db already has some mojoportal objects like the mp_Sites table, so it is trying to do an upgrade and it is starting with an old upgrade script. So either delete all the mojo objects from your current db or just create another new empty one and set your connection string to use the new one. The problem is your current db is in an unknown state, it has some things there that make it try to upgrade instead of clean install, but it is not in a condition to upgrade. If the db is empty, that is it has no mojoportal tables or procs, then it should do a clean install and it should start with script version 2.2.7.8.

Hope it helps,

Joe

1/18/2010 3:20:46 PM
Gravatar
Total Posts 11

Re: MSSQL...Please Check Your Connection String

Hi Joe,

Setup is Complete, click the link below to go to the home page...

Database platform   MSSQL

Version 2.3.32

Status  Your installation is up to date....

ERROR !

Could not load typre 'Sysytem.Web.UI.ScriptReferenceBase" From assembly

'System.Web.Extensions, Version=3.5.0.0, Culture=neutral,

PublicKeyToken=31bf385ad364e35'.

I went ahead and create a new altoghter db and everything seemed to have loaded right. Any ideas?

 

Thanxs again !

 

 

 

1/18/2010 3:30:03 PM
Gravatar
Total Posts 18439

Re: MSSQL...Please Check Your Connection String

Hi,

This error can be solved by installing .NET 3.5 SP1, you are missing the SP1

Hope it helps,

Joe

1/18/2010 3:39:28 PM
Gravatar
Total Posts 11

Re: MSSQL...Please Check Your Connection String

ASP.NET 2.0.5 is the latest version I have ...Seems as if I need to update to ASP.NET 3.5

After I checked the web.config file in reference to the error it mentions 3.5 NET ...right clicked on the defaults properties link to the default server where the mojoportal is set up, clicked on the ASP.NET tab and the version 2.0.5 is the latestest version... MY BAD ! 

 

Thanks seems everything load right !

 

1/18/2010 3:47:55 PM
Gravatar
Total Posts 11

Re: MSSQL...Please Check Your Connection String

Microsoft Windows server 2003 Standard addition.

System Properties says it has service pack 1

3.5 comes in service pack 2 will download it and see what happens. Thanks again!

Beers are on me !

1/19/2010 2:01:13 PM
Gravatar
Total Posts 11

Re: MSSQL...Please Check Your Connection String

Hi Joe,

Thanks for the help mojoPortal is up and running !

Installed dotnetfx35.exe and everything is running smooth! Developing in C#.Net will be a breeze. 

Time to take this conversation to the developers forum for the  MVC experimention discussions.

Grimoire :))

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