起動しません。ここに私のコードは次のとおりです。IdentityServer 3は、私はそれは私が開発環境のために使用する非常に簡単なセットアップですIdentityServer 3を発射問題を抱えていると私は、問題の診断の問題を抱えている
Startup.cs
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");
}
}
}
Users.cs
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")
}
}
};
}
}
}
Clients.cs
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
}
};
}
}
}
CEは、証明書はIdentityServer's github examplesです。これは、MMCの証明書スナップインを経由して輸入し、私はまた、SSL VSプロジェクトで有効になっており、runAllManagedModulesForAllRequestsは=「true」をWeb構成/システムに設定されているVisual Studioの2015年に「常にコピー」に「出力ディレクトリにコピー」を設定されています.webServer/modulesセクション。
私はそれを起動しようと、私は取得「デバッグを開始」を介して:
{ "「タイプに アセンブリから 『IdentityServer3.Core.Configuration.IdentityServerOptions』をロードできませんでしたIdentityServer3、バージョン= 1.0 .0.0、文化=中立、 なPublicKeyToken = nullを」。 ":" IdentityServer3.Core.Configuration.IdentityServerOptions "}
は、他の誰がこれを持っていたか、誰もがそれを診断する方法上の任意の洞察力を持っていますか?
あなたはその' .Map'、 'app.UseIdentityServer(オプション)のようなものの外のオプションを追加してみていただけますか? – eminlala
は、私はちょうどマップの外のオプションを設定しようとしたが、私は怖い同じエラーを取得しています –