Interesting Exploits in Office 365 and SharePoint

Monthly Archives: August 2011

Leverage Removable Drives in Windows Libraries

globeWindows 7’s libraries are a really convenient tool for quickly accessing your data (or putting data from multiple locations into one window), but it doesn’t let you add removable flash drives or SD cards. Through some fancy searching and testing (playing around), I figured out how to leverage removable storage within a library.

Go to Libraries and right click on Libraries, select New/Library and give it a name—Removable Drives for example.

Right click it and hit Properties. There’s the magic button “Include a Folder”.

Unfortunately it doesn’t work. It tells you you can’t add removable media. Removable media can be used, and according to Microsoft,

“Only if the device appears in the navigation pane, under Computer, in the Hard Disk Drives section. This is set by the device manufacturer, and in some cases, it can be changed. Contact your manufacturer for more information.”

The way to do this is to go to a known location on your hard drive—C:\ perhaps—and create a folder called Pictures Card, or whatever.
Start the Computer Management program (Right click on Computer -> select Manage) and click on “Disk Management” in the left-hand sidebar.

Right click your removable drive and select “Change Drive Letter and Paths”.  You will first need to remove the drive letter assigned.

Click Add and select “Mount in the following empty NTFS folder”. Choose the folder you made earlier (e.g., C:\Picture Card). Now if you look in the C:\Picture Card folder you’ll see the contents of your SD card.
 Library Image
Now, if you right click your new Library you made earlier and add C:\Picture Card to it, it’ll work!

For each removable resource you want to index or search create a new folder and go to Computer Management to enable it to be added to a Library.

Note, of course, that the resource needs to be available to Windows for you to see the files. If you put the picture card back in the camera, Windows won’t be able to display the contents. The previously indexed contents however remain good next time you insert the drive.


SharePoint_Config Database Suspect Mode – Cannot Connect to the Configuration Database Error

If SQL Server ever crashes or hard booted, you may come across a possible corrupted SharePoint_Config database. Recently while doing SharePoint 2010 configuration of our new product suite on my VM, I had to hard reboot the VM. When the VM came back up, I received the dreaded “cannot connect to the configuration database error”.  This occurs while accessing any of the content web application.


I’ve seen this condition before, so I tried the usual debugging avenue – – IIS Web Site availability, IIS Application Pool Availability. IIS Application Pool Identity, and SQL Server availability. (see  After walking through these steps, I noticed that “SharePoint_Config” database was in suspect mode. (notice the order of the items in my debugging avenue…yes, SQLServer was last)


A quick BING took me following links to fix this issue.

As it turned out, it’s not a SharePoint issue. Any SQL Server databases can be corrupted and gets in the suspect mode. The following steps will fix the suspect database mode issues. As usual, I don’t take credit for this solution, but only post as a reference.  The credit goes to above blogs.

— Use the Master database
Use Master
— Verify that database has issues
EXEC sp_resetstatus ‘SharePoint_Config’
— Put the database in emergency mode
DBCC checkdb(‘SharePoint_Config’)
— Set the database in single user mode
–Repair the database with data loss
DBCC CheckDB (‘SharePoint_Config’, REPAIR_ALLOW_DATA_LOSS)
–Set the database in multi-user mode
–Verify that database is reset
EXEC sp_resetstatus ‘SharePoint_Config’

To fix SQL Server database suspect mode, we need to use the SQL Server’s emergency mode which allows you repair the database by reparing to last normal state.

After running the script on the Master database, SharePoint_Config database suspect mode was fixed and I was able to access the content web application.