473,379 Members | 1,260 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

C#/SQL Server: Connectivity issues with a SQL/C# made fake login name

Hi all,
I keep getting a bizarre login error, when trying to connect to a SQL Server 2005 database on a local domain to my machine using C#. The Exception returns:
SQLException: Login failed for user 'OURDOMAIN\PC-DAVIDC$'.
Where "OURDOMAIN" is the domain my computer is connected to, and "PC-DAVIDC" is the computer name.

What's weird about this though, is this isn't in the connection string. Nor is it a valid NT account on the Active Directory my computer is connected to, or on the local machine itself. I have absolutely no idea where C#/SQL Server is getting this fake login from.

Does anyone know what might cause this kind of issue? It baffles me as to why it's saying "OURDOMAIN\PC-DAVIDC$", and not "OURDOMAIN\David Costello" which is the actual NT account it would usually log in with.
I don't even know what to google for, to look up this issue. :S

The connection string in question is, and has always been:
Data Source=SRV-DB01;Initial Catalog=Development;Integrated Security=SSPI;

The c# connectivity code isn't really an issue, as it connects fine to other databases on the same server. My account has permission to access the database in question. Nothing has really changed in the past few days since it was working fine. It's just utterly bizarre.

Any advice would be much appreciated.
Apr 25 '07 #1
2 2352
Motoma
3,237 Expert 2GB
Am I understanding you right? The code will connect to other databases on the same server, but just not that particular one?
Apr 25 '07 #2
Am I understanding you right? The code will connect to other databases on the same server, but just not that particular one?
Indeed.
I wanted to try and edit the post to refresh what I'd written, but I can't seem to edit it any more. :S

I didn't mention I was running the code in question as a Windows Service, and it would appear the problem laid in the fact that the service was running under the local system user account, instead of under a domain administrator account.

The problem seems to be fixed now. :)
Apr 26 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Frodo | last post by:
I have a problem establishing a link between Visual Studio.NET 2003 and SQL Server 2000. Both are installed on a Windows Server 2003, standard version. Visual Studio.NET Issues...
0
by: Gareth | last post by:
Can somebody help me with the following problem I have? Configuration: 1 x Microsoft Windows Server 2003 Web Edition + IIS 6.0 + ASP.NET 1 x Microsoft Windows Server 2003 Standard Edition +...
5
by: RedEye | last post by:
Hello, I am working on a test site to explore the new login controls and membership features of ASP.NET v2.0. I have tested the controls using SQL Express and have now decided to try using a...
22
by: Mr Newbie | last post by:
I was thinking about developing a workflow application yesterday and was musing over the different approaches than one could take in restricting specific actions on a ticket( Form ) at any said...
4
by: coosa | last post by:
Hi, I was installing SQL Server on my machine and during installation my PC freezed. It happens frequently on my machine. So i tried after restarting to install it again and since then i always...
4
by: VB Programmer | last post by:
When I run my ASP.NET 2.0 web app on my dev machine it works perfect. When I precomile it to my web deployment project and then copy the debug files to my web server I get this problem when trying...
9
by: craig.overton | last post by:
All, I am currently developing an FTP class in VB.NET. It's kid tested, mother approved when trying to access an FTP Server on a Windows box meaning I can connect, run commands, upload and...
3
by: matt.delvecchio | last post by:
i saw a similar post from last year, but i didnt see any clear solution. the error message: "A connection was successfully established with the server, but then an error occurred during the...
0
by: Gr8Ongole | last post by:
Hi, I have a SQL Server 2005 running on my machine with a named intance. Recently I have got a DSL connection. After that the Microsoft SQL Server Management Studio started giving connectivity...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.