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

Tuesday, June 25, 2013

Monitor traffic b/w SQL server and front end

I want to monitor SQL traffic b/w Front End and SQL server. What could be the best approach for this ?

Reason :

In our uls logs , we are getting message :

Process : OWSTIMER.EXE (_x-_-_)
Thread ID : _x-_-_
Area : SharePoint Foundation
Category : Database
Event ID : f-_-
Level : Monitorable

Message :

A large block of literal text was sent to sql. This can result in blocking in sql and excessive memory use on the front end. Verify that no binary parameters are being passed as literals, and consider breaking up batches into smaller components. If this request is for a SharePoint list or list item, you may be able to resolve this by reducing the number of fields.

QL Profiler:

You may also like:











Sunday, June 2, 2013

my website does not work well with newly released version of IE

This is a very common scenario where you face n number of issues with newer version of browsers

temporary solution, tweak in your web.config like :

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=EmulateIE7" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>

now here is a catch , you might face few issues with SharePoint provided black box units like search crawls. You might want to omit clear tag to avoid such situations.

You may also like:

SharePoint 2010 Enterprise Search | SharePoint Crawl Exceptional Behaviour

Saturday, June 1, 2013

Offset Today in SPQuery Example

There is a virtual situation :

You have no archival / expiration policies setup for your list and on and off you want to delete everything older than 30 days . What you will do ?

This sample power shell solves your purpose and fulfill example for offset parameter in powershell :

$WebURL = "http://mysitecollection:100/myWeb";
$spWeb = Get-SPWeb -Identity $WebURL;

$sList = $spWeb.GetList("/myWeb/Lists/myList");
write-host $sList.Title;
$camlQuery = "<Where><Lt><FieldRef Name='Modified' /><Value Type='DateTime'><Today OffsetDays=-30 /></Value></Lt></Where>";
$spQuery = new-object Microsoft.SharePoint.SPQuery ;
$spQuery.Query = $camlQuery ;
$spQuery.ViewFields = "<FieldRef Name='ID' />";

$ToBeDeleted = $sList.GetItems() ;
$ToBeDeleted = $sList.GetItems($spQuery) ;
$i=0;
$ToBeDeleted | ForEach-Object {
$i++;
Write-Host $_.ID -foregroundcolor cyan

$deaditem= $sList.GetItemById($_.ID);  # if you wish you may decide to recycle instead to recycle bin

$deaditem.Delete();

}

write-host $i;

 

 

Friday, May 31, 2013

Include specific folder content in BlobCache SharePoint

It is quite possible that you instruct blob cache framework to include only specific SP document Libraries . ( I have mentioned it as document libraries , as you must be aware it does not work well with custom folders created using designer etc)

Suppose I have few heavy .jpeg  and .dhx  in a spdocumentLibrary called  HeavyContent .

I want to cache all .pdf , .doc ,.docx ,.flv,.f4v ,.swf  in my web application , but  .jpeg and .dhx   are the one only from spdoc lib "HeavyContent"

Search for a tag similar to below mentioned  in web.config and edit the path parameter.  :

<BlobCache location="C:\myBlob\Public" path="(\.(doc|docx|pdf|swf|flv|f4v)$|HeavyContent.*\.(dhx|jpeg)$)" maxSize="10" max-age="86400" enabled="true" />

This will mark items as specified by path parameter regex  for 24 hrs , to be cached.

\.(doc|docx|pdf|swf|flv|f4v)$    <---->  everything which ends with extension mentioned

|                                            <---->   or

HeavyContent.*\.(dhx|jpeg)$ <----> content inside HeavyContent ending with dhx or jpeg



Disclaimer : I am not sure how performance will be affected by making path parameter complex.


Mime Types with BlobCache

Now suppose your IIS does not support some mime types like dhx and f4v.  You have two options :

Option 1 : add mime type at server level in IIS.

Option 2 : use    browserFileHandling = "Nosniff"  in the webconfig section discussed above.  [ Ref : http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx ]
How to  Flushing the BLOB cache



  1. IISRESET [Recommended : Increase the startup and shutdown time limits on the web application to accommodate the extra time it takes to initialize or serialize the cache index for very large BLOB caches]

  2. Powershell :



