Thursday, 21 November 2013

Cannot browse for Files in SSMS 2008 R2–Cannot access the specified path or file on the server

Recently, while dealing with a client, I can across an issue where I couldn’t restore a database.

Whenever I pressed the “Add” button, I was shown a warning box, similair to;

image

After which, pressing Ok, would leave me with an empty Browse Dialog.

image

It seems as though, if your user does not have the "sysadmin" role, then they will not have sufficient access to the filesystem on the machine in order to open the file browser.

Setting aside the security concerns for one moment....

In order to grant this role;

  1. Log in to SSMS using Windows Authentication
  2. Navigate to Security->Logins
  3. Either double Click, or Right Click and select Properties on the user you're interested in .
  4. In the "Select a page" box, select "Server Roles"
  5. Make sure that the "sysadmin" role is selected
  6. Press Ok to save the change and close the dialog
  7. Exit SSMS
  8. Reopen SSMS and login as the User you wanted, and you should now have sufficient Privileges to browse.

Wednesday, 9 October 2013

Redirecting .co.uk to .com with ASP.net MVC IIS7 URL ReWrite 2.0

I recently started work on a new website, where I’ve purchased the .co.uk and .info domain names. However, I wanted to redirect people automatically to the main .com domain.
As my host supports the IIS7 URL ReWrite 2.0 moduke, adding the following section to the primary web.config file solved this for me;
   1: <rewrite>

   2:       <rules>

   3:         <rule name="RedirectToWWW1" stopProcessing="true">

   4:           <match url=".*" ignoreCase="true" />

   5:           <conditions logicalGrouping="MatchAny">

   6:             <add input="{HTTP_HOST}" pattern="^mydomain.co.uk$" />

   7:             <add input="{HTTP_HOST}" pattern="^mydomain.info$" />

   8:             <add input="{HTTP_HOST}" pattern="^www.mydomain.co.uk$" />

   9:             <add input="{HTTP_HOST}" pattern="^www.mydomain.info$" />

  10:           </conditions>

  11:           <action type="Redirect" url="http://www.mydomain.com/{R:0}" redirectType="Permanent" />

  12:         </rule>

  13:       </rules>

  14:     </rewrite>

Tuesday, 1 October 2013

svchost.exe consumes 100% CPU on Windows XP, caused by Windows Updates

I reinstalled Windows XP on a clients PC recently, and came up against an issue where I couldn’t update Windows using Windows Update. I then noticed that the PC had slowed down to a crawl. Opening up Task Manager, Processes and Sorting by CPU, I found that svchost.exe was consuming 100% CPU.

I tried killing the process, and retrying the updates, but svchost.exe was back to 100% as soon as I did.

Having searched around multiple forums for a long time, I finally found a solution which sorted the problem;

Firstly, download Internet Explorer 8 for Windows XP - http://www.microsoft.com/en-gb/download/internet-explorer-8-details.aspx

Once that has downloaded, install the hotfix KB2870699 for IE8 - http://www.microsoft.com/en-us/download/details.aspx?id=40119

Hey presto, problem solved. You can now use Windows update and install the 300+ updates that are required!