Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Azure by (19.9k 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 (25.1k 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.

Related questions

0 votes
1 answer
asked Dec 1, 2020 in Azure by dante07 (13.1k points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...