Tuesday, September 22, 2009

Save as Site Template Missing

Are you trying to save a publishing site as site template and are still wondering where the "Save as Site Template " is?

Well It's hidden . Here is a nice article for you.


Cheers!!!

Tuesday, September 08, 2009

Get Client Machine Name ASP.NET

System.Net.Dns.GetHostByAddress(Request.UserHostAddress).HostName

Wednesday, August 05, 2009

AJAX ERROR : Sys.WebForms.PageRequestManagerTimeoutException - The server request timed out

Well if you have this error then its due to long running process as the default time out set is 90 seconds.
If you want to increase the time out value , then make change to the Script Manager attribute .
For e.g to increase it to 5 min :




(Click on image to enlarge it)

Thursday, July 23, 2009

Unknown server tag 'asp:ScriptManager' PKS

I had configured PKS (Podcasting Kit for SharePoint ) June 2009 release. Everything went smooth and even the application was working well except the encoding which i haven't yet tested .

Anyways after couple of days when i tried accessing the site the main page went KAPUT , i started getting this error "Unknown server tag 'asp"ScriptManager" .Now the question was "What might have gone wrong?" . I didn't even touched the site for 2 days and everything was working fine before (Typical sentence used by most developers -;)) .


After some search i found one article which asked to check the web.config file for some entries and it's weird those entries were gone from my web.config file. (Murphy's law in total effect ) .

Anyways as suggested i made the following entries ,In case image is not clear click on it to get better view.






I am glad website is back . Up and running .

Here is the link where i got the web.config entries .

ENJOY!!!




Monday, July 13, 2009

The template you have chosen is invalid or cannot be found. SharePoint Template Error

It's pretty hard to find the actual reason of these kind of error . But one thing is sure that template is causing issue.
The most common reason for this error is missing of dependency . for e.g. missing feature.
Best solution is to run the STPInspector tool . It will help to diagnose whether all the dependency are present in server or missing something .
You can get tool from STPINSPECTOR

ENJOY!!!

Essential SharePoint Governance Tool

Tool which you should have to administer/Develop SharePoint 2007 :

Thursday, July 09, 2009

Aspnet_merge.exe Exited with Code 1

I got this error while building the Web deployment project . After some search it came to my notice that class names in my webcontrols were same ,due to which build started bombing while merging the assembly .

I changed the class names and Voila ! it started working.




Creating single DLL for Web User Controls in ASP.NET website project

Are you trying to create single DLL for a web user control and end up getting multiple DLL's for each user control ?

Well you are in right place . The best option is to use web deployment project which is an Add in to Visual Studio .

Install the project template from here
http://msdn.microsoft.com/en-us/asp.net/aa336619.aspx


Once installed follow this article for creating a single DLL for your web project :
http://msdn.microsoft.com/en-us/library/aa479568.aspx

Friday, July 03, 2009

Microsoft New Search Engine

BING!!!!

I am impressed with the new search engine from Microsoft and i am glad it's fast.

Sunday, June 28, 2009

Best Practices Webpart

It's a old story now, sharepoint has been around now for more than 6 years and numerous solution has been created using SharePoint Technology. But the basic remains and shoud be always kept in mind to have succesful implementation . I know many of developers might be aware of the best practices for developing the webparts but question is do we really follow them ?
Generally people go back to basics when something bombs , till then best practices are kept only in books. Anyways i have been thinking of writing about it from long time and here it goes today . just follow some of best practices and webparts maintenace becomes much easier and no more "Webpart maintenance page ".

Friday, June 26, 2009

FIELD CONTROLS VS WEB PARTS

Lot of people had question surrounding this including me .Thanks toAndrew Connell for sharing the fundamental aspect of the differences put forward in the simplest way :

Article by Andrew Connell

Enjoy!!!!

Tuesday, June 23, 2009

SPUpdatedConcurrencyException: An update conflict has occurred, and you must re-try this action

I was moving site from One server farm to another , completed backup of source site successfully,everything was working fine till the Murhy's extended Law got into effect ......

"If there is a possibility of several things going wrong, the one that will cause the most damage will be the one to go wrong"

Anyways , i started restoring the site and bumped into this error. I had no clue why even this popped up . Tried multiple time but same result .Started search for error resolution and it was good to see that there are more victim of this issue.

So i tried one of the suggested approach and it worked ......


Well i just completed the site restoration and hope i dont fall victim to another law which i read somewhere and i felt it's kind of funny :

"No matter how perfect things are made to appear, Murphy's law will take effect and screw it up"

ENJOY!!!!!

Friday, June 05, 2009

Create new Content DB

Well it's a generic case where in we end up creating large number of site collections and then realize that DB size is too big to manage.

Well to take care of such situation, it's a good practice to create new content DB and move existing site collection new DB.

How to do it ?Here you go.

Wednesday, April 22, 2009

Server SQL Server evaluation period has expired.

In case you are trying to upgrade the Expired SQL server with retail SQL server follow these steps :
  • Take Back up of the DB files (MDF and LDF)
  • Unistall the expired SQL Server
  • Install retail SQL Server
  • Re-Attach old DB's

Wednesday, April 15, 2009

STSADM: The farm is unavailable

This error pops up when the user running the command doesn't have access to SQl Server , make sure you are using admin account(preferable) in order to run stsadm tool.

Tuesday, April 14, 2009

Alert Not Working

Try this :
  • stsadm.exe -o setproperty -propertyname job-immediate-alerts -propertyvalue "every 1 minutes between 0 and 59" -url "http://SiteName"
  • stsadm.exe -o setproperty -propertyname alerts-enabled -propertyvalue "true" -url "http://SiteName"

Monday, April 13, 2009

CAML Query Builder

Life gets's so much easier when intellect people think of tool which developer community actually needs , here is the one tool which actually has the potential to give you that extra time which you spend writing long CAML query :-):

http://www.u2u.be/res/Tools/CamlQueryBuilder.aspx

Friday, April 03, 2009

Unable to add selected web part(s).

ERROR :

<WebpartName>: The file is not checked out. You must first check out this document before making changes.

Scenario with Solution

While trying to add webpart to the page , i received the above error. After some minutes i got the culprit .

1) Even on clicking "Edit Page" my file was not checking out , so i had to check out my webform using sharePoint designer. This solved my intial issue of adding web part .

2) Now question was , Why the "Edit Page" is not chekcing out my page , well it was no brainer . Publishing feature in my Site Feature was not active.

ENJOY!!

Thursday, March 26, 2009

"Access Denied" MOSS 2007

I got this error while playing with the multiple authentication ie. authenticating sharepoint application with third party LDAP and Active Directory.
I was able to log in to home page but any system page e.g. _layouts/settings.aspx threw the "Access Denied " error.

This is how i got it working :

1) Go to "Application Management" tab in Central Administration
2) Click on the "Policy of Web application " link under "Application Security" section
3) Add the following users :
  • - NT AUTHORITY\local service (Full Control)
  • - "Site Collection Administrator" (Full Control)

Monday, March 09, 2009

Get all Custom Site Templates from Site collection

using (SPSite newSite = new SPSite(SiteURL))
{
using (SPWeb newWeb = newSite.OpenWeb())
{
SPWebTemplateCollection customTempCollection = newSite.GetCustomWebTemplates((uint)newWeb.Locale.LCID);
}
}

Thursday, March 05, 2009

Unable to add selected web part(s).

ERROR:
Assemblies that implement ASP.NET Web Parts and are installed into a partially trusted location, such as the bin directory, must be compiled with the AllowPartiallyTrustedCallersAttribute set for import to succeed.

SOLUTION:
Add [assembly:AllowPartiallyTrustedCallers] to AssemblyInfo.cs

REFER :
http://msdn.microsoft.com/en-us/library/system.security.allowpartiallytrustedcallersattribute(VS.71).aspx

Tuesday, February 10, 2009

Hiding Menu Items on SharePoint 2007 List

If your requirement is to hide any menu item in SharePoint list for e.g. "Connect to Outlook" or "Open with Access" etc. then "ToolBar Manager " feature in codeplex is of great help .
http://www.codeplex.com/features

There are additional features which are useful too. You can download the same from :
http://www.codeplex.com/features/Release/ProjectReleases.aspx?ReleaseId=2502#ReleaseFiles

Thursday, February 05, 2009

Configuring AJAX in ASP.NET

Here is the list of web.config entries requires for AJAX to work in ASP.NET App.

Delete all Items in SharePoint List

You might end up with this requirement quite often and and try top down approach for delete :
for (int count=0;count < itemCount ; count++)
{ itemcoll[count].Delete(); }

and bump into exceptions , well the other way to do it is bottom up delete

for (int count =itemCount-1 ; count>0 ; count--)
{ itemcoll[count].Delete(); }

SharePoint Utility Pack

If you are looking for a tool for Site Mangement with following features :

  • Recursively deleting sites
  • Create a list in multiple sites at once
  • Modifying field settings - some internal settings that you cannot modify in the regular interface, and the option to modify lists with the same name in multiple sites at once
  • Push a web part to multiple sites (a specific page in each site) at once
  • Manage list event hanlders (register and remove event handlers from lists)
Then you need to have this tool by Ishai Sagi

The event handler functionality has proven to be of great help to me.

Friday, January 30, 2009

Cannot use 'partitionResolver' unless the mode is 'StateServer' or 'SQLServer'

Have you ever got this error while trying to run an ASP.NET 2.0  web application in same port containing SharePoint 2007 Portal?

If yes here is the fix :

Add partitionResolverType="" in your ASP.NET web.config file

e.g.
sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" partitionResolverType="" sqlConnectionString="data 
source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20"



Thursday, January 22, 2009

SharePoint List Rating Engine

In my previous post of rating i had mentioned the lack of rating in discussion board .
http://metahat.blogspot.com/2008/12/sharepoint-listcontent-rating-system.html

Thanks to http://www.codeplex.com/site/users/view/StephaneEyskens for updating the rating engine and incorporating it in the discussion forum control too.

You can get the same from http://www.codeplex.com/sptoolbasket

Friday, December 26, 2008

Migrating SharePoint /MOSS 2007 database from one Farm / DB to another Farm /DB

In case you are performing any one of these activities then you are looking at right blog :
1) Migrating Portal from One Farm to another Farm
2)Migrating Portal from Development/Test Server to Production Server

I would like to put this process in order to make other's life simpler.If you are performing these migration /move and facing these errors then you have to follow this blog :

ERROR 1 :
An unexpected error occurred while refreshing the shared object manager cache.
Reason: Object reference not set to an instance of an object.
Techinal Details:System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Office.Server.Administration.SharedResourceProviderStoreDependency.get_IsValid() at Microsoft.Office.Server.Administration.SharedObjectManager.Refresh()


ERROR 2 :
"The search service is currently offline. Visit the Services on Server page in SharePoint Central Administration to verify whether the service is enabled. This might also be because an indexer move is in progress. "

Process for Farm Migration

1)Back up Complete Farm using Central Administration (Central Administration > Operations > Perform a Backup )
2) Disconnect from existing Server farm using SharePoint Products and Technologies Configuration Wizard
3) Create New Farm using "SharePoint Products and Technologies Configuration Wizard" in desired DB server and Web Server
4)Most important STEP , if you miss this you will end up with all kind of search errors in world
Start all services in that server

  • Excel Calculation Services
  • Office SharePoint Server Search
  • Windows SharePoint Services Help Search
5)Restore farm back using Central Administration (Central Administration > Operations > Restore from Backup )


AFTER MIGRATION
Once you are done you might get this Error :
Following Web Part error in the page: “One of the properties of the Web Part has an incorrect format. Windows SharePoint Services cannot deserialize the Web Part. Check the format of the properties and try again.”

Suggestion: The AppPool may not have appropriate permissions
Do this ,

  • GO TO Central Administration (Central Administration > Operations > Service Accounts)
  • Select Web Application Pool option
  • Select the Central Administration Web app from drop down
  • Provide Account ID to be used by web application

One More Pit Fall After Migration :

Infopath Managed form stops working . If you have Infopath Managed form in your site upload the same to (Central Administration > Application Management > Manage Form Templates )

Well these steps might help to make migration much simpler .

Also refer this excellent blog post for process with image depiction:
http://lkar.blogspot.com/2008/05/moving-moss-project-server-2007.html



Tuesday, December 16, 2008

SharePoint List/Content Rating System

I am working on rating system for SharePoint list and got this excellent sample in codeplex.


It seems to work great with Custom List, Issue List , Document library and Link list but unfortunately lacking the most important list (Discussion Board). 

Well i am still trying to figure out ways to integrate the same engine to Discussion Board , if i get something it will be soon in my blog.

Cheers
-Rags

What are Content Type IDs?

Excellent Article in order to understand Content Type IDs.

http://blogs.msdn.com/andrew_may/archive/2006/06/24/SharePointBeta2WhatAreContentTypeIDs.aspx

Monday, December 15, 2008

Redirecting to same Page ASP.NET

Simple concept but still pain in head if unable to figure out :)

  Response.Redirect("#"); 

Tuesday, December 02, 2008

Application synchronization failed for Microsoft.Office.Server.Search.Administration.SearchService..

ERROR:

Application synchronization failed for Microsoft.Office.Server.Search.Administration.SearchService.
Reason: Object reference not set to an instance of an object.


Resolution :
The following worked with me , i hate to say this but i have no clue what went wrong and why this started working .

In order to get search working i did the following steps and all other options didn't worked even given here in microsoft discussion group


  • Start the search using Central Adminsitration -> Operations -> Services on Server ->Click "Start" for "Office SharePoint Server Search "

  • Select only "Use this server for serving search queries". Provide credentials and Press "OK". This should atleast start the search service

  • Now go back go Central Adminsitration -> Operations -> Services on Server ->Click Link "Office SharePoint Server Search"

  • Select "Use this server for indexing content" too and provide credentials and Press OK

  • This was start indexer too

  • Now go forward and create a new SSP. Now you will see indexer available in dropdown


