I am using the following code to cleanup my Azure App’s database.
protected void Application_End(object sender, EventArgs e)
{
core.cleanUpDB();
}
Can I prevent this from being executed on my local machine while debugging? I just want to execute this only on the deployed Azure App.
Thanks in advance.
While the other answers might work in a specific scenario, they don’t relate to Windows Azure. The only way to check if you’re running in Windows Azure and not running in the emulator (assuming you have a Web Role), is like this: