我一直在使用Thinktecture IdentityServer3 Asp.Net Identity WebHost示例项目 .

https://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/AspNetIdentity

启动类的一部分将粘贴在下面 . 该项目在撤回最近的nuget repos之后编译得很好,但是,我将它部署在IIS的虚拟目录中并意识到,我无法联系任何Owin模块 . 我正在学习Owin,但还不够快 . 我意识到这可能是基本的,与请求与app.map匹配相关,我尝试了基础知识:

https://msdn.microsoft.com/en-us/library/dn448010(v=vs.113).aspx

How are OwinContext.Request.Path and PathBase populated?

但我无法从虚拟目录访问OWIN模块 . 当我创建一个新网站并将项目部署到根目录时,该项目没有问题(在对sqlconnection字符串进行一些更改之后),我可以访问所有页面 .

My question is how to use app.map to match with the request when the application is deployed in IIS virtual directory Application Works Great at Root - http://localhost:8080 Requests do not seem to hit/match the OWIN paths in virtual directory - http://localhost/idsrvrtest .

namespace WebHost
 {
     public class Startup
     {
      public void Configuration(IAppBuilder app)
    {

        LogProvider.SetCurrentLogProvider(new DiagnosticsTraceLogProvider());
        Log.Logger = new LoggerConfiguration()
           .MinimumLevel.Debug()
           .WriteTo.Trace()
           .CreateLogger();
        Debug.WriteLine("Owin is working");
        app.Map( "/admin", adminApp =>
        {
            var factory = new IdentityManagerServiceFactory();
            factory.ConfigureSimpleIdentityManagerService("AspId");
            //factory.ConfigureCustomIdentityManagerServiceWithIntKeys("AspId_CustomPK");

            adminApp.UseIdentityManager(new IdentityManagerOptions()
            {
                Factory = factory
            });
        });