您现在的位置: 万盛学电脑网 >> 操作系统 >> Windows xp教程 >> 正文

windowsazure经常出现的问题及解决方法

作者:佚名    责任编辑:admin    更新时间:2022-06-22

  Windows Azure作为微软基于云计算的操作系统,更是微软“软件和服务”技术的名称,在它的实际操作过程中会遭遇那些问题呢?对于那些技术上的种种难题又该如何解决呢?今天小编就请教了专业人士,并为大家总结整理了windowsazure在实际操作过程中常见问题及那些的解决方案,对此有兴趣的同学们,可以来学习下哦.

  【1】. Some Tips for table service.

  【1.1】 修改最大连接数,如果需要。

  Config file:Config file:

  <system.net>

  <connectionManagement>

  <add address = "*" maxconnection = "24" />

  </connectionManagement>

  </system.net>

  代码:

  ServicePointManager.DefaultConnectionLimit = 24;

  【1.2】 Turn off 100-continue

  Config file:

  <system.net>

  <settings>

  <servicePointManager expect100Continue="false" />

  </settings>

  </system.net>

  代码:

  ServicePointManager.Expect100Continue = false;

  【1.3】 关闭Context跟踪,如果用不上的环境(比如都是查询)

  context.MergeOption = MergeOption.NoTracking; 上一页12下一页共2页

  【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>

     <3> 使用role配置文件里的storage连接信息创建client account时,使用以下代码:

  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平台是微软自主研发的一个云服务平台,是很专业性的产品,所以平时生活中我们也很少会遇到这种技术层面的东西,可以随便看看,当做多认识一个新鲜的事物.

上一页12 下一页共2页