I am using VB.Net, and MSSQL 7.0 (not 100% sure about the sql server)
Ok, so I fixed this once before by add "<identity impersonate="true"/>" to my web.config file.
Now, I am able do everything from my computer (which happens to be the web server were VB.Net is). But I get the "Login failed for user '(null)'" error from any other computer?!?
How would it be possible that everything works from one computer, and not another. I wouldn't be so confused if it was just other users who don't have access, but it's also me.
Here is the connection string I am using (don't know how much help it will be):
Dim cmdSelect As New SqlClient.SqlCommand(strSQL, New SqlClient.SqlConnection("server=dev-cite;database=LOGSPR;Trusted_Connection=True"))
cmdSelect.CommandType = CommandType.StoredProcedure
There is supposed to be a single group set up that has access to the stored procedures, which run on the tables, but even before I gave the group access to the stored procedures, I was able to run everything just fine (from the 1 computer). I'm guessing that's because I'm the owner of the db. Any help would be greatly appreciated. Thanks!
Is that the same as "Mixed Mode". If so, that's not what I want. I want to stay will Trusted Connection. And I don't want to use a specific name/pass, that's why I added the impersonation to the web.config file. That line should impersonation the current users information for the SQL server. Maybe I'm a little confused here (I'm really not that good with SQL), but I know that I don't what to use a specific name/pass, because there is a group that has access, not just one person.
I wish I knew more, but I guess I just don't ask enough question. I'm still somewhat new, and I am only in charge of a small website that we run.
I'm guessing we must have AD, because we have 2 main domains that everybody uses (a few thousand people). And I can go to any computer and use my username/pass/domain to log on.
The computer where everything is working is my computer. This computer is also the development web server computer. It has IIS and VS.Net, and this is wear I am doing all of my work. So, all files are being saved to this computer, and when I use IE to access the pages, I am really just going through the domain controller, and then back to my computer. SQL is not on this computer. We have a separate SQL server.
The other computer that I am using to test is in my office, has IIS, but is not the web server. That is the only difference that I can see, and therefore I would think that it has something to do with .Net, and not SQL, but the error I am getting is definitely an SQL error. This computer is connected to the network, and I log onto it the same way I log onto my main computer.
My DBA is asking me some more questions, so maybe he's got an idea of what's going on. If I do solve the problem, I will be sure to post the results.
Still no luck. My DBA thought that it might be my IIS settings (checking to make sure that I was using "basic authentication"). But That wasn't the problem.
It obviously has something to do with how the SQL server is being accessed (at least that's what I'm assuming). If my computer running IIS can get to it, but no other computer can, do you think it's an SQL problem or an IIS problem? It's starting to sound more and more like an IIS problem.
Ok, ignor my last post. It was an IIS Authentication problem. I thought to use basic authentication, I just needed to uncheck the "Anonymous access", and make sure the "Basic authentication" box was checked. Turns out, I also had to uncheck the "Integrated Windows authentication" option. Thanks for the help, and hopefully this post will help others.