Showing posts with label MOSS 2007. Show all posts
Showing posts with label MOSS 2007. Show all posts

Friday, October 14, 2011

MCTS Finally - End of issues with MCP ID

Long time ago..actually 2 years back, during TechEd 2009, I knew I was on my way to becoming a Microsoft Certified Technology Specialist (MCTS) as I had cleared the required certifications-
  1. Microsoft Office SharePoint Server 2007, Configuring (70-630) &
  2. Microsoft Office SharePoint Server 2007 - Application Development (70-542)
However, as it happens, the person who was filling-in data on the computer for my certification accidentally created another MCP ID rather than continuing with my previous ID. I was unaware of this during and even after the exam for a long time.

When I realized this, I lost all the joy of clearing my 3rd MS certification and I let it be then. Also, I dumbly provided my then organization email address which was later discontinued by Windows Live services.

Fortunately, today things had to take a different turn, when I saw from one of my colleague the UX for the new MCP site. I decided I got to fix this stuff and earn my MCTS badge. So I looked up the Microsoft site and found the helpline numbers here:
http://www.microsoft.com/learning/en/us/help/service-asia-pacific.aspx#tab2 (for India)

The helpdesk executive was patient and she understood my issue. She was able to rectify my problem by keeping my older MCP ID and merging the result from the newer one to this. She was polite to update all contact details and replaced my old organization ID.

Voila, there I have it now.. :)


I really hope this helps someone who might have faced a similar issue with MCP ID.

Thursday, September 22, 2011

Fix Configuration of the Document ID feature

With SP2010, Microsoft has tried to provide an excellent and helpful feature for uniquely identifying a document within a site collection called DocumentID.
Well, you might ask the rationale behind this tiny change from MS side..right?

