urgent help, need some default info

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
8/12/2010 3:42:46 AM
Gravatar
Total Posts 18

urgent help, need some default info

Hi sorry for this post - its not 100% mojo portal ;(

 

I have mojoportal set up on my server windows 2008 server with sql server 2008, and hosting with 1and1.

basically i was trying to get a dirrect connection (using ms access to the database server) following this blog http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/

I think the changes I have made to tcp/ip (which i did incorrectly to start with) have stopped mojo connecting to the database server.(error message below)

Ive tried reseting them back to what I thought they were but still the same message, can anyone let me kow what settings they have for the following in Sql server configuration manager

Sql Native Client 10.Configuration (32bit)

Client Protocols

  • TCP/IP Enabled
  • Named Pipes Enabled

 

Sql Native Client 10.Configuration

Client Protocols

  •  TCP/IP Enabled
  • Named Pipes Enabled
     

SQL server Network Configuration

Protocols for myServername

  • Named Pipes Enabled

 

(i havent touched shaed memory or via - so i know they are fine)

Could it be something else ive tried so many variations (and restarted the service) but still the same - also turned off the firewall to make sure that wasnt the issue. 

any help realy appreciated

 

 

 


System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) 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)

8/12/2010 8:40:57 AM
Gravatar
Total Posts 18439

Re: urgent help, need some default info

basically i was trying to get a dirrect connection (using ms access to the database server) 

This is 100% nothing to do with mojoPortal.

Possibly you are not using the correct instance name of your sql server or your firewall is blocking the connection or any number of other possible issues.

Other than that I have no suggestions for you but to look for other resources on the net.

8/12/2010 9:23:39 AM
Gravatar
Total Posts 18

Re: urgent help, need some default info

hi joe, I wasnt after help with the direct connection. that was just what i was trying to start with, once I tried changing the protocols as the blog suggested the mojoportal site stopped working.  the reason I posted here was I know you recommend 1and1 so thought it might be the best place to find out what others with a simular set up had for the defaults.. anyway I resorted to a uninstall and reinstall of sql 2008 server to try get teh default settings back, didnt help.

I havent changed a thing on the mojo side so im hoping it just a matter of finding out why sql server 2008 cant connect to anything, is there anything in mp set up that might help re establish the connection? or is the best error message im likely to get the one I attached below?

8/12/2010 9:43:19 AM
Gravatar
Total Posts 18439

Re: urgent help, need some default info

if SQL server is installed on the web server then you should just use localhost not the ip address for the database server name. Probably by default it is blocking external tcp/ip connections to the database (which is best from a security point of view) so using the public ip address is not the way to connect.

And as I said before it may have an instance name that must be specified correctly, like by default SQL Express will use an instance name of SQLExpress so for the server you would need server=localhost\SQLExpress; or it won't see the database server

Hope it helps,

Joe

8/12/2010 9:44:46 AM
Gravatar
Total Posts 18

Re: urgent help, need some default info

thanks for the suggestions anyway, i was already looking elsewhere (and still am wth no luck)

-already turned the firewall off and the server instance hasnt changed since it was installled / and mp has been working with it for 12 months now.

I was just despareate to get the site up and running as soon as posible, but thats not going to happen anytime soon

8/12/2010 9:52:47 AM
Gravatar
Total Posts 18439

Re: urgent help, need some default info

if you re-installed SQL Server then it may not have the same instance name, it is not the same installation that worked for 12 months it is a new installation of SQL Server. I would not have re-installed it as a step to solve a connection issue that occurred after configuration changes, that is way drastic.

you should right click the server node (the instance name if any should be shown in this node) in sql management tools then choose Properties and check the security tab to make sure it is configured for both windows and Sql authentication. There is also a connections tab where you could enable remote connections though I recommend not doing that, it is not needed for local connections like from your mojoportal site on the same server and having it allow connections over the internet is not something I would do if I could avoid it.

8/12/2010 11:19:51 AM
Gravatar
Total Posts 18

Re: urgent help, need some default info

I would not have re-installed it as a step to solve a connection issue" - desparate times call for desparate measures - I was hoping it would reset the defaults, I had already tried the things you suggested along with most of the stuff suggested on various forums / blogs.

I can get a response back(listing instance and server name) from the port using sqlcmd -L and using portqry against localhost  but not when i use the servername, so im thinking is something the windows server as oposed to sql server..

anyway thanks for the responses, I will keep trying stuff i see in posts , in the hope that it works, thanks again.

8/12/2010 12:58:34 PM
Gravatar
Total Posts 2239

Re: urgent help, need some default info

Run the following from command line.

netstat -n -a |findstr "1433"

 

If you get something like the following, TCP/IP is configured for the sql instance. If you don't get anything, you need to configure the SQL Instance for TCP/IP. You can follow the instructions on MS's site for this: http://msdn.microsoft.com/en-us/library/ms190608.aspx

  TCP    0.0.0.0:1433           0.0.0.0:0              LISTENING

If you don't know what the name of your SQL Instance is, follow these instructions:

  1. Open Microsoft SQL Server Configuration Manager
  2. Select the "SQL Server 200x Services" item on the left.
  3. Your SQL Server instance will be listed on the right along with a few other services.

If the name of the SQL service is "SQL Server (MSSQLSERVER)" you are running a "default" instance so you do not need to specify the instance name in your connection string. If the name of the SQL service is anything other than a default instance you must use the name specified in the parenthesis in your connection string. Example, if the Service name is "SQL Server (SQLEXPRESS)":

<add key="MSSQLConnectionString" value="server=.\SQLEXPRESS;UID=mojouser;PWD=P@ssword1!;database=mojo" />

 

These are all just troubleshooting steps to help you gather more information. If you follow them, you will more than like run into the problem and be able to fix it.

Shameless plug: I will be more than happy to login to your machine and figure out what is wrong with your configuration. If you are interested in details and pricing, email me at joe (at) i7media (dot) net.

HTH,
Joe D.

8/12/2010 5:12:31 PM
Gravatar
Total Posts 18

Re: urgent help, need some default info

30 hours (minus 8 hours sleep) and manage to get it running,  before I make excuses, I take full responsibility for "messing with stuff"

but the trueth is is I have no idea how it could have gone wrong- after reinstalling sql server (and trying many other things out) i found an Alias in the SQL server config manager, Sql native client config. the Alias was the servername/instancename  so exactly the same as my server and instance so i guess any changes I was making to get it working it was still looking at the Alias - which I am sure i never added (but must have) and doubely sure I wouldnt have called it exactly the same as the live server/instance - that would be insane.

But anyway, I think once the site is more established I will be definately be enquiring about a support pricing. 

thanks again

8/12/2010 8:41:01 PM
Gravatar
Total Posts 2239

Re: urgent help, need some default info

Glad you got it working!!

-Joe D.

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