Hope it works for others too.

Monday, November 24, 2008

Backup / Restoring SharePoint 2007 Site from SQL Database

I got this excellent article on SharePointdogs for backup / restoring the SharePoint site from SQL DB :

http://sharepointdogs.wordpress.com/2008/07/30/content-migration-or-backuprestore-in-moss-2007/#comment-9

Here is one of defined approach which worked wonders for me :

USING SQL
Using SQL, Backup the SQL Content Databases which are required and Restore them to a new databases in the SQL and attach these databases to the new application.
(Briefly we can say that take your content db ‘Offline’ using the Central admin. Take the content database offline in SQL Studio (Take Offline context menu item). Copy your database mdf and ldf files to the new machine (the destination machine). Attach the copies on the new SQL server using SQL Studio. Add the copied content DB to the Web Application on the new machine using the Central Admin on the new web server.)
STEPS:
1)Find the content Database
These are listed under Central Admin->Application Management->Site Collection List
2) Backup the content database
You could alternatively detach it, and copy it. Just doing a backup in SQL Server 2005 Management studio is easier.
3) Restore content database to new server
Copy the BAK file to new server. Create an empty DB in Management Studio, restore from backup, you may need to change an option in the “options” tabof the restore dialog to get it to work. (Overwrite db).
4) Create Web App on new Server
Central Admin->Application Management->Create or extend Web App->Create New Web App.
5) Associate restored DB with new Web App
Central Admin->Application Management->
SharePoint Web Application Management->Content Databases->
Remove Content Database from your new web app.
Now use STSADM to add restored DB to this web app
c:\program files\common files\microsoft shared\web server extentions\12\bin on new server is where you can find the STSADM.
run this command from there.
stsadm -o addcontentdb -url http://yourwebapp:port -databasename yourcontentdb -databaseserver yoursqlserver
6) Run ISSRESET from command prompt.

Tuesday, November 11, 2008

Setting RSS Update time limit in SharePoint 2007

My previous blog on RSS ended with a very un-satisfied note as i was still trying to find the way to set the update time for RSS feeds in SharePoint 2007 . I am glad i got it now. It was a setting in Site Collection Level . Here it goes :



  • Go to Site Settings

  • In Site Adminisration Section click on link RSS

  • Set the Time To Live(Minutes) filed with required refresh time



Outlook 2007 RSS feed not updating when Sync with SharePoint 2007 List

I had issue wherein my Outlook 2007 RSS was not updating once new data is added to the SharePoint List. After lot of brain damage it came to my notice that it starts working when i remove the "Update check box " as shown in figure below while adding the New feed.Well i am still working on actual issue and trying to understand how to define content feed publisher time limit.


Tuesday, November 04, 2008

Get Discussion List Items from SharePoint Discussion Forum

If you are trying to retrieve all the root items of the Discussion List this way , it's not going to work :
SPSite site = new SPSite("Site URL");
SPWeb web = site.OpenWeb();
SPList list1 = web.Lists["DiscussionListName"];

SPListItemCollection coll = list1.Items ;



Well Here is the right way of doing it :-)
SPSite site = new SPSite("Site URL");
SPWeb web = site.OpenWeb();
SPList list1 = web.Lists["DiscussionListName"];
SPListItemCollection coll =list1.Folders ;

Friday, October 10, 2008

This page has encountered a critical error. Contact your system administrator if this problem persists.

ERROR:"An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. "

Do you get this error in your sharepoint site ?

Just one bad day you come in to see that your main page is bombing due to this error with no proper clue .Well it happened to me and i had no idea what went wrong.After lot of research i found something.

I had "?" marks all over my web.config file , which even erased some of characters.

Solution :

Search for "?" in web.config and start fixing the character in the file. I would suggest replace the web.config (obviously retain the custom entry ) with working one , i replaced my web .config with a working one and Volla!!! it worked for me .

In short the culprit is web.config and not SharePoint installation.

Cheers!!!

If this helps do leave comments , i would like to know how many SharePointeers got into this issue. :-)

Wednesday, October 01, 2008

Restricting MySite Create Access in MOSS 2007

Ever thought of restricting the MySite creation access and to allow very few user to create there personal site ?
Then this is for you :

Open Shared Service Provider Administration Page and click on link as shown in image to specify the access level of users .

Do leave message if this helps you. It's good to know i am not the only one having this requirememt :)

Friday, September 05, 2008

Sharepoint ListTemplateId

