我桌面上的app asp.net核心工作正常.但是当我在
Windows Server 2007 R2上部署时,我遇到了这个错误.
Application startup exception: System.DllNotFoundException: Unable to load DLL 'api-ms-win-core-registry-l1-1-0.dll': The specified module Could not be found. (Exception from HRESULT: 0x8007007E) at Interop.mincore.RegOpenKeyEx(SafeRegistryHandle hKey,String lpSubKey,Int32 ulOptions,Int32 samDesired,SafeRegistryHandle& hkResult) at Microsoft.Win32.RegistryKey.InternalOpenSubKeyCore(String name,RegistryRights rights,Boolean throwOnPermissionFailure) at Microsoft.AspNetCore.DataProtection.RegistryPolicyResolver.ResolveDefaultPolicy() at Microsoft.Extensions.DependencyInjection.DataProtectionServices.<GetDefaultServices>d__0.MoveNext() at Microsoft.Extensions.DependencyInjection.Extensions.ServiceCollectionDescriptorExtensions.TryAdd(IServiceCollection collection,IEnumerable`1 descriptors) at Microsoft.Extensions.DependencyInjection.DataProtectionServiceCollectionExtensions.AddDataProtection(IServiceCollection services) at Microsoft.Extensions.DependencyInjection.AuthenticationServiceCollectionExtensions.AddAuthentication(IServiceCollection services) at Microsoft.Extensions.DependencyInjection.IdentityServiceCollectionExtensions.AddIdentity[TUser,TRole](IServiceCollection services,Action`1 setupAction) at Safety.Startup.ConfigureServices(IServiceCollection services) --- End of stack trace from prevIoUs location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptiondispatchInfo.Throw() at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services) at Microsoft.AspNetCore.Hosting.Internal.WebHost.Ensureapplicationservices() at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication() Hosting environment: Production Content root path: C:\inetpub\wwwroot\website.com\httpdocs Now listening on: http://localhost:16695 Application started. Press Ctrl+C to shut down.
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。