Showing posts with label Visual Studio. Show all posts
Showing posts with label Visual Studio. Show all posts

Wednesday, October 29, 2014

How to Enable or Disable Document Property Promotion (ParserEnabled) in SharePoint 2013

This is the way to solve issues on uploading document into SharePoint 2013 Document Library. After upload the document into SharePoint library, the document had the metadata (document properties) of the original document. Metadata that is changed on the document will revert to the original values that were given to the document; this occurs both from SharePoint and from MS Word.
 
Solution 1 – Remove Document Properties & personal Information using Inspect
1.      Open file using Microsoft office
2.      Click file and the inspect document (check for issues)
3.      Tick only on document properties & personal information
4.      Inspect & then remove
5.      Then Save
6.      Upload document into SharePoint.
 
Solution 2 – Disable Document Property Promotion using PowerShell
The SPWeb object has a ParserEnabled property, which enables or disables this functionality.  Using the PowerShell script, we can turn off this functionality at the web level. Sample script to disable the document parser feature in SharePoint:
1.      Open the SharePoint 2013 Management Shell as Administrator.
2.      Run the following script to disable document property promotion.
 
C:\> $web
        Url
        ---
        http://spfe01/sites/SITENAME/SUBSITENAME
C:\> $web.parserenabled
        True
C:\> $web.parserenabled  = $false
C:\> $web.Update()
C:\> $web.parserenabled
        false
 
 
3.      Document Property Promotion is disabled successfully and when you try to upload a document you will find that all the fields are empty
 

Monday, December 3, 2012

Find your Visual Studio Product Key through the Registry

Reference: find-your-visual-studio-product-key-through-the-registry

Step 1: Open Registry. Click Start (windows icon) > regedit (Search programs and files)

Step 2: Find VS Product Key:

For Visual Studio 2010

HKEY_LOCAL_MACHINE > SOFTWARE > Wow6432Node > Microsoft > VisualStudio -> 10.0 > Registration > 2000.0×0000 > PIDKEY

The above path will take you to the Visual Studio 2010 Product key. For Visual Studio 2008, simply change 10.0 to 9.0 and then you’re done. In the 2000×0000 key, click on the string “PIDKEY” and there is your product key for Visual Studio.

For Visual Studio 2008

HKEY_LOCAL_MACHINE > SOFTWARE > Wow6432Node > Microsoft > VisualStudio > 9.0 > Registration > 2000.0×0000 > PIDKEY

For Visual Studio 2005

HKEY_LOCAL_MACHINE > SOFTWARE > Wow6432Node > Microsoft > VisualStudio > 8.0 > Registration > 2000.0×0000 > PIDKEY

For Visual Studio.NET

HKEY_LOCAL_MACHINE > SOFTWARE > Wow6432Node > Microsoft > VisualStudio > 7.0 > Registration > 2000.0×0000 > PIDKEY

This is really handy if you lost your Visual Studio product key and you need to reinstall or reactivate your copy of Visual Studio.

Working with SharePoint 2010 Projects on Visual Studio Without Installing at the SharePoint Server

Reference: working-with-sharepoint-2010-projects-on-visual-studio-without-installing-the-server


Error: "A SharePoint server is not installed on this computer. A SharePoint server must be installed to work with SharePoint projects."

Step 1: from server machine/production server run regedit and export the folder (14.0):

HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Shared Tools > Web Server Extensions > 14.0


Step 2: On your local development machine, import the regedit file that you exported before or you can just only double click on exported regedit file. Then it will create a "Web Server Extensions" folder and the 14 hive registry for you.

Step 3: You will now be able to create a SharePoint Project in Visual Studio 2010.

On the VS 2010, build the solution (so that you generate .pdb files) and then right click on the project in the Solution Explorer and choose "Package". This will generate a .wsp file. Import this .wsp file to your SharePoint sites to see the result.

Note: To be able to work on SharePoint development for sure you will be need to add some sharepoint server assemblies to your project which will be not on your development machine like Microsoft.Sharepoint.dll. I suggest you to copy those assemblies from your server machine (production server) and add them as references to your projects.


All SharePoint Server 2010 assemblies can be found under:

C:Program Files > Common Files > Microsoft Shared > Web Server Extensions > 14 > ISAPI

Disadvantages:

This approach remind me the old version of SharePoint (WSS 3.0). The developer need to have almost 10 steps to see the result of the codes. Except, you didn't have to edit your web config manually each time you created a webpart.

The best solutions is to install the VS 2010 at Hyper V server where your SharePoint Apps reside.