GenericList 100
DocumentLibrary 101
Survey 102
Links 103
Announcements 104
Contacts 105
Events 106
Tasks 107
DiscussionBoard 108
PictureLibrary 109
DataSources 110
WebTemplateCatalog 111
UserInformation 112
WebPartCatalog 113
ListTemplateCatalog 114
XMLForm 115
MasterPageCatalog 116
NoCodeWorkflows 117
WorkflowProcess 118
WebPageLibrary 119
CustomGrid 120
DataConnectionLibrary 130
WorkflowHistory 140
GanttTasks 150
Meetings 200
Agenda 201
MeetingUser 202
Decision 204
MeetingObjective 207
TextBox 210
ThingsToBring 211
HomePageLibrary 212
Posts 301
Comments 302
Categories 303
IssueTracking 1100
AdminTasks 1200

Tuesday, August 19, 2008

Copy / Extract DLL from GAC

Ever wondered how to retrieve dll from GAC ?

Well here is one way :


  • Open command prompt and go to c:\windows\assembly\gac

  • Required dll will be in form of a directory, change directory to to the dll (cd {dll name})

  • Check directory for folder name (dir)

  • Change directory to folder with long name

  • You will get the dll in this folder

  • Run copy command to copy to your desired directory



ENJOY!!!!

Thursday, July 17, 2008

An error occurred while attempting to retrieve the KPI value from the list

Ever encountered this error while tying to play with KPI for first time ?
Well i had , listing the causes which might throw this error:
  • Make sure the columns are all available in the default view, else try selecting "All Document" view first
  • I read that creating KPI in different site collection might throw this error, but never tried myself

In case looking for complete explanation of KPI , check out webcast :

http://channel9.msdn.com/Screencasts/214755_Dashboards.wmv

Enjoy!!!!

Wednesday, May 07, 2008

File Not Found on NewDwp.aspx in SharePoint when adding a web part

Do u receive this error and wandering what the hell is wrong with your portal:

File Not Found. at System.Signature._GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, IntPtr fieldHandle, IntPtr methodHandle, IntPtr declaringTypeHandle) at System.Signature.GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, RuntimeFieldHandle fieldHandle, RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle) at System.Signature..ctor(RuntimeMethodHandle methodHandle, RuntimeTypeHandle declaringTypeHandle) at System.Reflection.RuntimeMethodInfo.get_Signature() at System.Reflection.RuntimeMethodInfo.GetParameters() at Microsoft.SharePoint.WebPartPages.SPWebPartSerializer.GetPersonalizableProperties() at Microsoft.SharePoint.WebPartPages.SPWebPartManager.GetEffectiveWebPartType(Type webPartType, SerializationTarget serializationTarget, Boolean ignoreSupportsAttributeMarkup) at Microsoft.SharePoint.WebPartPages.SPWebPartManager.GetEffectiveWebPartType(Type aspWebPartType, SerializationTarget serializationTarget) at Microsoft.SharePoint.ApplicationPages.NewDwp.Page_PreRender(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.Web.UI.Control.OnPreRender(EventArgs e) at Microsoft.SharePoint.WebControls.UnsecuredLayoutsPageBase.OnPreRender(EventArgs e) at System.Web.UI.Control.PreRenderRecursiveInternal() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)


Problem is due to 2 factors:
1) You might have installed Smart Part web part in your server
2)and you don't have installed the ASP.NET AJAX installed in your server

To correct install the ASP.NET Ajax extension 1.0 from Microsoft Site

Restart server and you might get some relief.Do leave a message if it helps , helps me to understand how many got stuck in my situation :)

Article by david helped me ...

Tuesday, May 06, 2008

Thursday, April 10, 2008

The specified schedule recurrence string is invalid: every 1 minute. MOSS ERROR

I got this error while creating a new site collection , i was wondering what might have caused this issue. The last thing i was playing with was custom alerts and the error showed something is messed up with the timer schedule. I thought of checking the interval set for scheduled jobs and Volla!!! i had set the immediate job timer to "every 1 minute " which is not a correct string .

So solution is to reset the property :

I used the follwong command to set the timer :

stsadm -o setproperty -pn job-immediate-alerts -pv "Every 5 minutes between 0 and 59"

and all worked great :)

Friday, March 14, 2008

Thursday, March 13, 2008

Wednesday, March 05, 2008

Smartpart for SharePoint with Ajax Support

An excellent article by Jan tielen's

http://weblogs.asp.net/jan/archive/2007/02/22/smartpart-for-sharepoint-asp-net-ajax-support.aspx

Friday, February 29, 2008

Database Maintenance for SharePoint Whitepaper

http://blogs.msdn.com/sharepoint/archive/2008/02/28/database-maintenance-for-sharepoint-whitepaper.aspx

Wednesday, February 20, 2008

Item Information Returned by MOSS Alert

I was trying to access the item values in order to customize my email color scheme but after a long search it came to my notice that only few item details are returned by alert . In case you want to access other information in list , you need to write your own alert component as given in following link




Friday, February 15, 2008

Custom Alert Template to a specific list

