- 相關(guān)推薦
微軟認(rèn)證考試技巧:windowsazure常見問題處理及技巧
「1」。 Some Tips for table service.
「1.1」 修改最大連接數(shù),如果需要。
Config file:
代碼:
ServicePointManager.DefaultConnectionLimit = 24;
「1.2」 Turn off 100-continue
Config file:
代碼:
ServicePointManager.Expect100Continue = false;
「1.3」 關(guān)閉Context跟蹤,如果用不上的環(huán)境(比如都是查詢)
context.MergeOption = MergeOption.NoTracking;
「1.4」 合理利用PartitionKey & RowKey
具體參見: More about “PartitionKey”&"RowKey“ in windows azure table storage
<2> using customer httphandler in windows azure webrole, 在webrole中使用自定義HttpHandler.
由于部署以后的webrole實(shí)際運(yùn)行在IIS7上面,如果您配置的是:
<system.web>
<httpHandlers>
將會報(bào)錯,正確的配置是在
<3> 使用role配置文件里的storage連接信息創(chuàng)建client account時(shí),使用以下代碼:
CloudStorageAccount account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString");
出現(xiàn)以下錯誤:
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();
}
}
};
});
【微軟認(rèn)證考試技巧:windowsazure常見問題處理及技巧】相關(guān)文章:
微軟認(rèn)證考試等級09-20
微軟MOS認(rèn)證考試簡介06-27
sun認(rèn)證java關(guān)于字符串處理技巧08-26
精選微軟Word實(shí)用技巧10-28
2016年微軟認(rèn)證Win7系統(tǒng)庫功能小技巧08-23
微軟認(rèn)證考試試題及答案「經(jīng)典版」08-24
新浪微博認(rèn)證技巧07-16