asp.net-core – 无法加载DLL’api-ms-win-core-registry-l1-1-0
发布时间:2020-12-16 09:42:48 所属栏目:asp.Net 来源:网络整理
导读:我桌面上的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
我桌面上的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:inetpubwwwrootwebsite.comhttpdocs Now listening on: http://localhost:16695 Application started. Press Ctrl+C to shut down. 解决方法
我有同样的问题和问题.我的错误原因是我在Windows 10上开发并部署到Window 2008 R2.
修复是将project.json运行时编辑为win7-x64. 原版的: "runtimes": { "win10-x64": {} }, 固定: "runtimes": { "win7-x64": {} }, 我确实尝试过两个运行时,但我的发布会失败. 确保“目标运行时”发布设置设置为win7-x64: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net-mvc – 使用viewmodel时的asp.net mvc验证
- asp.net-mvc-4 – mvc4中的成功警报弹出窗口,不使用jquery和
- Uploadify for ASP.NET app返回大型文件的HTTP错误
- .net – 如何搜索以我的plaftform为目标的Nuget包?
- asp.net-core – 无法加载DLL’api-ms-win-core-registry-l
- asp.net-identity – 将SimpleMembership迁移到Identity 2.
- ASP.NET:动态地为图像添加“水印”
- asp.net-mvc – 没有无参数构造函数,结构图,新区域
- 定期刷新局部视图(ASP.Net MVC)
- asp.net – 在部署到SharePoint时,ObjectDataSource无法找到
推荐文章
站长推荐
- IIS 7中的应用程序池不显示.NET Framework 3.5
- 将我的思维模式从ASP.NET迁移到ASP.NET MVC(2)时
- asp.net – 当passwordFormat = Encrypted和decr
- asp.net-mvc-4 – MVC 4.0 WebApi应用程序和混合
- kendo-ui – Kendo UI Editor – 从编辑器菜单中
- 异常 – ASP.NET应用程序池关闭问题
- .net core 基于 IHostedService 实现定时任务
- 强烈推荐的一个工具ReSharper
- ASP.NET概要分析
- asp.net-mvc-2 – 如何通过ASP.NET MVC 2.0中的t
热点阅读