Showing posts with label password. Show all posts
Showing posts with label password. Show all posts

Tuesday, March 27, 2012

Connecting to sql server 2000 on Godaddy error: (provider: Named Pipes Provider, error: 40

Facts:

1. I am using my account on Godaddy trying to connect to my sql server db.

2. I can get into my db using user id and password.

3. Godaddy's help file shows this for a connection string:

connectstr = "Driver={SQL Server};SERVER=" & db_server & ";DATABASE=" &
db_name & ";UID=" & db_username & ";PWD=" & db_userpassword

4. My connection string: "Server=whsql-v09.prod.mesa1.secureserver.net;uid=dbasolutions;pwd=***;database=DB_87972;" & _
"Trusted_Connection=False providerName=System.Data.SqlClient"

{password **** out}

5. Get error message

An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the
fact that under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

I tried to email Godaddy's help desk with this information.

There first response: We do not allow remote connections to our sql server database.

There second response was to read the help file!

Does anybody have any suggestions?

Thanks in advance,

bswanson

Finally, I did get a tech support who would give me an ear. He got this script from his tech support to test my connection:

mssqltest.aspx

<%@. Import Namespace="System.Data.SqlClient" %>
<%
Dim oSQLConn As SqlConnection = New SqlConnection()
oSQLConn.ConnectionString ="Server=whsql-v09.prod.mesa1.secureserver.net;uid=dbasolutions;pwd=*****;database=DB_87972;"
try
oSQLConn.Open()
catch dag as exception
response.write(dag.message)
End try
Response.write("Connection Open!")
%>

Now we know we are connecting to sql server!

The next issue I realized that I was facing is that the code on the server was not recompiling. It was on the 1.1 framework running on asp.net 2.0.

The code was upgraded to asp.net 2.0 and uploaded again. Still it bombed. In an effort to get it working the debugger was turned on.

The next problem turned out to be in the <compilers> . The compiler option is not allowed. After deleting this code:

compilerOptions="/define:Debug=True /define:Trace=True /imports:Microsoft.VisualBasic,System,System.Collections,System.Configuration,System.Data,System.Drawing,System.Web,System.Web.UI,System.Web.UI.HtmlControls,System.Web.UI.WebControls"

out of the compilers, it worked!

On my local machines, I have not had trouble with recompiling. But on Godaddy, it did not recompile.

Hope this can help someone. I am open to suggestions.

Thanks,

Bswanson

Sunday, February 12, 2012

Connect to SQL with NT authentication from form...

I have a login page that checks the given userid/password against ADSI and redirects the user if successful. My problem seems to come when I try to connect to the SQL database with the user's NT credentials. I have the user's NT account setup in SQL, have anony. disabled in IIS, using Integrated Windows Security in IIS, and am using the following connection string:

connectionString = "data source=SqlServer;initial catalog=pubs;Trusted_Connection=Yes"

I also have this entry in my Web.Config file: <identity impersonate="true" /
Actually, it seems to connect OK, but I can not select any data. I just receive "Select permission denied..." errors even though the user has been given these permissions in SQL.

Any advice would be greatly appreciated.

Thanks,
-BenYou need to set the proper access rights in for the User in SQL Server itself.|||The user has all the proper permissions on the SQL server.

Connect to SQL Server dialog box

I am studying the MCP book, and in Ch 10 (regarding SQL
authorization) it says:
The user name and password are submitted to SQL Server
2000 in clear text unless both the client and the server
Net-Libraries are using SSL encryption for the
entire session.

>--Original Message--
>Does anyone know if the SQL Server connection dialog box
transmit the password in clear text? I know it's hidden
from display but I'm wondering what it does behind the
scenes.
>Thanks,
>Ray Kurpiel
>.
>
Thanks for the response, Meryl.

Connect to SQL Server dialog box

I am studying the MCP book, and in Ch 10 (regarding SQL
authorization) it says:
The user name and password are submitted to SQL Server
2000 in clear text unless both the client and the server
Net-Libraries are using SSL encryption for the
entire session.

>--Original Message--
>Does anyone know if the SQL Server connection dialog box
transmit the password in clear text? I know it's hidden
from display but I'm wondering what it does behind the
scenes.
>Thanks,
>Ray Kurpiel
>.
>Thanks for the response, Meryl.

Connect to SQL Server dialog box

Does anyone know if the SQL Server connection dialog box transmit the password in clear text? I know it's hidden from display but I'm wondering what it does behind the scenes
Thanks
Ray KurpielI am studying the MCP book, and in Ch 10 (regarding SQL
authorization) it says:
The user name and password are submitted to SQL Server
2000 in clear text unless both the client and the server
Net-Libraries are using SSL encryption for the
entire session.
>--Original Message--
>Does anyone know if the SQL Server connection dialog box
transmit the password in clear text? I know it's hidden
from display but I'm wondering what it does behind the
scenes.
>Thanks,
>Ray Kurpiel
>.
>|||Thanks for the response, Meryl.