Ich habe eine Konsolenanwendung, die einen Verweis auf das Projekt hat, das Paket microsoft.data.sqlclient .[code]private IEnumerable GetData(string query) { string? connectionString = _configuration.GetConnectionString("DefaultConnection"); Console.WriteLine(connectionString);
if (string.IsNullOrWhiteSpace(connectionString)) { throw new Exception("Cannot read DefaultConnection connection string"); }
while (reader.Read()) { result.Add((T)reader["Value"]); }
reader.Close(); }
return result; } < /code> Alles funktioniert perfekt, wenn ich das Projekt im Debug -Modus ausführe. Microsoft.data.sqlclient.sninativemethodwrapper.sniaddProvider (Snihandle, Providerenum, Authproviderinfo &)
at microsoft.data.sqlclient.tdssparserStateObjectnative. Microsoft.data.sqlclient.tdsparser.enablessl (uint32, sqlConnectionCryption, boolean, String)
bei Microsoft.Data.SQLCLIENT.TDSPARSER.CONSUMEPRELANGELAUS. Boolean, String)
unter microsoft.data.sqlclient.tdsparser.connect (serverInfo, sqlinternalConnectionTds, TimeoutTimer, SQLConnectionString, Boolean)
at Microsoft.data.sqlclient.sqlinternalConnectiontds.attemptonelogin (ServerInfo, String, Securestring, TimeoutTimer, boolean)
bei microsoft.data.sqlclient.sqLinternalConnectionTds.loginnnovernoverfo. SqlConnectionString, SqlCredential, TimeoutTimer) at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer, SqlConnectionString, SqlCredential, String, SecureString, Boolean)
at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity, SqlConnectionString, SqlCredential, Object, String, SecureString, Boolean, SqlConnectionString , SessionData , Boolean , String , DbConnectionPool , Func3 ) at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions, DbConnectionPoolKey, Object, DbConnectionPool, DbConnection, DbConnectionOptions) at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool, DbConnection, DbConnectionOptions, DbConnectionPoolKey, DbConnectionOptions) at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection, DbConnectionOptions, DbConnectionInternal) at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection, DbConnectionOptions, DbConnectionInternal ) at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection, UInt32, Boolean, Boolean, DbConnectionOptions, DbConnectionInternal& ) at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection, TaskCompletionSource< /code> 1, dbConnectionOptions, dbConnectionInternal &)
at MicroSoft.Data.Providerbase.dbConnectionFactory1, DbConnectionOptions, DbConnectionInternal, DbConnectionInternal& ) at Microsoft.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection, DbConnectionFactory, TaskCompletionSource< /code> 1, dbConnectionOptions)
at MicroSoft.Data.sqlclient.sqlConnection.tryopen(TaskCompletionsOurce`1,ell /> SQLConnectionOverrids) unter />microsoft.data.sqlclient.sqlconnection.open(sqlConnectionOverrids)
unter opcw.vis.xmlgenerator.services.datahelperService.getDatat in c: \ projects \ vis MoDernisation\Utility\opcw.vis.xmlgenerator\services\DatahelPerService.cs:line 68 AT opcw.vis.xmlgenerator.services />MoDernisation\Utility\opcw.vis.xmlgenerator\services\DatahelPerService.cs:line 52 AT Program. /> In dieser Codezeile: < /p> connection.Open(); [/code] Ich habe versucht, nach diesem Beitrag zu suchen. /> Ich habe das getan, aber das hat auch nicht geholfen.>
Dies ist bei einem 400-MB-Archiv innerhalb von Sekunden abgeschlossen.
private static async Task ExtractFilesAsync(this ZipArchive archive, string destination, IProgress progress = null)
{
await...
Ich möchte Open-Webui als Python-App ausführen, wie sie mit Python xxx.py zu beginnen, aber ich sehe nicht wie. Es scheint alles in Python zu sein, aber es gibt einen mysteriösen (für mich)...
Ich sehe oft Ratschläge, die empfehlen, dass SQLConnection und SQLTransaction entsorgt werden sollten, sobald Sie sie verwenden, und dass Sie sich nicht auf den Müllkollektor verlassen sollten. Wir...
Ich habe ArrayList, die 4 Elemente enthält. Jedes Element ist von Typliste . Ich versuche, das erste Element von ArrayList mit dem folgenden Code zu erhalten. Es führt jedoch Fehler