Yes, another "Please check your connection string" issue. :(

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.
8/4/2011 10:47:56 PM
Gravatar
Total Posts 21

Yes, another "Please check your connection string" issue. :(

I am getting the dreaded "The system cannot connect to the MSSQL database. Please check your connection string." issue.

Windows 7 Home Premium.
SQL Server 2008 R2
Site is hosted on IIS on local machine.

Connection string: <add key="MSSQLConnectionString" value="Data Source=.\sqlexpress;Initial Catalog=DBName;User ID=myID;Password=myPassword" />

This same connection string works perfectly on my desktop pc where the only difference is that it is running Windows 7 Pro.

I have been toying with it for hours now to no avail and I am quite familiar with connection strings. I am really stuck and aggravated at this point. Any help is appreciated.
 

8/4/2011 11:58:57 PM
Gravatar
Total Posts 245
mojoPortal Community Expert

Re: Yes, another "Please check your connection string" issue. :(

Here's mine (from user.config) and your side by side

<add key="MSSQLConnectionString" value="server=.\SQLEXPRESS;UID=mojouser123;PWD=island123;database=mojoPortal_kicker" />
<add key="MSSQLConnectionString" value="Data Source=.\sqlexpress;Initial Catalog=DBName;User ID=myID;Password=myPassword" />

They are very different.  Give my format a try.

Rick

8/5/2011 3:53:02 AM
Gravatar
Total Posts 55
mojoPortal Community Expert
Arvixe Web Hosting / mojoPortal Community Liaison Looking for quality mojoPortal hosting? Try Arvixe Check out the MojoPortal Blogs at Arvixe

Re: Yes, another "Please check your connection string" issue. :(

Hi,

My connection string also looks like Rick's.

I presume you have tried accessing via SQL Server Management Studio (or similar) to check the login details?

And you're not changing a connection string that is ignored / overridden by another? (eg, changing one in web.config that is overridden by one in user.config)

Spike

8/5/2011 6:04:13 AM
Gravatar
Total Posts 18439

Re: Yes, another "Please check your connection string" issue. :(

Is your connection string in Web.config or user.config?

If a user.config file exists it will use the connection string from there instead of the one from Web.config

Are you sure the instance of SQL Server on the server is named SQLExpress? that is the default instance name if you install SQLExpress but it could have been changed during installation to something else or a default instance in which case you would only need the server name or ip address.

Hope that helps,

Joe

8/5/2011 11:54:17 AM
Gravatar
Total Posts 21

Re: Yes, another "Please check your connection string" issue. :(

Spike and Rick, I tried many variations of the connection string including ones that were very similar to what you are recommending. I believe that what you have illustrated is basically the way it initially appears in the user.config file after a new installation and you have simply plugged in your specific database criteria. I tried that as well and it did not work last night, however, I will try again tonight and post the results here.

Also, my connection string is in the user.config file. I set up the database in SQL Server Management Studio as instructed by the YouTube video on this site.

Thanks for all the help. I know it must be something simple I am overlooking but it certainly gave me a devil of a time last night.

8/5/2011 12:25:39 PM
Gravatar
Total Posts 18439

Re: Yes, another "Please check your connection string" issue. :(

make sure your user.config doesn't have the connection string in there more than once, if it does the one lower in the file wins.

Make sure after editing user.config that you touch Web.config, ie type a space in it and save it, otherwise the runtime won't notice your changes in user.config.

Hope that helps,

Joe

8/5/2011 12:37:34 PM
Gravatar
Total Posts 245
mojoPortal Community Expert

Re: Yes, another "Please check your connection string" issue. :(

I believe that what you have illustrated is basically the way it initially appears in the user.config file after a new installation and you have simply plugged in your specific database criteria.

Nope.  That is the complete and exact CutNPast copy of my connection string from my user.config file I use on my home PC today:

Windows 7 Ultimate (SP1)
SQL Server 2008 R2 (Express)
Site is hosted on IIS on local machine.

 

The only real difference when I use that connection string on my 12 mojoPortal shared hosting sites will be the server=.\SQLEXPRESS

will have to be changed to server=localhost and that depends on your hosting provider, I use Arvixe and they are Great!

8/5/2011 3:47:58 PM
Gravatar
Total Posts 21

Re: Yes, another "Please check your connection string" issue. :(

Thank you very much, Rick. I will try it exactly as you have it this evening.

Also, I have been using Arvixe for about a year now and I am thrilled with them. Your recommendation is spot-on in my opinion.

8/5/2011 7:31:26 PM
Gravatar
Total Posts 21

Re: Yes, another "Please check your connection string" issue. :(

Unbelievable. Both connection strings work. I just needed to restart. How many times have I learned to restart, restart, restart over the years? Way too many for me not to have done it this time.

Unreal. Thanks very much for all the help. I am already loving this place.

8/6/2011 2:59:08 AM
Gravatar
Total Posts 55
mojoPortal Community Expert
Arvixe Web Hosting / mojoPortal Community Liaison Looking for quality mojoPortal hosting? Try Arvixe Check out the MojoPortal Blogs at Arvixe

Re: Yes, another "Please check your connection string" issue. :(

Hi Magian,

Did you touch/change web.config (see Joe's post)?

Changes to user.config don't get picked up by just refreshing the browser, but if you change web.config and then refresh, your changes in user.config will get picked up.

 

Spike 

8/11/2011 7:44:12 PM
Gravatar
Total Posts 21

Re: Yes, another "Please check your connection string" issue. :(

Spike,

Yes, I was/am aware of that. Each time I changed the connection string in user.config I would make some minor change to a comment in the web.config and save it.

I think the problem was that earlier that day I had ran aspnet_regiis -i due to installing IIS after Visual Studio. I received no prompts to restart after the installation so I did not, but I knew better.

I do appreciate all of the help, though.

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