时间:2012-09-14 09:07:31 作者:木木 来源:系统之家 1. 扫描二维码随时看资讯 2. 请使用手机浏览器访问: https://m.xitongzhijia.net/xtjc/20120912/16171.html 手机查看 评论 反馈
【1.4】 合理利用PartitionKey & RowKey
具体参见: More about “PartitionKey”&"RowKey” in windows azure table storage
<2> using customer httphandler in windows azure webrole, 在webrole中使用自定义HttpHandler.
由于部署以后的webrole实际运行在IIS7上面,如果您配置的是:
<system.web>
<httpHandlers>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
<validation validateIntegratedModeConfiguration="false"></validation>
<handlers>
<add path="*.do" name="KeywordsHandler" verb="GET" type="KeywordsWebRole.KeywordsHandler,KeywordsWebRole" resourceType="Unspecified" allowPathInfo="true"></add>
</handlers>
</system.webServer>
CloudStorageAccount account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString");
出现以下错误:
Exception: SetConfigurationSettingPublisher needs to be called before FromConfigurationSetting can be used.
解决方案:
在 public override bool OnStart()中加入以下代码:
CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSetter) =>
{
configSetter(RoleEnvironment.GetConfigurationSettingValue(configName));
RoleEnvironment.Changed += (anotherSender, arg) =>
{
if (arg.Changes.OfType
.Any((change) => (change.ConfigurationSettingName == configName)))
{
if (!configSetter(RoleEnvironment.GetConfigurationSettingValue(configName)))
{
RoleEnvironment.RequestRecycle();
}
}
};
});
WindowsAzure平台是微软自主研发的一个云服务平台,是很专业性的产品,所以平时生活中我们也很少会遇到这种技术层面的东西,可以随便看看,当做多认识一个新鲜的事物.
发表评论
共0条
评论就这些咯,让大家也知道你的独特见解
立即评论以上留言仅代表用户个人观点,不代表系统之家立场