Je suis en train d'appeler RoleEnvironment.GetConfigurationSetting("SOMEKEY")
comme:
public partial class AzureBasePage : System.Web.UI.Page
{
protected ChargifyConnect Chargify
{
get {
if (this._chargify == null) {
this._chargify = new ChargifyConnect();
this._chargify.apiKey = RoleEnvironment.GetConfigurationSettingValue("CHARGIFY_API_KEY");
}
return this._chargify;
}
}
private ChargifyConnect _chargify = null;
}
Mon ServiceConfiguration.cscfg clé ressemble à ceci:
<Setting name="CHARGIFY_API_KEY" value="AbCdEfGhIjKlMnOp" />
Et j'ai cette erreur:
Détails De L'Exception: System.Moment de l'exécution.InteropServices.SEHException: composant Externe a jeté une exception.
[SEHException (0x80004005): composant Externe a jeté une exception.] RoleEnvironmentGetConfigurationSettingvaluew(UInt16* , UInt16* , UInt32 , UInt32* ) +0 Microsoft.WindowsAzure.ServiceRuntime.Interne.InteropRoleManager.GetConfigurationSetting(String nom, String& ret) +92 Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetConfigurationSettingValue(String configurationSettingName) +67 ChargifyNET.ChargifyAzurePage.get_Chargify() dans C:\NetProjects\ChargifyDotNET\Source\Chargify.NET\ChargifyAzurePage.cs:26 Chargify.Azure._Default.Page_Load(Object sender, EventArgs e) dans C:\NetProjects\ChargifyDotNET\Source\Chargify.Azure\Default.aspx.vb:8 Système.Web.L'INTERFACE utilisateur.De contrôle.OnLoad(EventArgs e) +99 Système.Web.L'INTERFACE utilisateur.De contrôle.LoadRecursive() +50 Système.Web.L'INTERFACE utilisateur.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627