2012-11-16 29 views
0

我曾經有一個基於HTTP的傳輸,並且我在Applicaiton_Start中引導了我的應用程序。 通過bootstrap我的意思是設置我的DI容器等 我想更改爲命名管道,但我可能想要在另一臺服務器上繼續使用HTTP。爲多個綁定引導WCF

我可以使用以下獨立於傳輸的bootstrap嗎? 我在IIS內部託管。

/// <summary> 
/// This class needs to reside in the App_Code special ASP.NET folder 
/// It also needs to be set with a build action of Content 
/// The signature public static void AppInitialize() is recognised by ASP.NET and is 
/// always called no matter the binding (HTTP or not) 
/// </summary> 
public static class AppStart 
{ 
    public static void AppInitialize() 
    { 
     Bootstrapper.Initialize(); 
    } 
} 

回答