Is there a way to pause Application Insights alerts (maintenance mode) - azure-application-insights

I have a few Application Insights monitors in place with alerting. Is there a way to pause these alerts, to define a maintenance window when the site will not be available?

You can enable/disable alerts manually through the Azure Portal.
Just go to your AI application and select the "Alerts" tile. From the alert list select the alert you want to configure, and in the "edit rule" blade, you should see big Enable/Disable buttons.
As far as I know you cannot define a maintenance window that does this automatically.

Related

Manually saving scene NSUserActivity on iOS/iPadOS 13

I have implemented iOS/iPadOS 13 state restoration using NSUserActivity, mainly because my app supports multiple scenes.
The problem is that when I'm running the Simulator with two side-by-side scenes and force restart the app by rebuilding the activities are not saved and the UI is not properly restored on relaunch.
On the other hand if I first go back to the iPad home screen and then I force relaunch the app, the activities are properly restored.
Would this mean that a crash of my app would prevent saving these activities leading to an inconsistent UI state on relaunch?
And how could I periodically "force" saving activities (get stateRestorationActivity(for scene:) called)?
The problem is that when I'm running the Simulator with two side-by-side scenes and force restart the app by rebuilding the activities are not saved and the UI is not properly restored on relaunch.
What you're seeing when you "force restart the app by rebuilding" is the expected behavior. When you force restart like that, the app does not have a chance to save your NSUserActivities. Per Apple's state restoration tutorial:
If you want to test your app’s ability to restore its state, do not use the app switcher to kill the the app during debugging. Instead, use Xcode to kill the app, or kill the app programmatically. One technique is to suspend your app using the Home button, and then stop the debugger in Xcode. When you launch the app again using Xcode, UIKit initiates the state restoration process.
I understand that you weren't killing the app in the switcher, but any "forced" stop will disable state restoration (with a caveat). To test state restoration, instead use the technique suggested by Apple's tutorial above.
Would this mean that a crash of my app would prevent saving these activities leading to an inconsistent UI state on relaunch?
I think so. This is the caveat from earlier. While Apple says that killing the app (whether in the app switcher or from a crash or whatever) will disable state restoration, this is not necessarily true. You can see for yourself that Apple's own apps have odd state restoration inconsistencies when killed in the app switcher and re-opened (you may have to try it a few times to get inconsistent behavior). While I haven't tested this, I'd imagine that those same inconsistencies can occur from app crashes.

For how long does Quartz run in the background when hosted on IIS (ASP.NET)?

I have an ASP.NET website, and I am using Quartz to do some background work. The Quartz job is set to trigger every 5 minutes.
Will Quartz:
Run in the background continiously after the last user has left the
website?
Stop at some point of time, and continue when a new user enters the website?
If the answer is #2, is there a way to have the job run all the time?
At some point, after some time of inactivity, your IIS hosted application will fall in some king of 'sleep mode'. From this moment, your trigger won't launch jobs anymore, until your app get reactivated by a user trying to access to it.
Here are some solution available to you :
Run your job in a separated windows service. Need some refactoring job but clearly the safest solution
Hangfire is a another .Net background job library. Here's a link they provide to their users to fix this problem, by Making ASP.NET application always running. Note that you need to have full control of your hosting environment to achieve this.
You could set some service as Pingdom to to prevent your site from faling into this 'sleep mode'. However, I would not recommand this solution.
Note that the time needed before your app fall into 'sleep mode' can change from an environment to another. If in your case It need more than 5 minutes (the time between each of your jobs), this process could be enough to keep your web site up. In fact, it would act as the solution #3 (use an external service to poke your environment at a frequent rate)

How to get info if there any new tab or browser is opened while application is running?

How to get info if there any new tab or browser is opened while application is running?
For online examination tool i want to implement a feature that while giving test if user open a new tab or a new browser than it would notify me.
How can i achieve this task in .dot?
If your exam application is going to be a ASP.Net website/web application, then you can't detect how many tabs/browsers instance are open. You can look into HTML5 Fullscreen API for a wayout, but I don't think all the browser has support for it.

How to remove visual studio's popup "Choosing to wait for a request..."

I have a project that has, amongst other things, one web application (mvc) and one WPF application. For the part that matters, the WPF app connect to a WCF service hosted on the website.
What I want to achieve is that when I press Ctrl+F5 (start WITHOUT debugging), the build process kicks in (if needed, in other words, the default VS behavior), the WPF app launched, and if the webdev server is not launched, that it get launched too, but without opening any page on my browser (I'll manage that myself).
I managed to get that working as I want (configuration below), but every time I do a Ctrl+F5, I get a popup from VS that says
Choosing to wait for a request from another process without enabling
ASP.NET debugging results in nothing to debug.
I value the information, and that seems to match pretty much what I'm trying to accomplish anyway, but now, instead of having to close a useless tab in my browser, I have to close a modal dialog. Not a big improvement from my point of view.
So, how do I prevent this popup to show up ?
Additional information:
I don't want to start in debug mode (F5). If I need debug for the website, I'll do my usual (attaching to the webdev server).
I want the webdev server to be running all the time from the first CTRL+F5.
I don't want to publish it on IIS (even the express version)
The solution startup option is set on "Multi startup project" with the WPF app on "Start" and the website on "Start without debugging" (setting it on Start doesn't change anything, except that I also get the popup when debugging with F5 directly).
The website has its start action configured on "Don't open a page. Wait for a request from an external application". The ASP.NET checkbox in the Debuggers is checked.
Internet had not been a big help so far, so all my hopes lies on you SOers !
Edit
It seems that it was flagged as a bug, but I don't see any reference in what version it's supposed to be fixed...
Also, I discovered my question is a duplicate of this one.
I actually found another way : in the start actions, you can set it to "start external program" and reference a self quitting program. I used "C:\Windows\System32\PING.EXE". Not perfect, but also less annoying than the previous solutions.

Execute a function when a Flex 3 App finishes execution

I am developing an lib which tracks user events, like button click, state change, module load and application finish.
My problem is how I can track the application finish event. I googled for it, but I found no good answer.
It is possible to use this kind of event?
You need to use ExternalInterface, here is a good example:
Browser Window Close Event and Flex Applications

Resources