Rana Omer Hussain's RegEdit

My Weblog registry is a directory which stores settings and options for my Professional Life

Cannot view list in Datasheet View

I recently had to install Office 2010 64bit on my computer to work with some extremely large Excel spreadsheets. I noticed today that when I tried to open one of the SharePoint list in datasheet view, it came up with the following error:

The list cannot be displayed in Datasheet view for one or more of the following reasons: A datasheet component compatible with Windows SharePoint Services is not installed, your browser does not support ActiveX controls, or support for ActiveX controls is disabled

This is a known compatibility issue between Office 2010 64bit and SharePoint. Microsoft has a workaround for this issue.

Install KB2266203 from Microsoft.

http://support.microsoft.com/kb/2266203

After installing the fix, the problem was resolved immediately.

Webdav Filesize Limits

When users need to be able to upload files that are more than 500 MB. This is part of a plan to use SharePoint to replace redirected folders.

The problem is that Webdav has an inbuilt size limit of 50 MB. This limit is on the client side and nothing to do with SharePoint configuration.

The limit can be changed by editing the registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\

WebClient\Parameters\FileSizeLimitInBytes

Change the DWORD Decimal Value to file size specified in bytes, e.g. 2000000000 for 2GB.

Reboot.

*Note: There is a file size limit on a 32-Bit DWORD.

Sharepoint 2010 Fixed width Master Page Styling, no scrollbar issues

Recently I have created a custom master page for our new SharePoint server, First I have noticed that when the page loads, SharePoint  runs a java script function and sets the width of the page.

It is searching for the div tag  with Id  #s4-workspace  and if it finds one with this id, sets its width to fit the content. So I have added a class  s4-nosetwidth. If we add this class to s4-workspace,SharePoint wont set its width.

But very first time when I tried to create fixed width master page, I have faced so many issues with scroll bars and SharePoint modal dialog windows are not opening correctly. They are opening either with in  small height  and added scroll bars or  opening in fixed width and height with out scroll bars.

Mainly IE7 adding its own scroll bar to body  , as the page is fixed width so the scroll bar that is showing in the middle of the page is looking pretty ugly. I have fixed all these issues and below is the styling.

html{
background-color:#55A0A7;
overflow/**/:auto;
}

body.v4master {
width:1024px;
margin:0px auto;
overflow:visible;
background-color: transparent !important;
}

.ms-dialog body.v4master {
height: 100%;
overflow: hidden;
width: 100%;
}
body #s4-workspace {
left: 0;
overflow: auto !important;
overflow/**/: visible !important;
position: relative;
width: 100% !important;
display:table;
border-spacing:0px;
}

.ms-dialog body #s4-workspace{
display:block !important;
overflow/**/: auto !important;
}

How to run SP2010 Management Shell Script from a BAT file?

The steps to achieve this:

1.       Take the PowerShell script.

