Posts

Dynatrace - .NET Trending / Leak Analysis Memory Snapshot

Image
If you use Dynatrace, please be aware that if you are using option of ".NET Trending/Leak-Analysis Memory Snapshot" option to "Always On". (System Profile > Agent Group > Agent Mapping > Advanced), to analyze memory leaks in .NET, this may result in higher response times, elevated CPU usage on your web servers and/or higher times spent in garbage collection. These changes to time spent in garbage collection can be observed from the PurePath breakdown(s). When not in use, please set to "Automatic" (Preferred) or "Always Off" to limit the performance impact to your web servers.

ASP.NET MVC - Disabling Browser Link

Image
You may be experiencing unexpected errors and performance impacts as a result of a capability added within Visual Studio 2013, titled Browser Link. The intent of Browser Link, was to allow the IDE to (bi-directional) communicate with the browsers (using SignalR), and allow for refreshing multiple browsers at once ("via Refreshing Linked Browsers"). In the circumstance that you are experiencing the following issues, The web application / scripts being loaded, are taking extensive periods of time to load, as a result of javascript / jQuery errors being returned to the client. The CPU usage between IIS Worker Process (W3WP) is increasing outside normal bounds. HTML markup contains garbage tags, as a result of the HttpModule associated with Browser Link. You can disable the Browser Link capability, by either using Visual Studio settings, or by disabling in the web configuration. Visual Studio [ source ] In the Browser Link dropdown menu, uncheck Enable Browser Li

C# / SQL - Performing Distributed Transactions

Distributed Transactions span across multiple processes, which when encapsulated by the distributed transaction manager, will either commit a successful transaction or rollback changes. Distributed Transactions have been available within .NET, since .NET Framework 2.0. The Default Isolation level is set to Serializable , which in usage, creates unnecessary blocking and deadlocks. Therefore, it is suggested you override the default isolation level to ReadCommitted, which reflects the default within SQL Server. /// /// This class is responsible for performing Distributed Transactions. /// public class DistributedTransactionUtility { /// /// The Distributed Transaction method which creates a Transaction Scope object /// and commits if there is no error and rollbacks, incase of exception. /// /// /// The method which performs multiple DB Transactions. /// public void DoDistributedTransaction(Action method) { // Initializes Transac

ASP.NET MVC / IIS - Optimizing Web Application Performance

Optimizing your web sites in ASP.NET MVC for performance includes cache busting, enabling caching for static resources, enabling gzip compression. To enable caching on static resources, you will need to add the following XML in your web configuration file in the system .webserver element. The control max age parameter determines the length of time to cache the static resources. ... ... In an effort to compress dynamically generated content (ASP, PHP, ASP.NET) and static files (PDF, JPEG, etc.), you can enable the following settings within your application web configuration. As you use < urlCompression > to define what is compressed, you can use < httpCompression > to define how it is compressed. … Utilizing Cache Busting can be done to ensure users do not need to clear their browser cache (te

ASP.NET MVC - Using CDNs (Content Delivery Network)

By utilizing content delivery networks (CDN)s, you will potentially receive several benefits including improved performance, gains from using different domains, pre-cached files, high-capacity infrastructure and distributed data centers. A CDN can distribute the load, save bandwidth, and boost performance. As individual users request static resources such as javascript and stylesheets, browsers limit the number of concurrent connections (or file downloads) to a single domain at a given time, thus allowing users to download additional requests. Additionally, many CDNs provide localized data centers which are closer to the user, and faster to download. For example, if you are browsing your application's site in San Francisco and need to download the javascript or stylesheets, assuming the CDN has a datacenter in California, it would utilize that location to download the file opposed to making the round trip to your local servers (e.g. could be hosted across the country). In terms of

SharePoint - Moving Sites and Subsites into another Site

If there is a need to move sites and subsites into another site within the same web application, this can be easily performed using the "Site Manager". Often times, this option is over-looked, in favor of site templates, or other backup and restore operations. However, this is the simplest option available. Note: This site is available on "SharePoint Online or Office 365 Dedicated" as well as any stand-alone SharePoint installation, on the basis that you activate the Publishing Features within SharePoint. If you visit "http://enter_your_site_url/_layouts/sitemanager.aspx", you'll see the Site Manager, where you can do a move operation of all pages and sub-sites. Select the parent site of the sub-site you want to move in the left navigation pane. Check the box next to the sub-site you want to move in the right pane. Click the Actions drop-down and click Move . Select Destination of the sub-site selected in the next dialog. SharePoint Sta

SharePoint - Feature with ID already exists - Force Option

Occasionally, when deploying SharePoint Solutions (WSP) directly from Visual Studio, you will receive the following error. Error occurred in deployment step 'Add Solution': A feature with ID {Guid} has already been installed in this farm. Use the force attribute to explicitly re-install the feature. This error occurs when you have a previously defined feature installed, as part of the same solution, which will trigger the error. To overcome this issue, you can open the feature (double-click) which is part of your actual project, and you will see the properties window come into focus. In this window, you will see details, such as title, description, scope, items in the feature. In the property window, you'll see an option titled 'Always Force Install'. By default, this item is set to "false". If you set this option to "true", it will over-write the feature each time the project is installed. SharePoint Stack Exchange