Write-Host -ForegroundColor White ” – Enabling SP PowerShell cmdlets…”
If ((Get-PsSnapin |?{$_.Name -eq “Microsoft.SharePoint.PowerShell”})-eq $null)
{
$PSSnapin = Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | Out-Null
}


$webAppall = Get-SPWebApplication
foreach ($_.URL in $webAppall) {
$webApp = Get-SPWebApplication $_.URL
[Microsoft.SharePoint.Publishing.PublishingCache]::FlushBlobCache($webApp)
Write-Host “Flushed the BLOB cache for:” $_.URL
}
3. change enable to false in web.config , change location parameter , set enable to true


You may also like:







Wednesday, October 10, 2012

Get Dependent files from HTML response

Hi

I am getting response of a page like :

System.Net.HttpWebRequest  request  ...

request.Credentials...

request.Method = ...

request.UserAgent =..

(System.Net.HttpWebResponse)request.GetResponse();

receiveStream = response.GetResponseStream();

readStream = new StreamReader(receiveStream, Encoding.UTF8);

string pageContent = readStream.ReadToEnd();

Now out of this string pageContent    , I want to extract all sub request and make them a hit.   Is there something better than html agility pack for this ?

Reply 1 By http://social.msdn.microsoft.com/profile/joel%20engineer/?ws=usercard-mini

I usually read it into an htmlDocument Class and the use either GetElementByID or GetElementsByTagname()

 

 

 

string pageContent;

webBrowser1.Document.Write(pageContent);

 




jdweng

 

Reply 2 


You should try http://htmlagilitypack.codeplex.com/

I am searching something better dear.

Sunday, July 1, 2012

VariationsFixupTool

variationsfixuptool is used to correct variations system data
on publishing sites or pages.If you want to analyze the actual site structure
and the data stored in the relationships list this tool may be good one.

Syntax

stsadm -o variationsfixuptool

   -url <source variation site URL>

   [-scan]

   [-recurse]

   [-label]

   [-fix]

   [-spawn]

   [-showrunningjobs]


Parameters


Parameter name Value Required? Description
url A valid URL, such as http://server_name Yes The URL of a site in source variation where variations system data is being analyzed or corrected.
scan <none> No Analyzes the variations hierarchy and report findings.
This parameter provides functionality that cannot be accessed using the Central Administration Web site.
For each Site/Page, it reports:
  • If the source site is marked as being in the source variation hierarchy (SPWeb.AllProperties["__InSourceHierarchy"] == True ?). If the site is marked as being in the source hierarchy means that the page is part of the source hierarchy.
  • The Variation Group Id of the source site or page (SPWeb.AllProperties["Variation Group Id"] or PublishingPage.ListItem[FieldId.VariationGroupId])
  • Which peers are registered in the relationships list with same Variation Group Id
  • If a variation peer exists in the configured labels (default is all spawned labels) by first checking if a peer is configured in the relationships list with the same variation group ID for the given label. If no peer can be found using the relationships list we try to lookup the peer using the default URL that would be used when creating a variant in the given label
  • The variation group id of the variation peers in the target labels (SPWeb.AllProperties["Variation Group Id"] or PublishingPage.ListItem[FieldId.VariationGroupId])
  • If the source site/page is configured in the relationships list
  • In addition the command reports the variation labels used for the peer check (default is all spawned labels).
  • The tool will not identify any issues - it is required to analyze the report in detail and interpret it in order to find problems.
recurse <none> No Scan or fix all subsites of the site specified by the url parameter.
label A valid label name, such as "English" No Name of the label of the variation target.
fix <none> No Corrects invalid variations system data that are found. If the recurse parameter is used, fixes are done recursively for all subsites.
This parameter provides functionality that cannot be accessed using the Central Administration Web site.Fix mode will not create missing variation peers.
The following issues are automatically fixed:
  • Missing Variation Group ID on source site or source page
  • Missing relationships list entry for source or target page or site
  • Missing Variation Group ID on target site or target page
  • Different Variation Group ID in source site/page and target site/page (source ID will win)
