SQL DB only accessable by single User even though Multi User is active

0

I use a SQL Database in a C# Project and i wanted to make it accessable by multiple Users. I already checked out and it is definitly in Multi User mode but still i get an error that shows me that i can´t connect with several Users on the same Database. Does anyone know what I can do to fix it? Could be something wrong with the code?

Database access with Linq:

var queryline = from anmeldung in context.Accounts
                            where anmeldung.Benutzername == BN
                            where anmeldung.Passwort == PW
                            select anmeldung.Id;

App.config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
    </configSections>
    <connectionStrings>
        <add name="DBtest.Properties.Settings.TestConnectionString" connectionString="Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Test.mdf;Integrated Security=True;Connect Timeout=10"
            providerName="System.Data.SqlClient" />
    </connectionStrings>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
</configuration>

error message:

System.Data.SqlClient.SqlException HResult=0x80131904 Nachricht = Network-related or instance-specific error when connecting to SQL Server. The server was not found or can not be accessed. Verify that the instance name is correct and that SQL Server allows remote connections.. (provider: Named Pipes Provider, error: 40 - Verbindung mit SQL Server konnte nicht geöffnet werden) Quelle = .Net SqlClient Data Provider Stapelüberwachung: bei System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling) bei System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) bei System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) bei System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) bei System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) bei System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) bei System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) bei System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) bei System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) bei System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) bei System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) bei System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry) bei System.Data.SqlClient.SqlConnection.Open() bei System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user) bei System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe()
bei System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode()
bei System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) bei System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() bei DBtest.Program.Register(Int32& ID) in \192.168.2.1\Share\DBtest\DBtest\Program.cs: Zeile61 bei DBtest.Program.Main(String[] args) in \192.168.2.1\Share\DBtest\DBtest\Program.cs: Zeile102

Innere Ausnahme 1: Win32Exception: Das Zeitlimit für die Semaphore wurde erreicht

c#
sql
database
multi-user
asked on Stack Overflow Jun 8, 2018 by gondolator • edited Jul 17, 2018 by Dan Wilson

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0