Why am I getting SEHException when calling RoleEnvironment.GetConfigurationSettingValue(“MYKEY”)?

前端 未结 5 1137
旧巷少年郎
旧巷少年郎 2020-11-29 04:04

I\'m trying to call RoleEnvironment.GetConfigurationSetting(\"SOMEKEY\") like so:

public partial class AzureBasePage : System.Web.UI.Page
{
             


        
5条回答
  •  攒了一身酷
    2020-11-29 04:38

    Removing the tag in the ServiceDefinition.csdef file could be a workaround for you as was for us but then your site will not be deployed to Full IIS on the Cloud. We are using 1.7 of the SDK.

    So in summary: RoleEnvironment.IsAvailable = False with this included in the ServiceDefinition.csdef with an instance count of 1 I might add.

    
          
            
              
              
            
          
     
    

    Remove the node and deploy and you might find that now RoleEnvironment.IsAvailable = True.

    There are very little logs about what is actually happening - the website is running fine, there are no warnings except the usual you only have 1 instance why not deploy 2 and the site is up and running fine.

    This is a recent issue and I believe there must be some changes made in that msshrtmi.dll. It could log a little more of what might actually be the problem if the RoleEnvironment is not available.

提交回复
热议问题