Get following exception during first load of ASP.NET MVC 4 site in IIS7.5 under Window 2008 R2:
Could not load type ‘System.ServiceModel.Activation.HttpModule’ from assembly ‘System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089′.
Easy to fix using following command (run as administrator): C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -iru
Done
P.S. if for some strange reason you still use 32 bit Windows, you should update framework path in command above.
You just setup new Windows 2008 R2 Server, enable IIS role, install ASP.NET MVC 1/2/3 or 4, upload your site, configure IIS (i.e. IIS pool, rights, certificates etc) and get following error in browser:
HTTP Error 403.14 – Forbidden The Web server is configured to not list the contents of this directory.
Hm… EASY to fix with following command (run command prompt as administrator!): C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -i
Suppose you have ASP.NET (or ASP.NET MVC) site. You want to use Session.SessionID value somewhere (say as shopping cart id), which normally should be SAME value for each request from the same browser (sure unless session expire or user clean cookies, or you forget to store session in some distributed storage and use Web Farm with multiple front-end servers, or you forget to … actually many things might be here). However you may see every time DIFFERENT value for Session.SessionID for anonymous user! How? Reason: new SessionID is generated by ASP.NET, UNLESS YOU STORE SOMETHING IN THE SESSION! For example do something like this: Session["Something"] = 1 after first user request and you will see that SessionID remains unchanged. Sounds crazy, right???
What do you think about Amazon ElasticCache? (http://aws.amazon.com/elasticache)
High-Memory Quadruple Extra Large Cache Node (cache.m2.4xlarge): 68 GB memory, 26 ECUs (8 virtual cores with 3.25 ECUs each), 64-bit platform, High I/O Capacity cost 2.24$ per hour or about 1600$ per month!
For about 5000-6000$ you can purchase server with following hardware: 4x AMD Opteron 6128 / 2,00GHz Eight-Core (i.e. 32 CORES) 64GB ECC registered DDR3 2 * 80GB 2,5 Intel SSD with Adaptec RAID 1+1 1400W redundant (Hot-Swap) PSU etc.
Now install here your favorite free Linux and Memcached and you are ready to go
Totally:
Server with better hardware (32 real 2GHz cores instead of 26 ECUs i.e. 8 virtual cores in AMZ, very fast DDR3 memory, redundant power supply and brand MB (Supermicro) instead of “well know instance lifetime issues in AMZ” etc) will cost you something like 3-4 month of AMZ instance rent! Sure, you can say like: what about Collocation cost? Hm… 1U server probably MAX 100$ per month (including some big traffic) etc.
Instead of Conclusion:
So you still think same about Amazon ElasticCache ???
Use Microsoft Hyper-V for virtualization?
Most probably you already store your virtual disks not in the system drive (i.e. not in drive ‘C’ for example), which is right approach (for performance and other considerations)
However not everybody know that in the C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines folder, Hyper-V actually store huge files (*.bin) for each virtual machine that you run on your Hyper-V host! That may be huge issue in case, if you have a lot of virtual machines in use and your system drive space limited. In addition, it also may introduce fragmentation problems, due to the fact that such files maybe created and removed each time you run your instance or when you create some snapshots etc.
So basically there are 2 main questions you may ask: a) Why such files (*.bin) are created? And why they are so big? You may notice that size of such files actually equal to amount of virtual memory which you allocate for the virtual instance. So answer is simple – it just a place (such file) to store memory dump for Virtual Machine (instance) and required by Hyper-V b) Can I get rid of such files? Answer – no In current version of Hyper-V it is not possible. However it is completely possible to move such huge files to separate disk(s) out from system disk! That SHOULD be done I think in any Hyper-V host anyway, in case if you have additional disks here. It is very easy to do that: on the first step of Wizard to create Virtual Machine, do not forget to change location for virtual machine from default one to location, where you have enough space to store both virtual machine memory dump and possible snapshots (in case if you plan to use them sure thing).