C# IdentityServer 3将不会启动
我在启动IdentityServer 3时遇到问题。这是一个非常简单的设置,我打算用于开发环境,我在诊断问题时遇到了问题。这是我的密码: Startup.cs Users.cs Clients.cs 该证书来自。它已通过mmc证书管理单元导入,我在Visual Studio 2015中将“复制到输出目录”设置为“始终复制”。我还在VS项目上启用了SSL,并在web config/system.webServer/modules部分中设置了runAllManagedModulesForAllRequests=true 当我试图通过“开始调试”启动它时,我得到: {无法加载类型 来自的“IdentityServer3.Core.Configuration.IdentityServerOptions” 程序集'IdentityServer3,版本=1.0.0.0,区域性=中性, PublicKeyToken=null'.:IdentityServer3.Core.Configuration.IdentityServerOptions}C# IdentityServer 3将不会启动,c#,identityserver3,C#,Identityserver3,我在启动IdentityServer 3时遇到问题。这是一个非常简单的设置,我打算用于开发环境,我在诊断问题时遇到了问题。这是我的密码: Startup.cs Users.cs Clients.cs 该证书来自。它已通过mmc证书管理单元导入,我在Visual Studio 2015中将“复制到输出目录”设置为“始终复制”。我还在VS项目上启用了SSL,并在web config/system.webServer/modules部分中设置了runAllManagedModulesForAllReq
其他人有过这个问题,或者有人对如何诊断它有什么见解吗?我也有过同样的问题,似乎是使用的项目/名称空间的名称
命名我的项目IdentityServer3时,我遇到了同样的问题。我用不同的名称创建了一个项目,这解决了问题。我也遇到了同样的问题,它似乎是所使用的项目/命名空间的名称
命名我的项目IdentityServer3时,我遇到了同样的问题。我用不同的名称创建了一个项目,这解决了问题。请尝试在.Map之外添加选项,例如app.UseIdentityServeroptions;?我刚刚尝试在映射之外设置选项,但我遇到了相同的错误,我很抱歉,请尝试在.map之外添加选项,例如app.UseIdentityServeroptions;?我刚尝试在地图之外设置选项,但恐怕我也遇到了同样的错误
using Owin;
using System;
using System.Security.Cryptography.X509Certificates;
using IdentityServer3.Core.Models;
using IdentityServer3.Core.Configuration;
namespace IdentityServer3
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
app.Map("/identity", idsrvApp =>
{
idsrvApp.UseIdentityServer(new IdentityServerOptions
{
SiteName = "Embedded IdentityServer",
SigningCertificate = LoadCertificate(),
Factory = new IdentityServerServiceFactory()
.UseInMemoryUsers(Users.Get())
.UseInMemoryClients(Clients.Get())
.UseInMemoryScopes(StandardScopes.All)
});
});
}
X509Certificate2 LoadCertificate()
{
return new X509Certificate2(
string.Format(@"{0}bin\idsrv3test.pfx", AppDomain.CurrentDomain.BaseDirectory), "idsrv3test");
}
}
}
using IdentityServer3.Core;
using IdentityServer3.Core.Services.InMemory;
using System.Collections.Generic;
using System.Security.Claims;
namespace IdentityServer3
{
public static class Users
{
public static List<InMemoryUser> Get()
{
return new List<InMemoryUser>
{
new InMemoryUser
{
Username = "bob",
Password = "secret",
Subject = "1",
Claims = new[]
{
new Claim(Constants.ClaimTypes.GivenName, "Bob"),
new Claim(Constants.ClaimTypes.FamilyName, "Smith")
}
}
};
}
}
}
using IdentityServer3.Core.Models;
using System.Collections.Generic;
namespace IdentityServer3
{
public static class Clients
{
public static IEnumerable<Client> Get()
{
return new[]
{
new Client
{
Enabled = true,
ClientName = "MVC Client",
ClientId = "mvc",
Flow = Flows.Implicit,
RedirectUris = new List<string>
{
"https://localhost:44319/"
},
AllowAccessToAllScopes = true
}
};
}
}
}