Saturday, February 25, 2012

Connection Error

What the problem of this error. For information, please check code as below,

ProtectedConst SQL_CONNECTION_STRINGAsString = "workstation id=LOCALHOST; size=4096;integrated security=SSPI;initial catalog=VIVAM;persist security info=False;User ID=sa"

below is the error command

Login failed for user 'BST-FAIROZ\ASPNET'.

Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.Data.SqlClient.SqlException: Login failed for user 'BST-FAIROZ\ASPNET'.

As you set integrated security to SSPI in connection string, you're using Windows Authentication to connnect to SQL. So when the application is deployed to IIS5.0, IIS will use'BST-FAIROZ\ASPNET'account to connect to SQL. So what you need to do is add the account in SQL logins: open Management Studio (or Enterprise Manager)-> locate local SQL instance->Security->Logins->New Login. And give sufficient permissions to the account so that your application can perform query to SQL as you like.

connection error

Hi guys, my asp.net web page was working fine on my laptop. Until i transferred it into my friend's.. an error msg popped out. My SQL Northwind database was been copied over but still there seems to be a problem with the connection, can any one help me?
Personal guess: You are using an sa username/password in the connection string, and the other server you are connecting to is not set up for SQL security, only Windows security.
Show the connection string you are using (with any passwords obscured, of course).
|||

SqlConnection conn=new SqlConnection("server=localhost;uid=sa;pwd=;database=Northwind");

SqlCommand cmd = conn.CreateCommand();

cmd.CommandText = "SELECT * FROM tblDoor";

conn.Open();
//how to find out what user id to use?

|||Do you have SQL Server or MSDE? If SQL Server, then you should be able to use Enterprise Manager to try and figure out what the SA password is, as well as determining whether SQL Server security is enabled. If you have Enterprise manager, right click the SQL Server and select Porperties. In the properties window, go to the Security tab make sure authentication is set to SQL Server and Windows.|||oh it is working already, thanks man!

connection error

When i am running the package using dtexec utility on the command prompt i'm getting this error for every connection that is not windows authenticated. however in the debug mode it is always working

Source: Connection manager "connection_name"
Description: Failed to decrypt protected connection string for server "server_name" with error 0x8009000B "Key not valid for use in specified state.
". You may not be authorized to access this information. [[Occurs when there is a cryptographic error, most often when the right key is not available]]
i have 2 types of connections: one to oracle database and another to sql database. how do i solve this problem? the package is failing because of them.

Thanks
ChristinaIt sounds like you're moving the package to a new machine? Have you changed the default sensitive encryption option of the package? If it's still encrypt sensitive with user key, and then you copy the package to another machine, this will happen.|||Ok..then should i set it to "don't save sensitive"?

i set the maximum error count to 3 so that the package doesn't fail everytime this happens..but i don't like this solution and it is appearing in the log.Tongue Tied

Thanks|||It sort of depends on what you're trying to do. If possible, use integrated auth. then you won't need to worry about passwords. Otherwise, you should encrypt with password and then pass the password in on the command line with dtexec like this: DTExec /F c:\PackageName.dtsx /P FoobarPassword#)%

Connection Error

Error Message:

A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)

The error occurs in Visual Studio 2005 v 8.0.50725.42. I have my string in my web.config file. In Visual Studio it doesn't work. When you upload the page it connects and shows the data. Now, I have been several places and been asked, "So what's the issue?" The problem is that I want Visual Studio 2005 to connect so that I can use it to create Gridviews, use the Server Explorer and so on.

Is there an upgrade to VS2005? Is this a known bug? Is there a work-around - a configuration that needs to be setup in the web.config file? I've only just begun my .NET 2.0 experience so type slow and use small words...

Thanks!

I suppouse you are talking about connection string for a database ?, I think you should try this questions in forums about general development or data access, and also give more info about how are you making the connection string, if you are using the "connectionStrings" section and so on.

This forum is only related to Team System and TFS issues, sorry.

Connection Error

Hi
I have a VB6 program that talks to SQL Server 2000 database. The Connection
String is as below:
Provider=SQLOLEDB.1;Persist Security Info=False;User ID=" & M_USER_NAME &
";Password=" & M_PASSWORD & ";Initial Catalog=" & Database & ";Data Source="
& M_SERVER
When the program is idle for a while, the connection terminates.
Also, when I try to connect using ODBC I get the following error
Connection failed;.
SQLState: '01000'
SQL Server Error: 53
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Connect())
Connection failed;
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or
access denied.
Any ideas or suggestions. Dont know where to start looking.
The SQL Server is running. I have double-checked that.
Please HELP
Thanks
Hi, Raju
See:
http://support.microsoft.com/kb/328306
http://support.microsoft.com/kb/827422
Razvan
|||trest
"Razvan Socol" <rsocol@.gmail.com> schrieb im Newsbeitrag
news:1132744113.256414.11460@.g43g2000cwa.googlegro ups.com...
> Hi, Raju
> See:
> http://support.microsoft.com/kb/328306
> http://support.microsoft.com/kb/827422
> Razvan
>

Connection Error

Connection failed:
SQL State: '01000'
SQL Server Error: 10061
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
SQL Server does not exist or access denied.
now i cannot even create the DSN how to solve it please
help me iam in trouble please
How are you connecting to SQL Server? SQL Server login or Windows login?
Do you have Server Security configuration set up correcly?
Following error also comes up when security says "windows mode" and we
connect with "sql server login" or vice versa.
"SubhashChoowdary" wrote:

> Connection failed:
> SQL State: '01000'
> SQL Server Error: 10061
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
> ConnectionOpen (Connect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 17
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
> SQL Server does not exist or access denied.
> now i cannot even create the DSN how to solve it please
> help me iam in trouble please
>

Connection Error

Connection failed:
SQL State: '01000'
SQL Server Error: 10061
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
ConnectionOpen (Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error: 17
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
SQL Server does not exist or access denied.
now i cannot even create the DSN how to solve it please
help me iam in trouble please
How are you connecting to SQL Server? SQL Server login or Windows login?
Do you have Server Security configuration set up correcly?
Following error also comes up when security says "windows mode" and we
connect with "sql server login" or vice versa.
"SubhashChoowdary" wrote:

> Connection failed:
> SQL State: '01000'
> SQL Server Error: 10061
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
> ConnectionOpen (Connect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error: 17
> [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]
> SQL Server does not exist or access denied.
> now i cannot even create the DSN how to solve it please
> help me iam in trouble please
>