spawn <none> No Creates new site variations on the source variation site specified by the url parameter for all target variations labels. If the recurse parameter is used, variations for subsites and pages are also created.
This parameter equivalent to the New Variation Site user interface setting that is located on the Site Content and Structure page.
This operation mode cannot be used to spawn pages in already spawned sites.
The command initiates the site spawn operation by creating a scheduled work item for the SpawnSiteJobDefinition timerjob. The spawn will be performed as soon as the timerjob runs.
The difference between the scheduled work item created by the CPVAreaEventReceiver and the Variationsfixuptool is that the tool has the option to create a workitem, which only spawns the site to one specific variation rather than to all spawned variation labels.
A common use scenario is to configure the source variation label with the Hierarchy Creation option to create only the root site and not the complete hierarchy and later to spawn the hierarchy or parts of the hierarchy from the source label using the STSADM command.
In MOSS 2007, this command was a major benefit compared to the automatic hierarchy creation in the UI, as it was the only way to force the creation in OWSTIMER rather than W3WP.
With SharePoint 2010 where all actions are already in OWSTIMER the benefit of using the STSADM command rather than the UI is rather limited.
showrunningjobs <none> No Displays current status of Variations Propagate Page Job Definition and Variations Propagate Site Job Definition timer jobs that are located on the Timer Job Status page of the SharePoint Central Administration Web site. But this does not provide information about Variations Create Hierarchies Job Definition , Variations Create Page Job Definition and Variations Create Site Job Definition.You only get to know about Variations Propagate Page Job Definition and Variations Propagate Site Job Definition.
Example :
stsadm -o variationsfixuptool -scan -url http://server/sites/pub/vhome/source -recurse > C:\report1.html

Source of information :

SharePoint Variations – The complete Guide – Part 11 – Variations Fixup Tool (blogs.technet.com/b/stefan_gossner/archive/2011/11/28/sharepoint-variations-the-complete-guide-part-11-variations-fixup-tool.aspx)

Use the variationsfixuptool operation (SharePoint Server 2010) [technet.microsoft.com/en-us/library/dd789633(v=office.14).aspx]

You may also like:

Cannot create Variation site because the parent Publishing web cannot…


0x80070057 sharepoint variations


Access “Pages” Library for Chinese Locale

Friday, June 1, 2012

Central Admin Content Deployment Jobs and Path by Microsoft (SharePoint 2010) VS SharePoint Content Deployment Wizard by chrisobrien

Hi

Few of our projects are using SharePoint Content Deployment Wizard  by chrisobrien    since old days of MOSS 2007. And others use Central Admin Content Deployment Jobs and Path  by Microsoft .

Microsoft keeps on updating there out of box feature in SharePoint as usual.

 

I am starting this discussion for folks here to encourage using the best that could be. I would request everyone to share there views Like :--

____________________________________________________________________________________________________________

My preference : Central Admin Content Deployment Jobs and Path  by Microsoft (SharePoint 2010) (Option 1)

Why :

  1. I prefer option 1 because it is something for which I can go back to Microsoft  and request for support. I get  almost all feature in option 1 , which option 2 gives.


OR

My preference :  SharePoint Content Deployment Wizard  by chrisobrien   (Option 2)

Why :

  1. I prefer option 2 for level of customization it allows with custom API as wrapper  , I can control the whole migration process . Option 1 is kind of Black box for us.


_____________________________________________________________________________________________________________

 

You are welcome to share links where the tech world have already such threads available which gives this comparison handy like SharePoint Content Deployment Wizard

________________________________________________________________________________________________________________________________________________________________________________________________________________________

 

 

Are there some alternatives if we don’t want to upgrade from Microsoft SharePoint Server 2010 (14.0.4763.1000), still we don’t face below mentioned issues:

  1.        An incremental content deployment of a package in SharePoint Server 2010 fails if the following conditions are true:

    • The package contains a renamed site.

    • A sub-site contains a link to the renamed site.




Additionally, you receive the following error message:

Value does not fall within the expected range.

References: http://support.microsoft.com/kb/2459108

  1.        You perform a content deployment from a source web application to a destination web application in SharePoint Foundation 2010.

    • You select languages under the Alternate language section in the source web application.

    • You perform an incremental content deployment.




In this scenario, the alternative language setting is not changed in the destination web application.

References: http://support.microsoft.com/kb/2536591

  1.        Assume that you perform an incremental content deployment on a destination SharePoint Server 2010 farm. In this situation, the changes for the alternative language settings on the source farm are not reflected on the destination farm.


References: http://support.microsoft.com/kb/2536591

  1.        When you use the Managed Metadata columns together with document sets in SharePoint Foundation 2010, you cannot perform a content deployment successfully. Additionally, you receive the following error message:


