Remote SQL Server Installation

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/29/2007 12:12:33 PM
Gravatar
Total Posts 31

Remote SQL Server Installation

First off... EXCELLENT job with this framework, packaging & everything about it.

I have sucessfully installed this a number of times (testing) and have been successful with SQL 2005 Express on my local machine, local IIS.   Now, however, I'm trying to install this on my company's intranet.  I have a web server WEB01 and a MS sql server 2000 SQL01. 

I work with SQL Server daily, so I know it pretty well.  I created the login/user, assigned necessary permissions, etc.  Then tested the connection from my workstation successfully.  Then, made the necessary changes and installations on the 2 servers.  Yet, I always receive the "cannot connect to the database, check your connection string. " 

I have since taken an existing mojoportal running on my workstation, changed webconfig to point to the new db server, and it doesn't connect. 

I ran SQL Profiler on the sql server but I don't even see a connection attempt??

Any ideas?

8/29/2007 1:24:10 PM
Gravatar
Total Posts 18439

Re: Remote SQL Server Installation

Are you using a user.config file? If so, the connection string there would take priority over the one in Web.config

Is your SQL server allowing connections using sql logins or does it require windows integrated security?

Joe

8/29/2007 1:46:33 PM
Gravatar
Total Posts 31

Re: Remote SQL Server Installation

Sql server is set for both Windows & SQL authentication.  I've successfully tested connecting from QA and SQL2005CTP.

I wasn't using user.config simply because i wasn't sure what/how much info should be in there, although I did read that it would take precedence.

A local db works with the following connection string

server=WS17\SQLEXPRESS;UID=mojo;PWD=M0jo;database=mojo

Simply changing it to:

server=SQL01;UID=mojo;PWD=M0jo;database=mojo

Is there any additional debugging I can turn on? As I said, I've turned SQL Profiler on to trace SQL on my db  server, but I don't even see the connection attempts.

Also, in web.config there is a section titled <connectionstrings> with an item key LocalSqlServer.  What is this used for?

I forgot to mention: this is version 2.2.3.6.  I've used both the download and TortoiseSVN.

 

Thanks for the help!

On another note: I've looked at DNN & Rainbow and like your project the best.  I also use CodeSmity and do a lot of n-tier/oop development for financial services & consulting.  I really want to have everything setup so I can build my own modules for addition, but I'm having some minor troubles with that also.  Once I get this resolved, I'll follow up on that a little bit more.

Chris

 

8/29/2007 2:03:18 PM
Gravatar
Total Posts 18439

Re: Remote SQL Server Installation

Hi Chris,

Are you sure the web machine is able to resolve the ip address for the host name SQL01? If you ping it from the web machine does it respond?

Are you sure the SQL1 machine is configured to accept tcp/ip connections from the web machine? Any other web apps on the web machine that can talk to the same sql box?

SQL 2005 has a Configuration tool called SQL Server Surface Area configuration that shows whether SQL allows remote connections or only local etc. I'm less sure where to check in SQL 2000 as its been a while but I think there is a client network utility. If sql is configred to run on non standard ports you may need to specify those in the connection string.

Are there any clues in the mojoportal error log  webroot/Data/currentlog.config?

Joe

8/29/2007 2:21:48 PM
Gravatar
Total Posts 31

Re: Remote SQL Server Installation

Joe,

I eliminated the other webserver and I am just using IIS on my XP workstation, so I am positive that it can connect to the DB server.  Also, the db server has connections from other systems.  I verified that by connecting from my workstation to the DB server with QA - connected both via Named Pipes and TCP/IP.

However, I get strange (and different) errors for both connections.

named pipes just says: "Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

but TCP/IP says: (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)

I know that it looks like the server isn't allowing connections, but as I said, I have tested it with QA.  The currentlog.config contains a number of entries for: "mojoPortal.Business.WebHelpers.CacheHelper [(null)] - Error trying to obtain siteSettings"

Thoughts?

8/29/2007 2:34:54 PM
Gravatar
Total Posts 18439

Re: Remote SQL Server Installation

Are you sure the other things on your workstation that are connecting to sql are using sql authentication and not integrated security with impersonation? For when you can browse the server in VS or Query analyzer that usually using your windows login and integrated security.

Are you positive the user and password are correct and the user has permission on the db? I would review it again or if possible try an sa login temporarily and see if that gets past the issue.

If you have another .net app (using a connection string) that can connect I would give that user permission on the db and see if you can connect as him by copying the connection string from a working app and just change the db name.

I think the message is not wrong, for some reason this user can't connect.

Joe

8/29/2007 2:47:30 PM
Gravatar
Total Posts 31

Re: Remote SQL Server Installation

I'm familiar with QA & SQL2005CTP... when you connect to a server, you can specify Windows or SQL Auth.  I'm selecting SQL Auth with the user/password. 

I will go through and double-check everything again and also setup a simple test site (not mojo) to verify that I can connect to the db from asp.net on my local machine.

The local install (sql2005express) has worked a number of times & I've seen you've already fixed issues with the script to work with sql2000. 

I'll start a new thread if I can get it to connect.  However, I'm about to start a new thread in the developer forums because I really want to understand how to set it up properly (i've had some issues already).  I really want to get that set so I can add my own modules (not for contribution yet, but for proprietary services). 

Thanks!!!

 

8/29/2007 2:56:32 PM
Gravatar
Total Posts 18439

Re: Remote SQL Server Installation

One more thing you might try is look in web.config there is a commented out <identity impersonate="true" />

I would try uncommenting it just to see if it makes a difference.

Joe

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