Created
March 21, 2012 19:18
-
-
Save SyntaxC4/2151597 to your computer and use it in GitHub Desktop.
Determining if you're running on Storage Emulator or Windows Azure Storage Account
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ActionResult Index() | |
{ | |
const string welcomeNote = "Welcome to ASP.NET MVC {0}!"; | |
var account = CloudStorageAccount.Parse( | |
RoleEnvironment. | |
GetConfigurationSettingValue("DataConnectionString")); | |
ViewBag.Message = (account.BlobEndpoint.IsLoopback) ? | |
string.Format(welcomeNote, " on Local") : | |
string.Format(welcomeNote, " in the Cloud"; | |
return View(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment