locked
how to resolve seh exception RRS feed

  • Question

  • hy every body,

    i ususally get seh exception and i coudn't resolve it :(

    this a portion of source code where the excption is triggered

     

    static StorageBase()

            {

                // This code is necessary to use CloudStorageAccount.FromConfigurationSetting

                CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSetter) =>

                {

                    configSetter(RoleEnvironment.GetConfigurationSettingValue(configName));

                    RoleEnvironment.Changed += (sender, arg) =>

                    {

                        if (arg.Changes.OfType<RoleEnvironmentConfigurationSettingChange>()

                            .Any((change) => (change.ConfigurationSettingName == configName)))

                        {

                            if (!configSetter(RoleEnvironment.GetConfigurationSettingValue(configName)))

                            {

                                RoleEnvironment.RequestRecycle();

                            }

                        }

                    };

                });

            }

    thanks in advance. 

    Wednesday, July 13, 2011 9:16 PM

Answers

  • Double check that you're running your app in the Windows Azure compute emulator (and not just directly running a web app under VS). This error can sometimes indicate that.
    • Marked as answer by Wenchao Zeng Thursday, July 14, 2011 3:43 AM
    Wednesday, July 13, 2011 10:12 PM

All replies

  • I would skip all the SetConfigurationSettingPublisher stuff and jump straight to CloudStorageAccount.Parse() which you can use as follows:

     

    CloudStorageAccount storageAccount = CloudStorageAccount.Parse(RoleEnvironment.GetConfigurationSettingValue(configName));
    
    

    Wednesday, July 13, 2011 9:37 PM
    Answerer
  • Double check that you're running your app in the Windows Azure compute emulator (and not just directly running a web app under VS). This error can sometimes indicate that.
    • Marked as answer by Wenchao Zeng Thursday, July 14, 2011 3:43 AM
    Wednesday, July 13, 2011 10:12 PM
  • :))))))))))))))))))))))))))))))))))))))))))))))))))))))

    thankssssssss very much it works 

    Wednesday, July 13, 2011 10:22 PM