BugNET

Open source issue tracking & project management
Welcome to BugNET Register | Login |

BugNET Forums

 
  Forum  Support  Installation pr...  user is not associated with a trusted SQL Server connection
Previous Previous
 
Next Next
New Post 4/14/2008 11:50 PM
Unresolved
User is offline fbg111
4 posts
No Ranking


user is not associated with a trusted SQL Server connection 
Modified By fbg111  on 4/14/2008 10:56:26 PM)

Hello, I'm trying to install BugNET on a test computer at work, and get the error message below.  Basically, it's a repeat of 'user is not associated with a trusted SQL Server connection'.  Below is what I've done to troubleshoot so far, anyone have any idea what might be the problem?

I've tried the following to troubleshoot this:

1.  Make sure SQL Server Express 2005 Surface Area Configuration allows both local and remote connections, using both TCP/IP and Named Pipes.
2.  Tried 3 different SQL Server users - the BugNET user (BugNET), the SQL Server sa (sa), and my own Windows Network SA account.  All get the same error.
3.  Tried the following connection string variations (local server name = AWCFMG164B):

connectionString="server=AWCFMG164B\SQLEXPRESS;database=BugNET;uid=BugNET;pwd=3ugN3T"
connectionString="server=localhost\SQLEXPRESS;database=BugNET;uid=BugNET;pwd=3ugN3T"
connectionString="server=AWCFMG164B\SQLEXPRESS;database=BugNET;uid=AWCFMG164B\BugNET;pwd=3ugN3T"
connectionString="server=localhost\SQLEXPRESS;database=BugNET;uid=localhost\BugNET;pwd=3ugN3T"
connectionString="server=AWCFMG164B\SQLEXPRESS;database=BugNET;uid=sa;pwd=sapass"
connectionString="server=localhost\SQLEXPRESS;database=BugNET;uid=sa;pwd=sapass"
connectionString="server=AWCFMG164B\SQLEXPRESS;database=BugNET;uid=AWCFMG164B\sa;pwd=sapass"
connectionString="server=localhost\SQLEXPRESS;database=BugNET;uid=localhost\sa;pwd=sapass"
connectionString="server=AWCFMG164B\SQLEXPRESS;database=BugNET;uid=WinSA;pwd=pass"
connectionString="server=localhost\SQLEXPRESS;database=BugNET;uid=WinSA;pwd=pass"
connectionString="server=AWCFMG164B\SQLEXPRESS;database=BugNET;uid=NETWORKNAME\WinSA;pwd=pass"
connectionString="server=localhost\SQLEXPRESS;database=BugNET;uid=NETWORKNAME\WinSA;pwd=pass"

I got that format from the BugNET readme.htm, however the original connection string in the web.config file was of a different format:

connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True"

But I wasn't sure how to modify that, so just commented out and replaced with the readme.html version:

<connectionStrings>
<clear />
<!--<add name="LocalSqlServer" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True" providerName="" />-->
<add name="LocalSqlServer" connectionString="server=AWCFMG164B\SQLEXPRESS;database=BugNET;uid=sa;pwd=sapass" providerName="" />
</connectionStrings>


The full error message:

-----
Installing BugNET
Version: 0.7.921.0

Installation Status Report

Installing Version: 0.7.921.0
Installing Membership Provider... - 00:00:00.0156251
Error!

Error in file:C:\Inetpub\BugNET\Install\dbscripts\InstallCommon.sql
Message:Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.


Error!

Error in file:C:\Inetpub\BugNET\Install\dbscripts\InstallMembership.sql
Message:Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.


Error!

Error in file:C:\Inetpub\BugNET\Install\dbscripts\InstallProfile.sql
Message:Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.


Error!

Error in file:C:\Inetpub\BugNET\Install\dbscripts\InstallRoles.sql
Message:Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.


Installing BugNET Database... - 00:00:00.0312502
Error!

Error in file:C:\Inetpub\BugNET\Install\dbscripts\BugNET.Schema.SqlDataProvider.sql
Message:Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.


Installing BugNET Default Data... - 00:00:00.0312502
Error!

Error in file:C:\Inetpub\BugNET\Install\dbscripts\BugNET.Data.SqlDataProvider.sql
Message:Login failed for user 'sa'. The user is not associated with a trusted SQL Server connection.


Creating Administrator Account... - 00:00:00.0312502
-----

 
New Post 4/16/2008 12:42 AM
User is offline smoss
114 posts
www.orbitsolutions.co.za
5th Level Poster


Re: user is not associated with a trusted SQL Server connection 

Your connection strings are wrong. But you already knew that.

Here is why:

Integrated Security=True means that the user (currently logged in as) needs to be on the domain or a user on the machine which is running the server. And the user needs to be given rights to the database

What you are looking for is "Integrated Security=False" which means you need to provide a SQL username and password in your connection string.

For example

connectionString="server=AWCFMG164B\SQLEXPRESS;database=BugNET;uid=BugNET;pwd=3ugN3T;Integrated Security=False"

Visit www.connectionstrings.com for more info.

Stewart Moss

 
New Post 4/16/2008 3:07 PM
User is offline fbg111
4 posts
No Ranking


Re: user is not associated with a trusted SQL Server connection 

Thanks Stewart, that solved it!

For anyone else searching on this phrase, also make sure that your SQLEXPRESS instance allows both Windows Authentication and SQL Server Authentication. 

Also, I searched these forums for the error phrase and got no results.  But Googling the quoted error phrase provides several threads here discussing this problem.

 
Previous Previous
 
Next Next
  Forum  Support  Installation pr...  user is not associated with a trusted SQL Server connection

Forum Policy

These Discussion Forums are dedicated to the discussion of the BugNET issue tracker.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:
1. No Advertising.
2. No Flaming or Trolling.
3. No Profanity, Racism, or Prejudice.
4. Site Moderators have the final word on approving/removing a thread or post or comment.
5. English language posting only, please.