0 votes
1 view
in Azure by (8.1k points)

I wrote code like below. It works when I publish it as cloudapp.net, but throw SEHException when I publish it as azurewebsites.net.

String val = RoleEnvironment.GetConfigurationSettingValue("myconfig");

So what's the difference between these 2 domains/publish approaches?

1 Answer

0 votes
by (15.5k points)

You need to deploy your application as a Web Site rather than a cloud service. So the RoleEnvironment.IsAvailable = False as expected, which means the application is actually not running with Azure runtime.

...