Why the same files are copied to /Approot and /Siteroot in Windows Azure WebRole?

http://social.msdn.microsoft.com/Forums/is/windowsazuredevelopment/thread/8aa6666d-5b02-493e-9c6b-473355a9afad

There is a way to avoid that, but I would not use it. The reason for having 2 complete copies is the "Full IIS mode", which came out since Azure SDK 1.3. With full IIS mode there are two copies of you application, because:

1. The Full IIS allows you to have more than one site/virtual app in a single web role (pretty neat feature!). Thus there is the need for the "siteroot" folder, where all registered web applications are deployed

2. Your class that implements RoleEntryPoint runs under separate process - WaIISHost.exe, which is the requirement to have the full app source in approot.

From the other hand, when you fall back to old times, and decide to use just the HWC mode (Hostable Web Code), you will only have the approot folder. But you will loose a lot of the IIS functionalities.

You can read more about the change from HWC to Full IIS at this blog post: http://blogs.msdn.com/b/windowsazure/archive/2010/12/02/new-full-iis-capabilities-differences-from-hosted-web-core.aspx

Going back to HWC mode (removing <sites>..</sites> section from your csdef) is the only way to avoid having code duplication.

Please note that this code duplication is *only* for the web roles you have, and only for the main web role application. If you have multiple sites defined, only the main web role will be duplicated. All other sites will be just in the siteroot folder.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值