Create a new custom template with a unique Name attribute in your working copy of AlertTemplates.xml (You can copy paste the entire section with Name SPAlertTemplateType.GenericList, change the name and modify the sections you want to). Modify the template as necessary. After restarting IIS, write object model code to set the list alert template
SPAlertTemplateCollection ats = new SPAlertTemplateCollection((SPWebService)(WebApplication.Parent)); //give appropriate values for WebApplication
list.AlertTemplate = ats[“name from above”];
list.Update();


http://blogs.msdn.com/sharepointdeveloperdocs/archive/2007/12/07/customizing-alert-notifications-and-alert-templates-in-windows-sharepoint-services-3-0.aspx

Tuesday, February 12, 2008

Custom Alert MOSS

Override the existing default alert with your custom component
http://www.sharepointu.com/forums/t/1782.aspx



Your custom email alert handler should be configured at this point. Create a new alert and you should get the updated custom email.

Check out STSADM Timer Job for alerts details :
http://technet.microsoft.com/en-us/library/cc262629.aspx

Friday, February 01, 2008

Enable Anonymous Access in MOSS

Steps to be followed for enabling Anonymous Access to site with Forms/Windows Authentication .




Friday, January 25, 2008

Error Integration MOSS Picture Library with Silverlight

Silverlight error message
ErrorCode: 4001
ErrorType: ImageError
Message: AG_E_NETWORK_ERROR


I got this error while implementing the MOSS picture library with Silverlight . I was following the article by Ian Morrish
http://www.wssdemo.com/Pages/silverlight.aspx

but due to some reason i got stuck with this error , after some hours of brain shakedown it came to my notice that the Picture library was not properly referenced in my XSLT .

Friday, January 18, 2008

Migrating List and Document Libraries in MOSS between servers

List / Document Library Migration

Have you ever got the requirement of just migrating a list/Document Library between servers and not the whole site ?

Well then you are at right place, just down load the tool and start migrating the list with all metadata intact .

Happy Migrating !!!

Download Tool

User Profile Import is not importing updated Manager Information from Active Directory in MOSS

Scenario:

User profile is imported and everything seems to work fine , later there is a change in organization structure for eg there is a manager change for person "x" .In order to reflect this information in sharepoint , you update the information in Active Directory and run import .

Issue :

SharePoint still showing the old manager for person"x" and doesn't seemed to be updated with profile import

Resolution :

Install WSS /MOSS SP1 and you are good to go ....

Thursday, January 17, 2008

Printing SharePoint Web Part

Ever thought of printing a content of web part rather than complete page in sharepoint ?

Follow the Steps:

  • Create Print Button : Add content Editor web part to your page and paste the following script as Source Text


<>
< type="button" onclick="javascript:void(PrintWebPart())" value="Print Web Part">

< language="JavaScript">
//Controls which Web Part or zone to print
var WebPartElementID = "WebPartWPQ6";

//Function to print Web Part

