Spence Harbars latest blog post (Antivirus and SharePoint 2013) is going through the different antivirus solutions for SharePoint 2013. The list of 3rd party vendors for this SharePoint is surprisingly small; only 1 vendor has a working solution and it is only in beta! Well at Todd Klindt's SharePoint Admin Blog, Todd talks shortly about this and his experience with antivirus and the need for an antivirus solution for a product as SharePoint in his weekly netcast found at Netcast 147 - Where Viruses Are

Tags: | Categories: SharePoint related

QuerySting paramerters in the URL can help you edit pages where the edit button is missing (ex. SharePoint 2007 list views) or you need to throw away a web part that’s messing with your page from the web part maintenance view.

Function URL
Add Web Parts/Browse ToolPaneView=2
Add Web Parts/Search ToolPaneView=3
Edit Mode mode=edit
View mode mode=view
Shared view PageView=Shared
Personal view PageView=Personal
Maintenance view contents=1

You can combine some of the urls ex Edit personal view: …aspx?PageView=Personal&mode=edit

Tags: , , , | Categories: Tips and tricks | SharePoint Configuration

Using the in the the wrong parameter with the SPWeb.GetList method you will receive a FileNotFoundException with the following very SharePoint-ish error message:

System.IO.FileNotFoundException: <nativehr>0x80070002</nativehr>
<nativestack></nativestack><nativehr>0x80070002</nativehr>
<nativestack></nativestack>

The stacktrace will often give more information but the ULS log it wil simply show:

<nativehr>0x80070002</nativehr>
<nativestack></nativestack>

So the parameter is incorrect; Either the URL does not specify a valid path to the website, or the list does not exist in the website.

The GetList method gets the list that is associated with the specified server-relative URL to the root folder of a list, such as /sites/sitecollection/subsite/Lists/Announcements.

HINT

You can use the SPUrlUtility.CombineUrl with your webs server relative URL like this:

var list = web.GetList(SPUrlUtility.CombineUrl(web.ServerRelativeUrl, 
"lists/" + listFolderName));

I prefer to use the SPWeb.GetList over the SPWeb.Lists Property. Endusers can easy change the list title in the GUI but it is harder to change its URL.

Be aware; there are other methods casting System.IO.FileNotFoundException!

Tags: , , , | Categories: SharePoint Development | Tips and tricks