小编Nik*_*lov的帖子

Visual Studio 2017已损坏且无法卸载或修复

我在启动Visual Studio 2017 Enterprise时遇到问题,我无法向Microsoft的Developer Commnuity报告问题,因为它需要运行Visual Studio 2017.Crap!

我正在更新VS 2017本周更新,在此期间我的PC崩溃了,我不得不重新启动它.

现在,当我开始VS 2017时,我收到以下消息:

此Visual Studio安装的设置尚未完成.请再次运行Visual Studio安装程序以更正此问题.

我运行安装程序,它没有检测到任何安装的版本.

我尝试了VS社区的一些命令,如:

%programfiles(x86)%\Microsoft Visual Studio\Installer\resources\app\layout\InstallCleanup.exe -full
Run Code Online (Sandbox Code Playgroud)

这个命令清理了一些东西,但结果是一样的.我无法删除损坏的安装.

我也无法安装任何其他VS 2017版 - 我收到以下错误:

[4068:000d][2017-04-12T20:13:20] Error 0x80004003:
   at Microsoft.VisualStudio.Setup.Cache.InstanceRepository.GetInstance()
   at Microsoft.VisualStudio.Setup.Cache.CacheRepository.<GetInstances>d__27.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at Microsoft.VisualStudio.Setup.Engine.VerifyInstallationPath(IServiceProvider services, String installationPath, IInstance instance, IQuery query)
   at Microsoft.VisualStudio.Setup.Engine.Install(Product product, String destination, CancellationToken token)Object reference not set to an instance of an object.
Run Code Online (Sandbox Code Playgroud)

我现在陷入了一个破碎的Visual Studio 2017,它没有运行,我无法发布到社区,因为这是通过Visual Studio 2017完成的.

有人可以为此建议解决方法吗?

谢谢!

回答

我设法在这篇文章中找到了解决此问题的方法:在VS 2017 RC安装期间出现错误0x80004003

visual-studio-2017

31
推荐指数
3
解决办法
4万
查看次数

无法在IIS7上加载托管ASP.NET Core 2.2的aspnetcorev2.dll

我正在努力将ASP.NET Core 2.2站点部署到Windows 7 SP1 IIS7.5.

服务器安装了dotnet-hosting-2.2.1-win.以下是程序和功能条目: 已安装的主机包

已注册的IIS模块:
在此输入图像描述

应用程序池按以下方式配置: 在此输入图像描述

应用程序池仅由一个Web应用程序使用,并在Windows帐户下运行.

我正在使用以下发布设置部署ASP.NET Core 2.2网站: 在此输入图像描述

这是部署的web.config文件:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath=".\App.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
    </system.webServer>
  </location>
</configuration>
Run Code Online (Sandbox Code Playgroud)

无论我做什么,应用程序池都将停止,并在事件查看器中显示以下错误: The Module DLL C:\Program Files\IIS\Asp.Net Core Module\V2\aspnetcorev2.dll failed to load. The data is the error.

我尝试部署:

  • 任何CPU/x86/x64
  • 赢得-64/WIN-86 /便携式
  • 自包含/框架依赖
  • hostingModel = "进程内"/ hostingModel = "OutOfProcess"
  • 启用32位应用程序="true"

还尝试了以下变通方法:https : //github.com/aspnet/AspNetCore/issues/6118 https://github.com/aspnet/AspNetCore/issues/4206

无论我做什么,我都无法运行应用程序池.有谁知道可能导致这些问题的原因是什么?

更新由于某些原因,即使.NET Framework上的其他IIS站点以前工作过,现在也无法启动相同的错误 -The Module …

iis-7.5 windows-7-x64 webdeploy asp.net-core

9
推荐指数
1
解决办法
3037
查看次数

IdentityServer4 自定义令牌请求验证器未调用

我在我的项目中使用 IdentityServer4 和 ASP.NET Identity。我的目标是添加分配动态令牌到期时间的逻辑。我正在关注有关ICustomTokenRequestValidator 的IdSrv4 文档中的此主题。

我的初始验证器非常基础。

public class TokenLifetimeValidator : ICustomTokenRequestValidator
{
    public Task ValidateAsync(CustomTokenRequestValidationContext context)
    {
        throw new NotImplementedException();
    }
}
Run Code Online (Sandbox Code Playgroud)

这是 IdSrv4 配置:

services.AddIdentityServer()
    .AddAspNetIdentity<ApplicationUser>()
    .AddInMemoryIdentityResources(new IdentityResource[] { new IdentityResources.OpenId(), new IdentityResources.Profile() })
    .AddInMemoryApiResources(new ApiResource[] { new ApiResource("api", new[] { JwtClaimTypes.Name, JwtClaimTypes.Role }) })
    .AddInMemoryClients(new Client[]
    {
        new Client
        {
            ClientId = "client",
            AllowedGrantTypes = GrantTypes.Implicit,
            AllowedScopes =
            {
                IdentityServerConstants.StandardScopes.OpenId,
                IdentityServerConstants.StandardScopes.Profile,
                "api"
            },
            AllowAccessTokensViaBrowser = true,
            RequireConsent = false,
            RedirectUris = Configuration.GetSection("RedirectUris").Get<string[]>(),
            PostLogoutRedirectUris = …
Run Code Online (Sandbox Code Playgroud)

c# identityserver4

5
推荐指数
1
解决办法
4976
查看次数