Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/339.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 我在浏览localhost IdentityServer 3发现端点时发现错误404.0-未找到_C#_Owin_Identityserver3 - Fatal编程技术网

C# 我在浏览localhost IdentityServer 3发现端点时发现错误404.0-未找到

C# 我在浏览localhost IdentityServer 3发现端点时发现错误404.0-未找到,c#,owin,identityserver3,C#,Owin,Identityserver3,我一直在尝试使用VS 2019 pro,根据IdentityServer 3设置IdentityServer,并提供所有更新和targetFramework=“4.6.1”,但在尝试这样做时,例如。我得到一个HTTP 404.0资源未找到或移动错误 代码与GitHub上的代码相同,只是VS强迫我将.cs文件放入“App_code”文件夹。 证书正确地位于Bin/Config文件夹中,Startup.cs在同一目录中查找该证书。 Startup.cs位于项目的根目录中。 SSL也已启用,并且SSL

我一直在尝试使用VS 2019 pro,根据IdentityServer 3设置IdentityServer,并提供所有更新和targetFramework=“4.6.1”,但在尝试这样做时,例如。我得到一个HTTP 404.0资源未找到或移动错误

代码与GitHub上的代码相同,只是VS强迫我将.cs文件放入“App_code”文件夹。 证书正确地位于Bin/Config文件夹中,Startup.cs在同一目录中查找该证书。 Startup.cs位于项目的根目录中。 SSL也已启用,并且SSL url为 并且它在属性页中设置为帮助文件中指定的起始URL。 我还在“旧版”4.5c#web空模板上创建了该项目。 我用Nuget下载了这些软件包。 项目结构如图所示

我已尝试在Startup类中中断配置,但未命中断点

public class Startup
{
    public void Configuration(IAppBuilder app)
    {
        app.UseIdentityServer(new IdentityServerOptions
        {
            SiteName = "Embedded IdentityServer",
            SigningCertificate = LoadCertificate(),
            Factory = new IdentityServerServiceFactory()
                .UseInMemoryUsers(Users.Get())
                .UseInMemoryClients(Clients.Get())
                .UseInMemoryScopes(Scopes.Get())
        });
    }

    private static X509Certificate2 LoadCertificate()
    {
        return new X509Certificate2(
            Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"bin\Config\idsrv3test.pfx"), "idsrv3test");
    }
}
非常感谢


我解决了这个问题,我没有从一个空的ASP.Net网站开始(从以前安装的版本类型开始),而是选择Web->ASP.Net Web应用程序,然后选择MVC模板,然后根据安装文档创建类