MySqlBackup.NET – MySQL Backup Solution for C#, VB.NET, ASP.NET – CodeProject.
Category: ASP.NET
Jon Galloway – Looking at how the ASP.NET MVC Authorize interacts with ASP.NET Forms Authorization
Create a JSON WebService in ASP.NET 2.0 with a jQuery Client – CodeProject
Visual Studio 2013 – ASP.NET projects – F7 key not working in – switch between aspx and “codebehind”.
Optimizing IIS Performance
Speeding up ASP.NET development environment with a memory ram disk
The basics for these tips are that you are willing to use some of your computer memory to speed things up.
The concept is to use a RAM disk for temporary files storage to speed up the development environment. I am currently using 512 memory on my 8gb Windows 8 pc for the RAM disk.
The tips originates from:
http://blog.lavablast.com/post/2010/12/01/Slash-your-ASPNET-compileload-time.aspx
Step 1. Install Ram disk (free software):
https://sourceforge.net/projects/imdisk-toolkit/
Run ImDisk Ram Disk Configuration.
Set drive to q: and 512mb RAM disk on my 8 gb memory pc, enable “Launch at Windows Startup”.
Above: here the drive size is set to 512mb. Its changeable, its a “temp” drive. Its non persistant everything gets wiped upon system restart.
Step 2. Set asp net temp folders pointed to RAM disk:
(from http://blog.lavablast.com/post/2010/12/01/Slash-your-ASPNET-compileload-time.aspx)
“To speed up the first load time, you can tell IIS to store its temporary files on your RAM disk (or fastest disk) by changing the following setting in your web.config files:
<compilation tempDirectory="q:\temp\iistemp\"> ... </compilation>
You can either change your project files directly, or, if you’ve lazy and have numerous applications running on your development machine (like I do), update the system-wide web.config files. Note that you need to update this for each runtime version of the Framework and, if running a 64-bit machine, for both Framework and Framework64. On my machine, I needed to modify the following files:
1: C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\Web.config
2: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Web.config
3: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG\Web.config
4: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\Web.config
”
Step 3. Chrome cache pointed to RAM disk:
If you use Chrome as development browser this tip helps you point out the custom cache folder and set a size.
https://href.li/?http://jchaois.blogspot.se/2013/11/chrome-cache-location-and-size.html
Shortcut target value (pointed to q: drive and 100mb cache) :
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disk-cache-dir="q:\temp\chromecache" --disk-cache-size=104857600
Regedit value:
Change HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command in Windows registry to
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disk-cache-dir="q:\temp\chromecache" --disk-cache-size=104857600 -- "%1"
The results
It feels like my computer is “snappier” and faster when surfing in Chrome. But I am not really sure if the time to render first page after build is any faster? It still takes about 1 minute after rebuild of entire solution.
More tweaks
Tell antivirus (for me its just windows defender) to exclude q: folder from scanning. You could also add your base projects folder and Visual Studio folders;
C:\Program Files (x86)\Microsoft Visual Studio 11.0
C:\Program Files (x86)\Microsoft Visual Studio 12.0
C:\Projects
Excluded process:
C:\Windows\System32\inetsrv\w3wp.exe
Create a bat file for starting Visual Studio to enforce Visual Studio temp files to q:
http://www.codewrecks.com/blog/index.php/2009/08/31/speedup-visual-studio-with-ramdisk/
Bat and shortcut file for download:
Visual Studio 2013.zip
Set ReSharper temp files to use system temp as well:
http://johnnycoder.com/blog/2009/12/23/resharper-file-location/
Not sure if this speeds things up: (just another temp folder used by IIS):
http://serverfault.com/questions/89245/how-to-move-c-inetpub-temp-apppools-to-another-disk
HangFire – Background job processing for ASP.NET
QueueBackgroundWorkItem to reliably schedule and run background processes in ASP.NET – .NET Web Development and Tools Blog – Site Home – MSDN Blogs
ASP.NET Forms – Get simple reference to masterpage properties
Put this directive in the top of your aspx file:
<%@ MasterType VirtualPath=”~/Templates/MasterPages/Default.Master” %>
The aspx-file gets reference to the masterpages properties in code-behind trough Master.PropertyName e.g:
this.Master.Heading
Adding Bundling and Minification to Web Forms – RickAndMSFT on Azure & MVC – Site Home – MSDN Blogs
Works in Web Forms ASP.NET 4.0 as well.
Adding Bundling and Minification to Web Forms – RickAndMSFT on Azure & MVC – Site Home – MSDN Blogs.