Calling ASP.NET Web API endpoints at regular intervals can be easily done using Windows Task Scheduler and PowerShell’s Invoke-RestMethod. The following script makes a GET call for each supplied endpoint, if a call fails then the endpoint’s URL and the error details are sent to Windows Application Event Log.
With MvcThrottle you can protect your site from aggressive crawlers, scraping tools or unwanted traffic spikes originated from the same location by limiting the rate of requests that a client from the same IP can make to your site or to specific routes. MvcThrottle is compatible with ASP.NET MVC 5.1 and can be installed via NuGet, the package is available at nuget.org/packages/MvcThrottle.
You can set multiple limits for different scenarios like allowing an IP to make a maximum number of calls per second, per minute, per hour or per day. You can define these limits to address all requests made to your website or you can scope the limits to each Controller, Action or URL, with or without query string params.
- - added per Week rate limit that can be used with Redis, Azure caching or any other caching service that can hold data more then 24h
- - added TracingThrottleLogger to publish throttling messages to the native web api ITraceWritter if one is supplied
- - allow override of throttle key computation ComputeThrottleKey
- - allow override of HTTP Status code when requests are rate limited
- - short-circut large control statements
- - move whitelist checking to separate method
- - use member ThrottlePolicy instead of passing it around
- - RequestIndentity renamed to RequestIdentity
ASP.NET Web API Throttling handler is designed to control the rate of requests that clients can make to a Web API based on IP address, client API key and request route. WebApiThrottle is compatible with Web API v2 and can be installed via NuGet, the package is available at nuget.org/packages/WebApiThrottle.
Web API throttling can be configured using the built-in
ThrottlePolicy. You can set multiple limits for different scenarios like allowing an IP or Client to make a maximum number of calls per second, per minute, per hour or even per day. You can define these limits to address all requests made to an API or you can scope the limits to each API route.
With the new App Suspend feature in IIS 8.5 you’ll get a 90% reduction in start-up time, this reason is enough for me to upgrade to Windows Server 2012 R2
Keep alive websites by having a scheduled ping to use Windows Azure Mobile Services as described here