Basically, with the previous version of SharePoint product i.e. MOSS 2007, if the user moved a document within a site collection, lets say from one document library to another or the folder containing the file has been renamed or your site URL has been modified in someway, then you would typically face a situation which in IT is called a Broken Link or simply put a bad url :(.

Hence, in the site collection features, you would typically get an option to activate/deactivate the Document ID Service

Document ID Service
Once you have this activated, you would expect the Document ID column to show up when you try to add a new document to a library, unfortunately there is another catch here. You might see this message, "Configuration of the Document ID feature is scheduled to be completed by an automated process." as highlighted in the image below:


This message is shown because the timer job called Document ID enable/disable job has been activated. Once the job completes at the scheduled time, the message will go away or else you may run the timer job and put it to completion forcibly by clicking "Run Now". However, I can assure you that even after the previous step, there is no certain time when the Document ID would show up if you go for a new document upload.

Document ID enable/disable Job


One v.important note that if your doc lib was already having some documents, you would need to explicitly perform some action for this new column of Document ID to show up..for example Check-in/Check-out of docs.

Do try this out and explore this cool stuff from SharePoint 2010!

Saturday, February 19, 2011

ASP.net WebParts Vs SharePoint WebParts - Which one to choose?

And we are back! Well, it has been a very busy time for me over the last 8 months, anyhow moving on.

Well, this might be a question which should have popped-up in the head of any beginner in SharePoint probably with some .net background.

Well, an interesting point is that SharePoint 2007 is based on top on ASP.net 2.0 framework. Hence, for folks who are well versed with ASP.Net 2.0 and plan to move on to MOSS/SPS should definitely start with "HelloWorld" kind of webparts using System.Web.UI.WebControls.WebParts.WebPart as a reference.

This enables:
  • Usage on websites developed on ASP.net 2.0 and also on SharePoint based portals
  • Getting familiarized with Windows SharePoint Services 3.0 classes as a starting point
However, the hard truth remains that sooner or later, developers working on MOSS or SPS would need to move on to Microsoft.SharePoint.WebPartPages.WebPart in their code.

It obviously has it's own advantages:
  • Enables cross-page connections
  • Enables connections between webparts placed in different webpart zones on the same SharePoint page
  • Helps in migrating webpart code to WSS 3.0 based webparts
  • Utilize the SharePoint offerred data caching mechanism
Signing off here..enjoy coding!

Sunday, July 4, 2010

Increase SharePoint Upload Limit

Are you facing issues when trying to upload files of size above 50 MB to your SharePoint 2007 document library?

Well, I have tried to list down how you can fix those issues and ultimately increase the SharePoint Upload Limit:

First, increase the Maximum Upload Size for a specific web application.
  • Go to the Central Administration > Application Management > Web Application General Settings
  • Specify the new maximum upload size for your webapplication. For now, we are setting it to 256MB. It could be even set upto 2GB.
Your second step should be to try increasing your default chunk size of large files by trying this STSADM command:

Stsadm.exe –o setproperty –pn large–file–chunk–size –pv   
  • This basically denotes the chunk of data that can be read from SQL Server at one time.
  • The -pv which determines the property value stands for the upload size in bytes (B).
  • It could be set to a maximum of 2GB i.e. (2,147,483,648 B).
  • Do an IISRESET
Next, in web.config file of your particular web application, under the httpRuntime tag in system.web section, increase the upload limit to match the value that you set earlier in central administration. You also need to add the execution timeout to allow more time before the upload operation times out as shown in the example below:

httpRuntime executionTimeout="300" maxRequestLength="256000"

where
  • 300 means 5 minutes as execution time out
  • 256000 allows uploading 256 MB files.
After the above changes, MOSS would allow files of more than 50 MB to get uploaded easily. Incase you still face challenges, check if the file you are trying to upload, is it a blocked file type e.g. EXE, DLL, etc.

Hope this helps you.

Friday, June 25, 2010

Add PDF Icon to SharePoint Library

Quite obviously, we come across many occassions where PDF files are uploaded to SharePoint 2007 Libraries or Lists.

While we can easily see the images of our regular Word, Excel, PowerPoint documents, however the PDF documents look empty without the trademarked image.

Well, no problem, who says we can't have it. It is fairly simple, so let us see how:
  • Get the appropriate Adobe PDF icon image (preferrably a gif) from here 
  • Save that image confirming with SharePoint images standard such as icopdf.gif. Place the image where Office document icons exist by-default. Check out this 12 Hive path of your MOSS 2007 installation:
    Drive\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Images
  • Now that we have successfully placed the image, we need to inform SharePoint about our modification. For doing this, we need to add an entry to the DocIcon.xml file which sits in the Drive\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Xml path
  • Open the docicon.xml with any editor such as Visual Studio or even Notepad. Under ByExtension section, add a key/value pair as given below:
    Mapping Key="pdf" value="icopdf.gif"
    Note
    : Take a backup copy of the DocIcon.xml prior to the changes (to be on the safe side). Also, the XML start-end tags are removed as the post wouldnt allow it easily. Kindly take care in your case.
  • Save changes to Docicon.xml file. Perform an IISRESET command to finalize the same.
Refresh & check the same list or library page to notice the changes take effect.
Briefly, what this does has done is, if SharePoint sees any file (new/old) with an extension .pdf, it would display the PDF icon against the file as it does for Office documents.

Hope y'all find this information helpful. Cyaaa..and..stay tuned!!

Saturday, June 19, 2010

SharePoint Timer Job stuck at Deploying

Dealing with SharePoint solution packages and solution deployment stuck at "Deploying" status!!

Well don’t panic, here is just what the doctor ordered:

  1. Check the Timer Job Status for the solution deployment in Central Administration. There could be entries with “Failed” as the job status.
  2. Lets try to set things right by running stsadm -o execadmsvcjobs command.
    Note that in a farm environment, you need to run the above command on all the servers.
  3. As a next step, try restarting the OWSTIMER Service on all boxes in the farm.
  4. If the above steps do not help the solution deployment. You may try retracting the solution using Retract solution command or through the Central Admin's Solution Management.
    stsadm.exe -o retractsolution -name
    For your knowledge, retracting a solution creates another “deployment job”.

    Now if retracting the solution does not work, do not try to Force Delete the solution as that would throw an exception, "The solution cannot be removed when job is scheduled or running"
  5. Get a list of all the pending & active deployments on your MOSS Farm using
    stsadm -o enumdeployments command.
    Make a note of the GUID of the various solutions on the command window as this would be required in next step.
  6. As a last nail in the coffin, we now need to simply cancel the solution deployment by passing the GUID of the solution as shown below
    stsadm -o canceldeployment -id "job id string here"
After performing the above steps, you would be able to either put the SharePoint Timer Job into completion or atleast remove the solution package being stuck in deployment.

If the problem still persists (esp. in the MOSS 2007 Farm environment), you might need to remove/detach a defective WFE from the farm and then retry deployment.


I have tried to put together the steps which have worked for me, hope this post helps you all too.

Saturday, May 29, 2010

Difference between SPWeb.Users, SPWeb.AllUsers, SPWeb.SiteUsers

MOSS 2007 offers 3 different user collections in the SPWeb object.
  • SPWeb.Users
    This represents the collection of users or user objects who have been explicitly assigned permissions in the Web site . This does not return users who have access through a group.

    Example (C#):
    SPUserCollection users = web.Users;
  • SPWeb.AllUsers
    This gives us the collection of user objects who are either members of the site collection or who have atleast navigated to the site as authenticated members of a domain group in the site.

    Example (C#):
    SPUserCollection users = web.AllUsers;
  • SPWeb.SiteUsers
    This is the collection of all users that belong to the site collection.

    Example (C#):
    SPUserCollection users = web.SiteUsers;
These terms tend to confuse us unless we really know the differences between each one of them.

So I thought it would be nice to write an article stating which is what. Hope this information helps you SharePoint 2007 developers.

Sunday, May 16, 2010

How to Fix Central Administration: Service Unavailable Issue?

While working on MOSS Servers, you all must have faced 2 common issues quite frequently
  1. You receive a "Cannot connect to the configuration database"
  2. Service Unavailable
Basically, the configuration database is where SP stores all information about the SharePoint 2007 installation and the server farm, hence, it is required for the Central Administration to work fine.

Suddenly while you are in the middle of your important SharePoint deployment or configuration, either of these issues will prop up and eat up lengthy hours. Even the easiest solutions to all SharePoint problems i.e. IISReset or Server restart also do not end your miseries.

Hence, I decided, lets apply TRY-CATCH-FINALLY on these issues for once-n-for-all here.


For Issue#1:

Try to run the SharePoint configuration wizard once, follow these steps for the same:

  1. Click Start, click Run, type cmd in the Open box, and then click OK.
  2. Change to the following directory:
    system drive\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin
  3. Run the following command:
    psconfig -cmd upgrade -inplace b2b
The above steps should fix the issue, but if your problem still persists, then check the event logs of your server. Checking those logs will let you know issues such as -
  • Is your SQL server agent running?
  • Credentials (app pool permissions) used for connecting to SQL Server is working or failing?
  • Facing any network issues to be able to connect to DB?
    (this only applies if the SQL is applied on a separate box from MOSS 2007)
  • so on..
For Issue#2:

If even after carrying out the above suggestions, you are not able to track down the problem, then you could unprovision Central Administration and then reprovision it.

This could be easily done via an STSADM command given below:

stsadm.exe -o provisionservice -action start -servicetype Microsoft.SharePoint.Administration.SPWebService -servicename WSS_Administration
 
I sincerely hope this helps you all in fixing this critical MOSS 2007 Central Administration issue.

Saturday, April 24, 2010

Extracting data from Sharepoint Version table

When using SharePoint 2007, if we turn the Version Control settings to On for a List/Library, then different versions of the file or listitem get stored in the Content DB.

There are multiple ways to retrieve this information:
  1. Using MOSS 2007 API
  2. Via Versions.asmx - An OOB SharePoint Webservice
  3. Or Querying the Docs & DocVersions table directly in using T-SQL statements
Now through SP API, you can try something like this -->
SPWeb web = new SPSite("your site url").OpenWeb();


SPList lib = web.Lists["your library"];


foreach (SPListItem item in lib.Items)


{


SPFile file=item.File


SPFileVersionCollection versions = file.Versions;


//Add your code to loop through the version collection & add custom logic here..


}


Coming to WebService approach:


SharePoint has a Versions.asmx web service to work with versions in document libraries.


For introduction, check out how to utilize this to get some information :
http://www.c-sharpcorner.com/UploadFile/klaus_salchner@hotmail.com/SharePointWS11152005045049AM/SharePointWS.aspx




Incase, you want to go ahead querying the SQL tables directly, then you could try a query as below:


SELECT DocVersions.version
FROM Docs INNER JOIN DocVersions ON DocVersions.Id = Docs.Id


Although it is not recommended that you query the SP DB directly. Any modifications or changes to the Content DB tables in unsupported.




Also the data is stored in UTF-8 Encoded format. After the query runs, it returns some data like this:
UIVersion




512
1024
1536
2048
512
1024
512


The above data is difficult to interpret in terms of Version numbers. Anyway, just to let you know


512 = version 1,
1024 =version 2,
1025 =version2.1,
2048= version 3,
1=version 0.1
and so on..


I guess the pattern is clear to you. Hope this article helps you.

LinkWithin

Related Posts with Thumbnails