function PrintWebPart()
{
var bolWebPartFound = false;
if (document.getElementById != null)
{
//Create html to print in new window var PrintingHTML = '\n\n';
//Take data from Head Tag if (document.getElementsByTagName != null)
{
var HeadData= document.getElementsByTagName("HEAD");
if (HeadData.length > 0)
PrintingHTML += HeadData[0].innerHTML;
}
PrintingHTML += '\n\n\n';
var WebPartData = document.getElementById(WebPartElementID);
if (WebPartData != null)
{
PrintingHTML += WebPartData.innerHTML;
bolWebPartFound = true;
}
else
{ bolWebPartFound = false; alert ('Cannot Find Web Part'); } } PrintingHTML += '\n\n'; //Open new window to print if (bolWebPartFound)
{
var PrintingWindow = window.open("","PrintWebPart", "toolbar,width=800,height=600,scrollbars,resizable,menubar"); PrintingWindow.document.open(); PrintingWindow.document.write(PrintingHTML); // Open Print Window PrintingWindow.print(); }}< /script>

  • In order to print content from web part you need to connect the desired web part to the print button
  • Get the Div Id of web part from the Page Source and assign it to the variable in Button

Well you would like to check this for simpler explanation :

http://www.imakenews.com/mernstmann/e_article000435389.cfm

Wednesday, January 09, 2008

Granular Level Export/Import of data MOSS

Have you ever wondered what if u have to migrate just a list between servers ,do you need to buy third party tool . Nopes...

Just create a tool using API from Microsoft.SharePoint.Deployment Namespace and it's not as complex as you might think .


Check this great article with samples :

http://blogs.technet.com/stefan_gossner/archive/2007/08/30/deep-dive-into-the-sharepoint-content-deployment-and-migration-api-part-1.aspx

Happy Coding and New Year!!!

Tuesday, December 04, 2007

Infopath cannot add the event handler

While working in Infopath 2007 managed code when i tried to attach managed code to existing
form i got the following error:

Error :

Infopath cannot add the event handler

Infopath cannot create the visual basic or C# project

The location for the visual basic or C# project cannot be found or cannot be accessed


So next steps is to search internet , well no luck in that too . Then i decided to try different things with my form settings and shazam!!! got the form working .

Solution in my case :
  • Go to Tools -> Options ->Design Tab
  • Check the language for programming /select the desired language
  • Go to Tools -> Form Options -> Programming Section
  • Select the programming language which you selected in previous settings

That should be good enough to make you go forward.

In my case there was difference in language settings which caused all these errors, which might be in your case too.

Happy Infopath Programming!!!!

Friday, November 30, 2007

Writing Managed Code for Browser based Infopath 2007 Form

Ever wondered how to write managed code for Browser based infopath form , check this out :

http://www.microsoft.com/downloads/details.aspx?familyid=db1d99d9-0a31-45de-8efb-16c75e194dc3&displaylang=en

Steps in Nutshell :

  • Change the form security to full trust

Tools -> Form Options -> Security and Trust -> Full Trust

  • Publish Infopath Form to Network Share

  • Upload form to the server

Central Administration > Application Management > Manage Form Templates

  • Active form for desired site collection

  • Access the form using url of following format :

http://"server name"/_layouts/formserver.aspx?xsnlocation="site collection address "/formservertemplates/"form name".xsn&openin=browser&QueryParametername="value"

Tuesday, November 27, 2007

Content Deployment MOSS Hurdles

Collection of hurdles which you might encounter while setting up content deployment in SharePoint 2007

http://soerennielsen.wordpress.com/2007/06/19/the-long-path-to-content-deployment/

Content Deployment in Three Steps ........

Step 1:
Allow Incoming Content Deployment Jobs on the Production Site

Step 2 :
Create Content Deployment Path and Job from Staging to Production

Step 3 :
Run Content Deployment Job


For step by step instruction check out the following article :
http://blogs.msdn.com/jackiebo/archive/2007/02/26/content-deployment-step-by-step-tutorial.aspx

Content Deployment Failed Error

You started with content deployment , defined the content path and job . Everything looks good till you actually run the job and bang the mighty long error

"Failed to compare two elements in the array. at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer) at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer) at System.Collections.Generic.ArraySortHelper`1.Sort[TValue](T[] keys, TValue[] values, Int32 index, Int32 length, IComparer`1 comparer) at System.Collections.Generic.ArraySortHelper`1.Sort(T[] items, Int32 index, Int32 length, IComparer`1 comparer) at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer) at System.Collections.Generic.List`1.Sort(Int32 index, Int32 count, IComparer`1 comparer) at System.Collections.Generic.List`1.Sort(IComparer`1 comparer) at Microsoft.SharePoint.Deployment.WebSerializer.GetDataFromObjectModel(Object obj, SerializationInfo info, StreamingContext context) at Microsoft.SharePoint.Deployment.DeploymentSerializationSurrogate.GetObjectData(Object obj, SerializationInfo info, StreamingContext context) at Microsoft.SharePoint.Deployment.XmlFormatter.SerializeObject(Object obj, ISerializationSurrogate surrogate, String elementName, Boolean bNeedEnvelope) at Microsoft.SharePoint.Deployment.XmlFormatter.Serialize(Stream serializationStream, Object topLevelObject) at Microsoft.SharePoint.Deployment.ObjectSerializer.Serialize(DeploymentObject deployObject, Stream serializationStream) at Microsoft.SharePoint.Deployment.SPExport.SerializeObjects() at Microsoft.SharePoint.Deployment.SPExport.Run() *** Inner exception: Object reference not set to an instance of an object. at Microsoft.SharePoint.SPFeature.EnsureProperties() at Microsoft.SharePoint.SPFeature.get_TimeActivated() at Microsoft.SharePoint.Deployment.WebSerializer.ExportFeatureComparer.System.Collections.Generic.IComparer.Compare(ExportObject exportObject1, ExportObject exportObject2) at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer)"

OR

" Content deployment failed.The exception thrown was 'System.InvalidOperationException' : 'Failed to compare two elements in the array.'

Solution :
The exception basically means that some of the features activated at the site collection level no longer exist on disk. Their feature definition files have probably been deleted. This can easily occur if you delete some features from your solution packs without deactivating/reactivating all features on deployment .

So pin point the features causing trouble and remove it and you will be good to go .

Tuesday, October 30, 2007

Cross Browser Support for MOSS

The newer version of sharepoint , MOSS 2007 has better cross browser compatibility than the older version . It supports the following browswer :


Windows
Firefox 1.5+
Netscape 8.1+
Mozilla 1.7+
Macintosh
Safari 2.0+
Firefox 1.5+
Unix/Linux
Firefox 1.5+
Netscape 7.2+

Check out the following article to completely understand the browser compatibility and feature support by Level 2 browser :

http://technet2.microsoft.com/Office/en-us/library/ff6c5b8c-59bd-4079-8f0b-de4f8b4e0a861033.mspx?mfr=true

Wednesday, October 17, 2007

Timer Job Failed

ERRORS :
  • The job to enable features on existing sites failed
  • Application Server Administration Service Timer Job Failed

In such cases check the Windows Timer Service running in server , also check the credentials the timer is running which might be a reason of the Jobs failing in server.

Wednesday, October 10, 2007

The file web.sitemap required by XmlSiteMapProvider does not exist

I am using a custom XMLSiteMapProvider where in i have defined a web.sitemap file with urls.
The application worked fine for administrators but i got this error when i tried other users. I am using this control in a SharePoint 2007 Page . After lots of trial it came to my notice that actual error was not identification of the file .The problem was that the normal sharepoint user didn't had enough permission to access the web.sitemap file in web server .

This worked once i gave autheticated user access to the file,kind of fishy though , as i am not expecting this behaviour.

Friday, October 05, 2007

CSS not working on LinkButton

This was my issue , i had defined link button in asp.net like this :


_linkNewIncident = new System.Web.UI.WebControls.LinkButton();
_linkNewIncident.Text = "Creat New Incident";
_linkNewIncident.Click += new EventHandler(linkNewIncident_Click);
_linkNewIncident.CssClass = "HelpDeskLink";

and corresponding CSS as :
.HelpDeskLink { color:white ; font-weight :bolder ; font-size :x-small ; }

.HelpDeskLink a { color:white ; font-weight :bolder ; font-size :x-small ; }


when i ran the application , my links were still blue and was not reflecting any CSS behaviour which is supposed to be white as per my CSS :-(


After some search i got the solution .

Solution : Define "CSS Pseudo-classes"

I modified my CSS style class to the following and it worked ..


a.HelpDeskLink:link
{
color:white ;
font-weight :bolder ;
font-size :x-small ;
}

Monday, October 01, 2007

Server error: This item cannot be deleted because it is still referenced by other pages

You might get this error when you try to delete from the _catalogsmasterpage directory ,. Microsoft has provided a solution which doesn't look convincing at all :

check : http://support.microsoft.com/kb/926812

I used a different method:
  • Open the Master gallery in Explorer view
  • Create a Directory named "Delete"
  • Cut all the un-wanted Master Pages and paste it inside the "Delete" directoty
  • Delete the "Delete" Directory

And you got rid of all the unwanted pages .

Friday, September 28, 2007

Access Denied While Create Page Action

My user came back to me in morning and said that he is not able to create a page and was facing "Access Denied" error, i was amazed as the user had full control to the site. So i tried it with my ID and BANG same error. I was not able to make page too havig the same "Full Control" access.

After a complete half day of search and trying different things gladly it worked ,saved my weekend fun.

Solution which i used to get over the error is to add my ID to the "Administrators" group of site and it's all fixed.

Am not sure weather it is something by architecture of other issue but it saved my day.

I got one solution which still needs to be tested :
Check out :
http://wss.asaris.de/sites/walsh/Lists/WSSv3%20FAQ/DispForm.aspx?ID=1148

Thursday, September 20, 2007

Unable to open Page due to Web Part Error . "Saviour" Web Part Maintenance Page

At some day you decide to test your new webpart and unfortunately web part bombs badly and you end up with page which looks something like this :




Now second thought is to open the page using Sharepoint designer and removing web part , but to the height of disappointment even Designer throws all kind of error.You are all stuck thinking "How can i remove web part ? "

Well trick is to append your page url with querystring " ?contents=1 ".

So if your stuck url is http://localhost then append the query string
http://localhost?contents=1

This will take you to the saviour page "Web Part Maintenance Page" ,remove the webpart and have a happy day forward :)

Wednesday, September 12, 2007

Workflow Failed in SharePoint with Error: Failed on Start (retrying)

In case you are the unlucky one to get this error then i have couple of suggestions .One of them worked for me :)

Check out the 2 ways which might help you to overcome this error:

  • The workflow definition is invalid. :This can be figured out as SPD pops error message in such case

  • Changing the identity of the application pool to a user with administrative rights can cause the workflow to “fail to start“. If this sounds like something you've done, try changing it back to network service and try running the workflow again. (worked for me)

Check out the article by Jason Nadrowski

Gray Failures: What is it and how to detect one?

If you are reading this article , i guess you are curious to know about gray failures and different methods to detect gray failures.  Hopefu...