zoukankan      html  css  js  c++  java
  • 让一个WebRole支持多个站点

    在参考Configure a Web Role for Multiple Web SitesTips for Publishing Multiple Sites in a Web Role两篇文章后,用记事本打开Azure项目文件(*.ccproj),在尾部添加如下配置,即可实现多个站点共享一个WebRole,从而更有效的利用Azure资源。

    <PropertyGroup>
        <!-- Inject the publication of "secondary" sites into the Windows Azure build/project packaging process. -->
        <CoreBuildDependsOn>
        CleanSecondarySites;
        PublishSecondarySites;
        $(CoreBuildDependsOn)
      </CoreBuildDependsOn>
        <!-- This is the directory within the web application project directory to which the project will be "published" for later packaging by the Azure project. -->
        <SecondarySitePublishDir>azure.publish</SecondarySitePublishDir>
      </PropertyGroup>
      <!-- These SecondarySite items represent the collection of sites (other than the web application associated with the role) that need special packaging. -->
      <ItemGroup>
        <SecondarySite Include="..AdminAdmin.csproj" />
        <SecondarySite Include="..WebSiteWebSite.csproj" />
      </ItemGroup>
      <Target Name="CleanSecondarySites">
        <RemoveDir Directories="%(SecondarySite.RootDir)%(Directory)$(SecondarySitePublishDir)" />
      </Target>
      <Target Name="PublishSecondarySites" Condition="'$(PackageForComputeEmulator)' == 'true'&#xD;&#xA;                      Or '$(IsExecutingPublishTarget)' == 'true' ">
        <!--
        Execute the Build (and more importantly the _WPPCopyWebApplication) target to "publish" each secondary web application project.
         
        Note the setting of the WebProjectOutputDir property; this is where the project will be published to be later picked up by CSPack.
      -->
        <MSBuild Projects="%(SecondarySite.Identity)" Targets="Build;_WPPCopyWebApplication" Properties="Configuration=$(Configuration);Platform=$(Platform);WebProjectOutputDir=$(SecondarySitePublishDir)" />
      </Target>
  • 相关阅读:
    UITabar 设置字体大小/颜色
    NSURLSession的基本使用
    报错/警告提示
    实现毛玻璃模糊效果/DRNRealTimeBlur
    免证书真机调试
    xcode添加音效
    NSCalenda日历类
    NSDate--日期格式
    NSArray其中的方法--遍历,
    Mysql学习笔记004
  • 原文地址:https://www.cnblogs.com/fengxiang/p/3427364.html
Copyright © 2011-2022 走看看