Server Error in '/' Application.

The network path was not found

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ComponentModel.Win32Exception: The network path was not found

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[Win32Exception (0x80004005): The network path was not found]

[SqlException (0x80131904): 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)]
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1338
   System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +159
   System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) +382
   System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +307
   System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) +198
   System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +422
   System.Data.SqlClient.SqlConnection.Open() +199
   System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch(TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) +104
   System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext) +503
   System.Data.Entity.SqlServer.<>c__DisplayClass1.<Execute>b__0() +18
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +234
   System.Data.Entity.Core.EntityClient.EntityConnection.Open() +318

[EntityException: The underlying provider failed on Open.]
   System.Data.Entity.Core.EntityClient.EntityConnection.Open() +738
   System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions) +167
   System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction(Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) +63
   System.Data.Entity.Core.Objects.<>c__DisplayClass7.<GetResults>b__5() +145
   System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Func`1 operation) +234
   System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption) +270
   System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0() +30
   System.Data.Entity.Internal.LazyEnumerator`1.MoveNext() +39
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +152
   Hinet.Service.WebsiteViPhamService.WebsiteViPhamService..ctor(IUnitOfWork unitOfWork, IWebsiteViPhamRepository WebsiteViPhamRepository, ILog loger, IMapper mapper, IAppUserRepository appUserRepository, IDM_NhomDanhmucRepository DM_NhomDanhmucRepository, IDM_DulieuDanhmucRepository DM_DulieuDanhmucRepository, IWebsiteInfoRepository websiteInfoRepository, ITINHRepository tINHRepository, IPersonalInfoRepository personalInfoRepository, ICompanyInfoRepository companyInfoRepository) in D:\HiNET\All Source\2022\16. OnlineGov\1. Source onlinegov\SourceMultiSub\Hinet.Service\WebsiteViPhamService\WebsiteViPhamService.cs:69
   lambda_method(Closure , Object[] ) +513
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +270

[DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Hinet.Repository.IUnitOfWork, Hinet.Repository.WebsiteViPhamRepository.IWebsiteViPhamRepository, log4net.ILog, AutoMapper.IMapper, Hinet.Repository.AppUserRepository.IAppUserRepository, Hinet.Repository.DanhmucRepository.IDM_NhomDanhmucRepository, Hinet.Repository.DanhmucRepository.IDM_DulieuDanhmucRepository, Hinet.Repository.WebsiteInfoRepository.IWebsiteInfoRepository, Hinet.Repository.TINHRepository.ITINHRepository, Hinet.Repository.PersonalInfoRepository.IPersonalInfoRepository, Hinet.Repository.CompanyInfoRepository.ICompanyInfoRepository)' on type 'WebsiteViPhamService'. ---> The underlying provider failed on Open. (See inner exception for details.)]
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +814
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +269
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +110

[DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = WebsiteViPhamService (ReflectionActivator), Services = [Hinet.Service.IEntityService`1[[Hinet.Model.Entities.WebsiteViPham, Hinet.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Hinet.Service.IService, Hinet.Service.WebsiteViPhamService.IWebsiteViPhamService], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An exception was thrown while invoking the constructor 'Void .ctor(Hinet.Repository.IUnitOfWork, Hinet.Repository.WebsiteViPhamRepository.IWebsiteViPhamRepository, log4net.ILog, AutoMapper.IMapper, Hinet.Repository.AppUserRepository.IAppUserRepository, Hinet.Repository.DanhmucRepository.IDM_NhomDanhmucRepository, Hinet.Repository.DanhmucRepository.IDM_DulieuDanhmucRepository, Hinet.Repository.WebsiteInfoRepository.IWebsiteInfoRepository, Hinet.Repository.TINHRepository.ITINHRepository, Hinet.Repository.PersonalInfoRepository.IPersonalInfoRepository, Hinet.Repository.CompanyInfoRepository.ICompanyInfoRepository)' on type 'WebsiteViPhamService'. ---> The underlying provider failed on Open. (See inner exception for details.) (See inner exception for details.)]
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +433
   Autofac.Core.Lifetime.LifetimeScope.GetOrCreateAndShare(Guid id, Func`1 creator) +155
   Autofac.Core.Resolving.InstanceLookup.Execute() +166
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +171
   Autofac.Core.Activators.Reflection.ConstructorParameterBinding.Instantiate() +119
   Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters) +269
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +110

[DependencyResolutionException: An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = HomeController (ReflectionActivator), Services = [Hinet.Web.Controllers.HomeController], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = None, Ownership = OwnedByLifetimeScope ---> An error occurred during the activation of a particular registration. See the inner exception for details. Registration: Activator = WebsiteViPhamService (ReflectionActivator), Services = [Hinet.Service.IEntityService`1[[Hinet.Model.Entities.WebsiteViPham, Hinet.Model, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], Hinet.Service.IService, Hinet.Service.WebsiteViPhamService.IWebsiteViPhamService], Lifetime = Autofac.Core.Lifetime.CurrentScopeLifetime, Sharing = Shared, Ownership = OwnedByLifetimeScope ---> An exception was thrown while invoking the constructor 'Void .ctor(Hinet.Repository.IUnitOfWork, Hinet.Repository.WebsiteViPhamRepository.IWebsiteViPhamRepository, log4net.ILog, AutoMapper.IMapper, Hinet.Repository.AppUserRepository.IAppUserRepository, Hinet.Repository.DanhmucRepository.IDM_NhomDanhmucRepository, Hinet.Repository.DanhmucRepository.IDM_DulieuDanhmucRepository, Hinet.Repository.WebsiteInfoRepository.IWebsiteInfoRepository, Hinet.Repository.TINHRepository.ITINHRepository, Hinet.Repository.PersonalInfoRepository.IPersonalInfoRepository, Hinet.Repository.CompanyInfoRepository.ICompanyInfoRepository)' on type 'WebsiteViPhamService'. ---> The underlying provider failed on Open. (See inner exception for details.) (See inner exception for details.) (See inner exception for details.)]
   Autofac.Core.Resolving.InstanceLookup.Activate(IEnumerable`1 parameters) +433
   Autofac.Core.Resolving.InstanceLookup.Execute() +180
   Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, IComponentRegistration registration, IEnumerable`1 parameters) +171
   Autofac.Core.Resolving.ResolveOperation.Execute(IComponentRegistration registration, IEnumerable`1 parameters) +108
   Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance) +122
   Autofac.ResolutionExtensions.ResolveOptionalService(IComponentContext context, Service service, IEnumerable`1 parameters) +70
   Autofac.Integration.Mvc.AutofacDependencyResolver.GetService(Type serviceType) +95
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +61

[InvalidOperationException: An error occurred when trying to create a controller of type 'Hinet.Web.Controllers.HomeController'. Make sure that the controller has a parameterless public constructor.]
   System.Web.Mvc.DefaultControllerActivator.Create(RequestContext requestContext, Type controllerType) +242
   System.Web.Mvc.DefaultControllerFactory.CreateController(RequestContext requestContext, String controllerName) +103
   System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) +263
   System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +77
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1122
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +213
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +131


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4076.0