开发者

How to run multipe WCF services using the same IIS Express instance through VS 2010

开发者 https://www.devze.com 2023-03-30 10:49 出处:网络
I have a solution in Visual Studio 2010 with multiple WCF service projects, which I would like to run under IIS Express as a single site with a subfolder containing each WCF project:

I have a solution in Visual Studio 2010 with multiple WCF service projects, which I would like to run under IIS Express as a single site with a subfolder containing each WCF project:

Web site
   /WCF-project1
   /WCF-project2
   /WCF-project3

I reckon I need to configure each project (Project->Properties->Web->Servers) in Visual Studio 2010 as well as the 开发者_开发百科IIS Express configuration (applicationhost.config) ... any ideas?


  1. Create a Web Application in Visual Studio (I named it as 'RootApp')
  2. Configure it to use 'IIS Express'
  3. Now open applicationhost.config file (%userprofile%\documents\iisexpress\config\applicationhost.config)
  4. Locate the WWeb Application created in step1 ('RootApp') and edit as shown below.

        <site name="RootApp" id="123">
            <application path="/" >
                <virtualDirectory path="/" physicalPath="Root app path" />
            </application>
            <application path="/app1" >
                <virtualDirectory path="/" physicalPath="wcf project1 path" />
            </application>
            <application path="/app2" >
                <virtualDirectory path="/" physicalPath="wcf project2 path" />
            </application>
            <application path="/app3" >
                <virtualDirectory path="/" physicalPath="wcf project3 path" />
            </application>
            <application path="/app4" >
                <virtualDirectory path="/" physicalPath="wcf project4 path" />
            </application>
            <bindings>
                <binding protocol="http" bindingInformation="*:57366:localhost" />
            </bindings>
        </site>
    
0

精彩评论

暂无评论...
验证码 换一张
取 消