FatalError: Specified data type does not match the current data type of the property.

References: http://support.microsoft.com/kb/2598304

  1.        You paste HTML markup into the comments field of a publishing page in a SharePoint site.


You change the page order by using the Site Navigation Settings page in the SharePoint site.

You perform a content deployment from this site to another site.

In this scenario, the content deployment fails, and you receive the following error message:

Cannot complete this action.

References: http://support.microsoft.com/kb/2598304

  1.        One of the issue you may face with Deployment job is :   How to Fix – Publishing Site Content Deployment Error – Duplicate First Name Column

  2.        You should verify for relative links, if they are migrated correctly.


Nevertheless we can avoid many not listed anywhere using below mentioned:

Best practices for content deployment (SharePoint Server 2010)

You are invited to add the issues you kept on facing in SharePoint Content Deployment using Paths and Jobs , with links to resolution or explanations.

Thursday, February 2, 2012

MOSS 2007 Troubleshooting Guide

need a trouble shooting guide for MOSS 2007.



Please suggest a good document on this which covers almost all scenarios like in MOSS 2007.



_______________________________________________________________________________________________________________

Few resources accumulated:









  1. 1.       Administration Tool Kits : 

What it contains: http://blogs.technet.com/b/steve_chen/archive/2009/09/02/sharepoint-administration-toolkit-v4-for-moss-2007.aspx



Download links:

WSS 3.0:

http://technet.microsoft.com/en-us/library/cc508986%28office.12%29.aspx

MOSS 2007 :

http://technet.microsoft.com/en-in/library/cc508851%28en-us,office.12%29.aspx





  1. 2.       The Shortcut Guide to Centralized SharePoint Administration

http://nexus.realtimepublishers.com/sgcsa.php





  1. 3.       Content of this training :



http://download.microsoft.com/download/2/A/B/2AB91CD5-CA1A-4906-AA5C-E26522E4B2E6/WorkshopPLUS%20-%20MOSS%202007%20-%20Administration%20and%20Troubleshooting.pdf







  1. 4.       Installation Guide :

http://www.datasprings.com/resources/articles-information/overview-on-installing-sharepoint-2007



http://sharepointforum.com/en-US/Wiki/Installation%20MOSS%202007.aspx





  1. 5.       Before we start any troubleshooting 4 things to be done always:

http://consultingblogs.emc.com/mohammadalzawati/archive/2009/10/13/how-to-quickly-troubleshoot-moss-2007.aspx





  1. 6.       All about SharePoint :   



http://blogs.technet.com/b/vedant/archive/2009/07/28/microsoft-office-sharepoint-server-moss-2007-resource-guide.aspx



In this link above , just search for word "Troubleshooting" , we get a section to cover troubleshooting many things like :



SharePoint 2007 Versions - How do you find out what version of SharePoint you are running?

Troubleshooting backup and recovery - Use this information to troubleshoot problems that you encounter during backup or recovery

Troubleshoot Messaging Integration

Events and error reference

Account permissions and security settings (Office SharePoint Server) - This article describes Microsoft Office SharePoint Server administrative and services account permissions. It covers the following areas: Microsoft SQL Server, the file system, file shares, and registry entries

Plan for administrative and service accounts

Special directories and storage locations (Office SharePoint Server) - This article lists the folders and files that are used by Microsoft Office SharePoint Server 2007

Files and permissions for Office SharePoint Server 2007 - This article lists the detailed minimum file permission settings for folders and files created when you install MOSS 2007

Running Central Admin on Multiple Servers within a Farm

Decentralizing Site Administration - Security model of WSS 3.0, including its advantages and implications when delegating administrative control over SharePoint sites to individual departments while maintaining centralized administrative control over the SharePoint infrastructure.

Special directories and storage locations - This article lists the folders and files that are used by Microsoft Office SharePoint Server 2007.

Moving all databases to a different database server or a server with the same name - Two procedures describing how to move databases to a different server or a server with the same name



I was looking for similar to this one in 2007:
http://sharepoint.microsoft.com/Blogs/GetThePoint/Blog%20Documents/SharePointFeaturesServices-10.zip

 Reply 1



