SQL 2005 Express connection problems

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.
2/5/2007 3:34:18 AM
Gravatar
Total Posts 2

SQL 2005 Express connection problems

May someone please help me out of my misery- been battling with SQL 2005 express connection for hours... with SQL 2000 it was simple...

This is where I am now:

1. Mojo (for IIS +  ASP2.0) is installed under a virtual dir (application)
2. The database is created and the tables and SP scripts ran OK
3. The my problems strated with the users and the connection strings...
4. Got latest release 2.2.1.4. (unzipped the MSSQL release files for right DLLs)

What I've done in an attempt to solve them:

1. I've managed to edit the registry to enable SQL Authentication on Express.
2. Then I created the ASPNET user account (which was not created at installation)
3. After that I tried to create users again (both ASPNET and user123 to be able to use Windows or SQL Auth)

BUT I've tried all possible combinations of Auth, user logins, and connection strings, no success. Keep on getting login errors for both ASPNET user under Windows Auth or asp123 user with SQL Auth.

Would appreciate if someone can point me to a list of the processes to follow to get Mojo to run on my local XP machine.

 

 

 

 

 

2/5/2007 7:19:36 AM
Gravatar
Total Posts 18439

Re: SQL 2005 Express connection problems

I'm not sure whats going on with that, I have SQL 2005 full version set to use mixed mode authentication and it works fine. A little googling shows quite a few people seem to have issues connecting with SQL express so there may be something about the default setup for that.

See if this blog post resolves it for you. Maybe try getting it work with the sa user first then switch to a less priveledged user.

Hope it helps,

Joe
2/5/2007 8:40:56 AM
Gravatar
Total Posts 2

Re: SQL 2005 Express connection problems

Thanx Joe, but I managed to resolve the issue myself.

This is what I learnt, and it just might help someone else:

Read the SQL error log files!

When reading the SQL error log files, I picked up the entries refer to a different server name than the one I was using in the web.config file. 

My connection string was wrong, because I had 2 instances of SQL Express running (by accident installed it twice) Server=JOSHUA3\SQLEXPRESS should have been JOSHUA3\SQLEXPRESS2.

So about 4 hours wasted on something so simple. Hope that will help someone else too.

Oh, and thanks for the quick response.

 

11/9/2007 10:51:37 AM
Gravatar
Total Posts 9

Re: SQL 2005 Express connection problems

As a follow up question to this posting, I am also using SQL Express and did notice some difficulty at first trying to determine how to word the connection string itself.  I found out that putting the machine name\SQLEXPRESS as the server worked in the end.  This works fine if you are running the app locally.  When I eventually port this over to a server will I have to define the machine name in the connection string there as well, or is it possible to put an IP address\SQLEXPRESS as the server connection string?

Just curious if anyone has tried this or not, and whether or not the "machinename\SQLEXPRESS" statement is sufficient enough to get it working on a Win2k3 server as well.

Thanks,
Erik

11/9/2007 11:12:30 AM
Gravatar
Total Posts 18439

Re: SQL 2005 Express connection problems

This issue is not really specific to SQLExpress, it just seems that way because SQLExpress is typically installed as a named instance so the syntax is machinename\namedinstancename for both SQLExpress or SQL 2005. The difference is that usually SQL 2005 is installed as a default instance instead of a named instance.

The instance name is determined during the installation and SQLEXPRESS is just the suggested instance name during the default install of SQLExpress so if its installed on Win 2003 using all the defaults machinename\SQLEXPRESS will work but if a different instance name is specified during installtion that instance name must be used. Sometimes there will be other products already installed that rely on SQLExpress so the default name may already be in use and a different instance name will be suggested/used to prevent a clash with an existing one. So there is no guarantee that it will always be machinename\SQLEXPRESS

When SQL 2005 or SQL Express is installed as a default instance then its just machinename

Best,

Joe

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