Showing posts with label connects. Show all posts
Showing posts with label connects. Show all posts

Tuesday, March 27, 2012

A different question about SQL Server Access Denied

I have 2 development servers, both of which I need to use to run an ASP.NET app. The app connects to an external SQL Server with SQL Server authentication only. One of my servers connects properly, but the same exact app running on the second server generates the dreaded SQL Server Access Denied message. A traditional .asp file running on the second server does connect successfully to the database, so I have deduced that the problem is related either to the ASPNET account on the second server, or else to the structure of the server itself or IIS.

I have verified on both machines that IIS uses the ASPNET account for anonymous access. The only difference I can find is that the working server is using NTFS (and the VS_Developers account has full permission on my application's directory), while the problem server is using FAT. Does anyone know if it the FAT file system could be my problem? If so, should I convert to NTFS, or is there another solution? What else could I look at on the problem server? Any help would be greatly appreciated. Thanks.If you are using SQL Server authentication then using IIS anonymous accounts and ASP.Net accounts are not involved in the authentication. What is the exact message that appears? Login failed for user [...] ?

If you are using SQL server with SQL server authentication then in the connection string you should be providing the UID and Password of a SQL Server Login and there should be no "integrated security" clause in the connection string.|||Thanks for the reply. The error message is: "SQL Server does not exist or access is denied". There is no login failure error occurring.

Here is my connection string:
"Data Source=mySQLIPhere,1433;Network Library=DBMSSOCN;Initial Catalog=myDBName;User ID=mySQLUser;Password=mySQLPw;"

As I mentioned, this connection string works fine from one of the 2 development servers as well as from the production web server, so I don't think the connection string is the problem.|||Seems ok to me; if you are willing to do some experiments try these in order.

Verify that you can access mySQLIPhere machine from the machine causing the problem. e.g. by trying to open \\mySQLIPhere or by pinging.

Use query analyzer to connect to SQL Server from the machine causing problem. In "connect to SQL Server" dialog box provide mySQLIPhere as Sql Server name, select Sql Sever Auth, loginname and password. If this works you may experiment rewriting your connection string bit by bit e.g.:
"Data Source=mySQLIPhere; User ID=mySQLUser; Password=mySQLPw;"
"Data Source=mySQLIPhere,1433; User ID=mySQLUser; Password=mySQLPw;"
"Data Source=mySQLIPhere;Initial Catalog=myDBName; User ID=mySQLUser; Password=mySQLPw;"

It is most probably the SQL Server not exist (not found) part that looks true, rather than the access denied part.

Sunday, March 25, 2012

A connection was successfully established with the server, but then an error occurred during the

I have just installed MS SQL Server 2005 Express edition along with the SSMSE. I am using windows authentication. When I open SSMSE it connects me to a 'local instance' of the server. From there I right click on Database and select to add a new Database and I get the error above. I think I only need to allow local connections to the engine but I have tried allowing remote conections with all varations of named pipes and TCP/IP. I am running on Windows XP SP2 (home).Hi,

could you please post the whole error message ?

You might take a look at this site in the meantime: http://blogs.msdn.com/sql_protocols/Default.aspx?p=2

HTH; Jens K. Suessmeyer.

http://www.sqlserver2005.de

Monday, February 13, 2012

462 error

We have an application that connects to a MS SQL database.
Occasionally we get this message.
"Error: 462: The remote server machine does not exist or is
unavailable"
Any thoughts as to what would be causing this?You did not provide any info about your SQL Server' s Edition and version.
Ensure your SQL Server services are running. You can check them using SQL
Server Configuration Manager.
In SQL Server 2005 Express or Developer Edition, Remote Connections will be
disabled by default. Go to Surface Area Configuration tool to enable it.
If you have not, configure TCP\IP or NP protocol from SQL Server
Configuration Manager.
Also, can you post your connection string?
--
Ekrem Önsoy
"MikeS" <mike.sheats@.gmail.com> wrote in message
news:1193231306.041192.37630@.i13g2000prf.googlegroups.com...
> We have an application that connects to a MS SQL database.
> Occasionally we get this message.
> "Error: 462: The remote server machine does not exist or is
> unavailable"
> Any thoughts as to what would be causing this?
>|||I have seen this error, but its been a while. As I recall, the problem was
in DNS.
In SQL Server (2008, 2005, 2000, 7, 6.5, etc, etc, etc ... and Windows XP,
2000, 2003, etc, etc, etc ...) you access a remote server by hostname. What
this means is that you're dependent on the network DNS service (or possibly
your local hosts file) to provide you with the IP address you actually need
to connect.
While I dislike making connections via IP address, if you change your app to
use the IP and the problem goes away, it will confirm that the problem is
DNS.
Good luck,
Jay
PS. It is generally better to specify DB Server & OS versions. It's at your
fingertips and you never know when it will be relevant. Of course, I forget
sometimes too :)
"MikeS" <mike.sheats@.gmail.com> wrote in message
news:1193231306.041192.37630@.i13g2000prf.googlegroups.com...
> We have an application that connects to a MS SQL database.
> Occasionally we get this message.
> "Error: 462: The remote server machine does not exist or is
> unavailable"
> Any thoughts as to what would be causing this?
>

401 Unauthorized When Access Application Remotely

Hello,
I have developed a web application which has a ReportViewer control
embedded in the page and connects to a remote Reporting Services
server. Everything works fine locally in my development environment.
However, when I deploy to the test server, the ReportViewer control
throws a Report Error: 401: Unauthorized exception. I am using
Windows Authentication and Impersonation (the application is on the
local intranet). If I log onto the web server locally and try to
access the web site through localhost, everything works fine. I have
found several articles on implementing the IReportServerCredentials
interface to set the permissions via code, but have not seen anything
on using Windows authentication and impersonation.
Any suggestions would be appreciated...
Thanks!
David.You are most likely experiencing what is called the "double hop" issue.
This happens all the time, thanks to the security set up by default on
your servers. When you log in to your server through the web it will
trust you, but strip your credentials from you. You will be an
anonymous user. Then when you try to request the data in a report from
another data source, it will pass your anonymous credentials to the
other server, and therefore you being denied access is a good thing.
The reason it works when you log in directly to the sever is because it
retains your credentials then. The solution to this is delegation,
which can be set up by the domain controller. This should be enough to
get you started I hope!
Lance M.
Cyke wrote:
> Hello,
> I have developed a web application which has a ReportViewer control
> embedded in the page and connects to a remote Reporting Services
> server. Everything works fine locally in my development environment.
> However, when I deploy to the test server, the ReportViewer control
> throws a Report Error: 401: Unauthorized exception. I am using
> Windows Authentication and Impersonation (the application is on the
> local intranet). If I log onto the web server locally and try to
> access the web site through localhost, everything works fine. I have
> found several articles on implementing the IReportServerCredentials
> interface to set the permissions via code, but have not seen anything
> on using Windows authentication and impersonation.
> Any suggestions would be appreciated...
> Thanks!
> David.