Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Monday, November 7, 2011

Fix Mac BootCamp after accidental disk (re)partition

Repartitioning your Storage Drive (e.g. shrink and resize) after installing BootCamp can corrupt the boot record for your bootcamp. Fixing this is vey simple but writing this as I can forget how to get to the beginning.

  1. From within Mac's System Preferences -> Startup Disk choose to boot from the Windows HD
  2. Restart your system
  3. Boot using the original Windows installation media. (Insert media and press "Alt/Option" during startup)
  4. Choose the option "Repair your Computer"
  5. Choose the option Startup Repair.
  6. Let the process complete and reboot.
  7. Your should have booted using the boot camp. (As we set the startup disk to windows in step 1)

 

 

Posted via email from Abhishek Dev

Wednesday, June 15, 2011

Solve "PresentationFontCache" (.exe) taking too much CPU

After working on a project on Visual Studio 2010, I faced an issue where nearly 25% of my CPU (i7 M620, Windows 7) was being taken by the PresentationFontCache.exe. This service is used by applciations that use Windows Presentation Foundation (WPF) but many a times I was not even using a .NET applicaton (rather I was working on Java !!) and still teh PresentationFontCache.exe was hogging my CPU.

After some search and analysing multiple possible solution running these command and rebooting solved my problem on my Windows 7:

cd /d C:\Windows\ServiceProfiles\LocalService\AppData\Local\ del Font*.dat

Posted via email from Abhishek Dev

Friday, May 13, 2011

How to Access a Cassini (IIS in Visual Studio) hosted site from a remote machine

Visual Studio provides Cassini (a local only version of IIS for Web Projects in Visual Studio) for developers to test their projects on their systems without having to use the real IIS server. However, it also imposes a restriction that only the localmachine (OS on which Visual Studio is Installed) can access it. Following the steps here would allow us to go around this restriction and view a site hosted on the Cassini server from another host (machine or virtual-machine) which is on the network. This helps when doing cross-platform or cross-browser UI testing.

 

Perquisites:

  1. Remote Machine/VM.
  2. Fiddler 2 (download from here). TIP: We will use its reverse proxy capabilities.

Steps:

  1. If using a VM, make sure you are using the Shared Networking/Bridged Mode.
  2. Build and Run the web-application/web-project on Visual Studio and make sure you can access it on your local machine. Take note of the port on which is hosted.
  3. Start fiddler and open from the menu. Tools > Fiddler Options.
  4. Go to the ‘Connections’ Tab and make sure the option - “Allow remote computers to connect” - is check marked.
  5. Customize the “Fiddler listens on port:” to a port not used by any application on your system (e.g. 9999)
  6. Click [Ok] button to save these options.
  7. Press ‘Ctrl+R’ to Customize rules (You can also go to Rules > Customize rules). This generally opens the rules file in notepad (or the default editor)
  8. Find the function OnBeforeRequest (The rule files follows the Jscript syntax)
  9. At the end of this function add these line:
    if (oSession.host.toLowerCase() == "192.168.2.6:9999"){ oSession.host = "localhost:58060"; } // The IP address is the original machine's (with Cassini) IP // the localhost:port is the application port on Cassini
  10. Run cmd.exe and renew your IP by doing an:
    >> ipconfig /release followed by  >>ipconfig /renew
  11. From your browser in remote machine/VM access IP:<Fiddlers port>. e.g.
    http://192.168.2.6:9999 

You should be seeing the website, served from Cassini, on the remote machine!

Posted via email from Abhishek Dev