动态IIS托管WCF服务与TCP绑定 [英] Dynamic IIS hosted WCF Service with TCP binding

查看:208
本文介绍了动态IIS托管WCF服务与TCP绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用http绑定的动态IIS主机(http://blog.micic.ch/net/dynamic-iis-hosted-wcf-service)。如何使用tcpbinding与动态IIS托管。

I am using Dynamic IIS Hosting (http://blog.micic.ch/net/dynamic-iis-hosted-wcf-service) with http binding. How can I use tcpbinding with dynamic IIS hosting.

谢谢

推荐答案

如果您在使用非HTTP激活启动时遇到注册VirtualPathProvider的问题,您应该将类​​与任何名称放在App_Code文件夹中。这个类必须有 public static void AppInitialize()方法,您可以在其中注册VirtualPathProvider。

If you are experiencing problems with registration VirtualPathProvider on start up using non-HTTP activation, you should put class with any name to App_Code folder. This class must have public static void AppInitialize() method, where you can register VirtualPathProvider.

namespace YourHostNameSpace.App_Code
{
    public class NonHttpActivation
    {
        public static void AppInitialize()
        {
             //do start up stuff here
        }
    }
}

顺便说一句, WCF 4在顶层WCF 4路由中提供了无需文件的功能。

By the way, WCF 4 provides file-less functionality out of the box on top WCF 4 Routing.

这篇关于动态IIS托管WCF服务与TCP绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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