發(fā)生異常:A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.OpenAsync(CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at TzCloud.Common.Data.DbConnections.SqlServerDbService.OpenDbConnectionByConnNameAsync(String connectionName) in D:\work\天助網(wǎng)平臺\TzCloudV2\Common\TzCloud.Common.Data\DbConnections\SqlServerDbService.cs:line 41 at TzCloud.Common.Data.BaseRepository.GetDbConnection(String dbName, String connectionStringOrConfigName, Boolean isReadConfig) in D:\work\天助網(wǎng)平臺\TzCloudV2\Common\TzCloud.Common.Data\BaseRepository.cs:line 57 at TzCloud.Common.Data.BaseRepository.QueryAsync[T](String sql, Object parameter, String connectionStringOrConfigName, Boolean isReadConfig, String dbName) in D:\work\天助網(wǎng)平臺\TzCloudV2\Common\TzCloud.Common.Data\BaseRepository.cs:line 78 at TzCloud.TzCompanyService.API.Repositories.CompanyRepository.GetCompanyByIdAsync(Int32 companyId) in D:\work\天助網(wǎng)平臺\TzCloudV2\Tianzhu\TzCloud.TzCompanyService.API\Repositories\CompanyRepository.cs:line 81 at TzCloud.TzCompanyService.API.Controllers.InformationController.GetById(Int32 companyid) in D:\work\天助網(wǎng)平臺\TzCloudV2\Tianzhu\TzCloud.TzCompanyService.API\Controllers\InformationController.cs:line 202 at lambda_method(Closure , Object ) at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult() at Microsoft.AspNetCore.Mvc.Internal.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at System.Threading.Tasks.ValueTask`1.get_Result() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeActionMethodAsync() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeNextActionFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.InvokeInnerFilterAsync() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync() at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync() at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext) at Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.Invoke(HttpContext httpContext) at TzCloud.Exntesions.APIAuthorization.APIAuthorizationMiddleware.Invoke(HttpContext httpContext) in D:\work\天助網(wǎng)平臺\TzCloudV2\MvcExtensions\TzCloud.Extensions.ApiAuthorization\APIAuthorizationMiddleware.cs:line 56 at TzCloud.Extensions.Exceptions.APIExceptionMiddleware.Invoke(HttpContext httpContext) in D:\work\天助網(wǎng)平臺\TzCloudV2\MvcExtensions\TzCloud.Extensions.ApiException\APIExceptionMiddleware.cs:line 30 您可以點擊: 返回首頁 | 供應(yīng)信息|聯(lián)系在線客服 |