ou're never really going to get a unified document as it'll almost certainly end up with things that aren't relevant.  Some basic questions would be: -

  • Are you using Performance Point?

  • Are you using Standard or Enterprise?

  • What version of SQL Server do you have?

  • Are you integrating Reporting Services into your deployment?

  • Are you using any major third party products from guys like Metalogix, AvePoint etc.

  • Have you any internal customisations?

All of these would represent deviations from one deployment to the next.  You'd be best served reading widely around the current set-up that you have, reading the link that Bogdan provided and looking at MVP/Support Engineer blogs




Steven Andrews



Reply 2

There are thousands of troubleshooting scenarios and articles. Check the blogs of the SharePoint Support Engineers that are working for Microsoft and you will find a lot of information.

Here you have my blog http://sharepointboco.com/ where you can find SharePoint performance troubleshooting tips and tricks


You may also like:

Few Questions to be answered before you start a SharePoint…

Monday, June 21, 2010

Microsoft.SharePoint.WebPartPages.ToolPart , page needs a refresh to apply changes back to web part

Hi

 

I have a problem with custom tool part. The page needs a refresh before the changes are actually visible in the web part.

Either user have to hit apply then OK in Tool Part, or after directly hitting Ok he needs to refresh the page.

 

Seems to be create child control of web part  being called before applychanges of tool part.

 

Any pointers ?

Reply 1

This is a common issue with custom properties in SharePoint webpart.

Just try call the method that modifies your custom property in the PreRender event.

For more check these links:

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/6445d939-05da-4ce9-a2cf-3e9fe28b98ee

http://social.msdn.microsoft.com/Forums/en-US/sharepointdevelopment/thread/5b85a5dc-37aa-49d7-a741-d40c7bd2bd0c




BR, PM

Reply 2

Hi

 

Thanks for you guidance,

I had to use a property from custom tool part to a script in the usercontrol( inside our web part).

calling my RegisterStartUpScript inside OnPreRender in user control solved my problem.

 

Thanks

Reply 3

Awesome news!!




BR, PM

 

Friday, June 11, 2010

How can i find the currently login user of extended web application through ASP.Net code?

i have created a web application http://spserver:19578 and then i extend a web application http://spserver:19579 from it.

Now i am currently login as ali to http://spserver:19579. i write the following code

SPSite sitecollection = new SPSite("http://spserver:19579");
SPWeb web = sitecollection.AllWebs["/"];
SPUser user = web.CurrentUser;

lblUser.Text = user.Name;

but it returns System Account. and when i used LoginName instead of Name then it returns SharePoint\system.

 

Note: I am using form based authentication in http://spserver:19579 and windows authentication in http://spserver:19578.

 

Reply 1

hey try using SPContext .Current .Web .CurrentUser

Thursday, October 15, 2009

detect if new spfile is uploaded

Hi

Is there a way to detect if
a new spfile is uploaded in document library/ old spfile is replaced for the same item
or
only the meta data have been edited. (may be in itemupdated eventhandler.)




Thanks & Regards
Hemant Kumar
EMAIL REMOVED

Reply 1

When a file is replaced, the ItemUpdated event is triggered.  The same is true if you just change the metadata for the file.  Not sure if it's relevant to you, but replacing an existing file does not call ItemDeleted and ItemAdded.  In other words, it's not a delete and add operation.




Randy - http://sharepointhawaii.com/randywilliams

Reply 2

Hi,

Yes, as Williams’s information, both file replacing action and metadata updating action trigger ItemUpdated event.

And perhaps you need to distinguish them by BeforeProperties and AfterProperties.

Here is a  Williams article for detailed information when retrieving event’s  before and after value.

Hope this can help.

 

Best Regards,

-Aaron

Reply 3

Hi,

@hemantrhtk :) Please look at this link :http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=25
A great artcile for eventhandler.

Best Regards,

-Aaron

Reply 4

Hello Aron

Could you suggest , possibly what is is the column /property name which changes while new doc is uploaded/previous doc is overridden.

I tried the same thing before starting this thread with all the properties in loop , but could not figure out the possible column/property name.

Cheers-Hemant

Friday, June 1, 2007

How far I should go with customization ........

Almost every SharePoint project starts with elaborating  what the current version of SharePoint supports as Out of Box  feature .

But at the end of the day , level of customization we require in these OOB feature is huge.

To make it easy for future upgrades and better performance and really really get what Microsoft promise , we should be inclined towards no  customization.