2.       Remove all the comments ( everything that starts with #).

3.       Put ; at the end of each line.

4.       Remove all line breaks.

5.       Supply the string you get as the -command parameter for powershell.exe

Reference:

PowerShell script in a .bat file

blocked file types-SharePoint 2010

File types can be blocked on a per Web application basis or globally.

The settings are made from the operations tab of the central administration web site.

Essentially it is a list of file extensions that are not allowed. SharePoint only checks the extension and then allows/disallows it.

So if you try to upload an exe file and find that it is blocked, you can change the extension to .doc and upload the file. Antivirus checks the file content and decides whether it is a .doc or .exe file.

The default list of disallowed file extensions is as follows:
ade, adp, app, asa, ashx, asmx, asp, bas, bat, cdx, cer, chm, class, cmd, com, cpl, crt, csh, dll, exe, fxp, hlp, hta, htr, htw, ida, idc, idq, ins, isp, its, jse, ksh, lnk, mad, maf, mag, mam, maq, mar, mas, mat, mau, mav, maw, mda, mdb, mde, mdt, mdw, mdz, msc, msi, msp, mst, ops, pcd, pif, prf, prg, printer, pst, reg, rem, scf, scr, sct, shb, shs, shtm, shtml, soap, stm, url, vb, vbe, vbs, wsc, wsf, wsh
Reference : blocked file types

How to get a flash movie in SharePoint

Alright I admit I had never displayed flash in a SharePoint site until today.  I figured it would be hard and really it isn’t too hard.  All you need to do is upload the .SWF file to a web location (I used a document library but it could be on a different server) then add a content editor web part to your page.  Now go into your content editor web part and click on source editor.  Now paste the following code into the web part.

 

Replace myFlashMovie.swf with the url of your SWF file.

You now have a flash movie on your site.

File Conversion in Process, Converter Failed To Save File

On some machines, when a user opens an Excel file from SharePoint and checks out for edit and -does not- use the local drafts folder, you see a dialog with “File Conversion In Progress”, then “ConverterFailed To Save File” message, but the file is checked out to the user and will not open in the Excel. It never opens the application and I’m returned to the document library. If I already have the application it doesn’t generate the error.

The fix is to do the following:

- Open Word
- Click the Office button (Top-left in the window)
- Click Word Options
- Click Resources
- Click the Diagnose button
- Click through the wizard until it’s finished
- Close all browser windows

That’s fixed all of our issues.

SharePoint 2010 prompts to save PDF documents when opening (Solution)

I have run into this issue myself. In my case I had the following scenario:

  • Initially, my web application had ‘Browser File Handling’ set to ‘Strict’ (which is the default when creating a web application)
  • Created a site collection, then a custom document library, and saved it as a template
  • Created a new document library using the template
  • Changed the web application ‘Browser File Handling’ to ‘Permissive’
  • Found that I still was prompted to save PDF files before opening in the document libraries created with my template. Document libraries created with the out-of-the-box templates worked as expected.

I am sure there are more scenarios where this issue would surface, perhaps saving a web as a template before changing ‘Browser File Handling’. Although I should do more testing for a complete list of scenarios, I needed to find out what was the cause. So I investigated.

Each Document Library in SharePoint 2010 actually has a property titled BrowserFileHandling that is set based on the BrowserFileHandling selection at the Web Application level. In the scenario I described above, I have found that the inheritance of this property does not always behave as you would expect.  Using PowerShell (you could also use the object model) you can take a look at the BrowserFileHandling property at the Document Library level as this is not exposed in the UI.

Here is some PowerShell to help and please note this is used in the SharePoint 2010 Management Shell

#Get Web

$web = Get-SPWeb “http://yourspweburl”

#Get Document Library

$docLib = $web.lists["Your Document Library Title"]

#View all properties/methods of the Document Library and you’ll see that BrowserFileHandling is a property

$docLib | Get-Member

#See the current BrowserFileHandling setting for the Document Library

$docLib.BrowserFileHandling

#If you need to change it from Strict to Permissive

$docLib.BrowserFileHandling = “Permissive”

$docLib.Update()

Even if the template scenario that I describe isn’t your scenario you can certainly use the above PowerShell code to inspect, and if necessary, change the BrowserFileHandling property in a Document Library that is presenting the problem you describe.

Reference : Resources and Tools for IT Professionals | TechNet

Custom Sharepoint 2010 Ribbon Markup Styles

If you’re doing any sort of custom theming for Sharepoint 2010, and have been wondering how to modify the out-of-the-box styles provided by the “Markup Styles” button in the ribbon, take a look at the following:

H1.ms-rteElement-H1B
{
-ms-name:”Colored Heading 1″;
/* [ReplaceColor(themeColor:"Accent1")] */ color:#0072bc;
font-size:2em;
font-weight:normal;
}

If you Firebug / View Source HTML’d the content, you would probably have worked out how it kind of worked – basically, you just need to overwrite a few css classes to replace the existing ones and add new css classes in the following format:

Note the proprietary -ms-name property, and the use of the ReplaceColor goodness to integrate SP2010 themes into the stylesheet.

Unfortunately though, it looks like the only way to get rid of the out-of-the-box options is to remove the v4.css import (<sharepoint:CssLink runat=”server” Version=”4″ >) from the master page, and make a custom copy that excludes the styles.

Note : an alternative to replacing the v4.css if you’re only interested in modifying one or two of your Publishing HTML controls, you can specify the PrefixStyleSheet property which will replace the default set with the css style sheet you specify.

Reference : Managing the Rich Text Editor CSS and the RTE Menus for the Wiki Pages of a SharePoint 2010 Team Site

Cannot delete content type in SharePoint 2010 – Error: The content type is in use

You try to delete a content type in SharePoint 2010 and this is what you see:

Lets review the possible reasons. This error happens when there is a dependency or another object in SharePoint that uses the content type:

  1. A list/library that is already using the content type.
  2. Items in the list/library that use the content type.

OK, we dropped the items that use that content type and we removed the content type from the list/library but still we see the same darn screen when trying to get rid of the content type!
What else can possibly use this content type?

The answer is simple: the same items or libraries that you deleted are still using that content type in RECYCLE BIN. Clean up both recycle bins (user and administrator) and then happily wipe off the ugly content type.

Post Navigation

Follow

Get every new post delivered to your Inbox.