如何在WCF服务中添加OWIN启动 [英] How to add OWIN Startup in WCF service

查看:110
本文介绍了如何在WCF服务中添加OWIN启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在WCF服务中添加了一个owin启动类

Hi i've added a owin startup class in my WCF service this

using System;
using System.Threading.Tasks;
using Microsoft.Owin;
using Owin;

[assembly: OwinStartup(typeof(SampleService.StartupClass))]

namespace SampleService
{
    public class StartupClass
    {
        public void Configuration(IAppBuilder app)
        {
            // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
        }
    }
}

但是似乎Configuration方法没有触发,我已经在普通的Web应用程序中尝试过此方法.但是在WCF中我没有错过任何东西吗?这就是为什么不解雇我的WCF应用程序的原因,请给您有关此想法的建议?

but it seems that the Configuration method is not firing i've tried this in a normal web application its working. but in WCF its not did i miss something? that's why its not firing my my WCF application kindly give your advice regarding this any ideas?

推荐答案

WCF尚不支持OWIN.看看 http://msdn.microsoft.com/en-us/library /ee939340.aspx 如果要自托管WCF而不使用IIS.

WCF doesn't support OWIN yet. Take a look at http://msdn.microsoft.com/en-us/library/ee939340.aspx if you want to self host WCF and not use IIS.

查看 http://owin.org/#projects 中有关OWIN的支持项目.

Check out http://owin.org/#projects for the support projects of OWIN.

这篇关于如何在WCF服务中添加OWIN启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