Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Location
    Maryland
    Posts
    21

    Unanswered: Login failed for user '(null)'

    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
    cmdSelect.Parameters.Add("@order_by", qsSort)
    cmdSelect.Parameters.Add("@selected", selectvalue)

    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!

  2. #2
    Join Date
    Oct 2003
    Location
    London
    Posts
    2
    did you start the session state on the server? give it a go!

  3. #3
    Join Date
    Oct 2003
    Location
    Maryland
    Posts
    21
    Well, I'm no .Net expert, but I'm pretty sure the session state has been started. This is the first time I am connecting to an SQL database, so would I have to make any changes for this to work?

    Also, at first I thought this might be an SQL problem, but it's starting to sound more and more like an IIS problem. If everything works fine when accessing the SQL server from the pc running IIS, but no other machines, then wouldn't it make sence that there is something wrong with IIS?

    My DBA told me to check to make sure I was using basic authentication, and I am, so I'm not sure what's next. Please, let me know if anybody has run across this before. Thanks!

  4. #4
    Join Date
    Oct 2003
    Location
    Maryland
    Posts
    21
    Ok, ignor my last post. It was an 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •