7/27/2010Ever wonder why your SharePoint Server slows down all of a sudden and then appears to spring back to life. It may be the Indexing service that indexes the local hard drives. If you open up Task Manager and look under processes you might see CISVC and it can take up to 80% of your processing power when it is running full bore.
Solution - Open up the Services MMC and set the Indexing Service to manual or just disable it all together. The only thing that will happen is that your search on the SharePoint Servers's hard drives will be slower, but that is a lot better than your SharePoint Server being slow every day when it runs. 7/21/2010Modifying the sub menu (the one that says Overview, Organization, Content, Tags and Notes, Colleagues, and Memberships) is not a straight forward process. At least not at first glance. When you go to the site actions you don't see anything for navigation.
If you open up SharePoint Designer and connect to the My Site Host you will find that the DataSourceID is MySiteSubNavDS, but you don't need to worry about that.
The trick is that the navigation page is there, but just not shown on the Site Actions page. You can append _layouts/AreaNavigationSettings.aspx (i.e. http://mysites/_layouts/AreaNavigationSettings.aspx) to the My Sites location. Then you can modify the Current Navigation and that will work (even for the personal sites areas). Easy breezy lemon squeezy.
I hope this saves someone some time! Modifying the sub menu (the one that says Overview, Organization, Content, Tags and Notes, Colleagues, and Memberships) is not a straight forward process. At least not at first glance. When you go to the site actions you don't see anything for navigation.
If you open up SharePoint Designer and connect to the My Site Host you will find that the DataSourceID is MySiteSubNavDS, but you don't need to worry about that.
The trick is that the navigation page is there, but just not shown on the Site Actions page. You can append _layouts/AreaNavigationSettings.aspx (i.e. http://mysites/_layouts/AreaNavigationSettings.aspx) to the My Sites location. Then you can modify the Current Navigation and that will work (even for the personal sites areas). Easy breezy lemon squeezy.
I hope this saves someone some time! 7/20/2010If you went ahead and clicked the "Hide Visual Upgrade" button it is kind of pain to get the visual upgrade option enabled. I had to jump into powershell and run the following comands to turn it on for a web site (press enter after each line and replace http://yoursite with the url of your sharepoint site).
$web.UIVersionConfigurationEnabled = 1
$web.Update()
You shoud now be able to see the Visual Upgrade options under Title, Description, and Icon under site settings.
6/23/2010Also available on the Kindle
Putting a bunch of pushpins on a Virtual Earth map based on addresses presents some interesting problems. It is relatively straight forward if you have a set of longitudes and latitudes but most mortals don't know that off the top of their heads. I was presented with the problem of putting all the pushpins of a set of people based upon data from a SharePoint list. Luckily I was able to get it down starting with a post from Tom Resing. His blog can be found at http://tomresing.com/blog/default.aspx. Well, let's get down to brass tax and explain how to accomplish this goal as shown below.
Step 1. Create the SharePoint List with address information
Create a customized list with the fields of Address, City, State and Zip Code. I renamed the field Title to Name in order to represent the names of the people. Once the list has been created, you will need to populate it with some data. It doesn't matter what you name the list, but it will need the fields listed for the XSL to work. Otherwise, you will need to make the appropriate changes. The list fields are shown below.
Step 2: Create an aspx page.
Create a web part page on your site. It doesn't really matter which page you choose.
Step 3: Add a Data View Web Part
You need to add a DVWP based on the list you created in step 1. You will need to open the site in SharePoint Designer 2010 and then open the aspx page you created in step 2 as shown below.
Step 4: Create an XSL page for the DVWP
We will use XSL to convert the data from SharePoint into pushpins on a map from provided from Virtual Earth. The following is the link to the javascript from Virtual Earth that is used for this example. I used version 6.3.
http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3
This link is put into the xsl that is shown below. You will need to put this xsl somewhere on your SharePoint server or somewhere accessible from the page. I recommend putting it into a SharePoint library and turning versioning on. That way if you mess it up, then you can roll it back. If you accidentally choose to let SharePoint Designer update the code, it can potentially change it.
<?xml version="1.0" encoding="utf-8" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ddwrt2="urn:frontpage:internal"> <xsl:output method="html" indent="no"/>
<xsl:param name="ListID">f2a35021-9f2e-4d89-9ae3-6cf83a59ae9c</xsl:param> <xsl:param name="ID">1</xsl:param>
<xsl:template match="/" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" ddwrt:ghost=""> <xsl:call-template name="dvt_1"/> </xsl:template> <xsl:template name="dvt_1"> <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" /> <xsl:call-template name="dvt_1.body">
<xsl:with-param name="Rows" select="$Rows" />
</xsl:call-template> </xsl:template> <xsl:template name="dvt_1.body"> <xsl:param name="Rows" />
<!-- Link to the Virtual Earth Map control JS file --> <div id='myMap' style="position: relative; width: 650px; height: 600px;"></div>
<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3"> </script> <script type="text/javascript"> _spBodyOnLoadFunctionNames.push("GetMap");
var map=null; var sAddress = []; var sTitle; var sDescription = []; var iCount = 0; var iCurrent = 0;
function GetMap() {
if(map == null) { map = new VEMap('myMap'); map.LoadMap(null, 8, VEMapStyle.Road, false, VEMapMode.Mode2D, true, 1); }
var i=0; iCurrent=0; for(i=0;i!=iCount;i++) {
map.Find(null, sAddress[i], null, null, 0, 1, true, true, true, true, PlacesCallBack); }
PlacesCallBack(shape, find, places, moreresults, error) { if(places == null) { return; } var home = places[0]; //first found places var location = home.LatLong; var newShape = new VEShape(VEShapeType.Pushpin, location); newShape.SetDescription(places[0].Name); sTitle = sDescription[iCurrent]; newShape.SetTitle(sTitle); map.AddShape(newShape); map.SetZoomLevel(10); iCurrent++; } </script> <xsl:for-each select="$Rows">
<xsl:call-template name="dvt_1.rowview" />
</xsl:for-each>
</xsl:template>
<xsl:template name="dvt_1.rowview">
<script type="text/javascript">
var description = "<xsl:value-of select="@Title" />";
var sID = "<xsl:value-of select="@ID" />"; var s = "<xsl:value-of select="@Address" />"; s = s + ' '; s = s + "<xsl:value-of select="@City" />"; s = s + ', '; s = s + "<xsl:value-of select="@State" />"; s = s + ' '; s = s + "<xsl:value-of select="@Zip_x0020_Code" />"; sAddress[iCount]= s;
<![CDATA[
description = '<a href=http://site/Lists/addresses/display.aspx?ID=' + sID + '>' + description + '</a>';
]]>
sDescription[iCount] = description;
iCount++; </script> </xsl:template> </xsl:stylesheet>
You can download this at maps.xml (you will need to modify the href to be specific to your site.)
Step 6: Assigning the XSLLink
In SharePoint Designer you need to highlight the DVWP and view the properties. You will need to put the link to the XSL file in the XSLLink property.
Step 7. Adding columns
You may need to add columns depending on what the default view is. Make sure you have all the columns necessary to provide the complete address (address, city, state, and zip code) as well as the Name/Title and the ID. You do this by clicking on the DVMP and then clicking on Options and then clicking on Add/Remove columns as shown below.
You will be presented with a dialog box. Make sure all the required columns are in the right hand column as shown below. More columns won't hurt anything and you may want them if you are going to include additional information in the description.
Step 8. Saving the ASPX page.
When you save the ASPX file in SharePoint Designer it will ask you to save the file. You will want to choose Set Action and set it to pull from the existing file and not overwrite as shown below.
Now you can preview the file and you should see a pushpin on the map for every address.
Breaking it down
Javascript in XSL
The javascript in the XSL shown above is broken into two parts. Everything in the first part will happen once. So, this is where you want to put your globals to keep track of things like how many list items there are and arrays of addresses. You need these globals because the map doesn't get initialized until after the form is displayed. The second part of the javascript gets fired every time a row is retrieved by the XSL. This is where the arrays are populated.
Calling code after the form loads
This is called with the javascript function _spBodyOnLoadFunctionNames.push("GetMap");
_spBodyOnLoadFunctionNames is a special function that takes the name of a javascript function and calls it after the form loads. In this case it calls the function GetMap.
Map.Find
This is the function that can take an address and finds possible locations. Part of the function is a callback function that retrieves the list of possible locations based upon the address. The most likely address is first. In this scenario the callback function is where we add the pushpins based upon the most likely location. In this example the callback function is named PlacesCallBack but you can name it whatever you want.
CDATA
In this example I put a link in the description that involves using the anchor tag (<a></a>). Since this piece of javascript is inside the XSL the parser thinks that anything starting with a < must be part of the XSL. Therefore, any javascript inside the XSL must be surrounded by the CDATA tag which is used in the following way
<![CDATA[ javascript goes here ]]>
Callback Function
The callback function is where the pushpins are added. It is also the place where the zoom is set. That is because the call back function operates asynchronously. In other words the code after map.Find fires before the callback function finishes. If the incrementing of the globals happened outside of the callback function you would get unpredictable results.
6/7/2010
Using addcontentdb is one way to upgrade your SharePoint 2007 content to SharePoint 2010. There are some things to consider when doing it. Addcontentdb is a stsadm command and it takes a lot of resources. I recommend having a lot of free space on your sql server’s hard drives when you run it. At least 5 times the size of the database (more is better) to allow for the log files and content database increase in size. Also, while you are running it the following two databases seem to be locked.
Sharepoint_config
Sharepoint_admincontent
This means you can’t be making changes to those databases (creating web applications, deploying solutions, etc.) while you are upgrading. I have had different experiences with the speed of the operation but it seems to be dependent on the number of site collections more than the size of the content. It can take hours if there are a lot of site collections (as in the case of My Sites for example).
Quick and dirty of how to do the upgrade via addcontentdb
1. User SQL Server (for 2007 site) to back up the content database you want to move over.
2. Copy the backup file to somewhere the SQL Server for the 2010 site can get to it.
3. Restore the backup to the 2010 site
4. Create a web application, but don’t create a top level site collection.
5. Run the stsadm command addcontentdb stsadm –o addcontentdb –url <url of new web application> -databasename <name of restored database>
6. Wait patiently while the database is upgraded. You will now have an upgraded content database that is accessible via the new web url. It will look exactly (hopefully) like the old site. The search settings will not be transferred so you will probably get a scope error if you had any special scopes set up. You can do the Visual Upgrade to individually convert the sites to the new look and feel of SharePoint 2010. You will still have to install the custom web parts and solution to the 2010 environment after the upgrade for them to work. 5/29/2010
Example of Term store. Take the text below and save it into notepad as a CSV file and then import it into the Term Store Manager. You will have a listing of the two digit codes for all 50 US States.
Term Set Name,Term Set Description,LCID,Available for Tagging,Term Description,Level 1 Term,Level 2 Term,Level 3 Term,Level 4 Term,Level 5 Term,Level 6 Term,Level 7 Term States,50 US States,,TRUE,Alabama,AL,,,,,, ,,,TRUE,Alaska,AK,,,,,, ,,,TRUE,Arizona,AZ,,,,,, ,,,TRUE,Arkansas,AR,,,,,, ,,,TRUE,California,CA,,,,,, ,,,TRUE,Colorado,CO,,,,,, ,,,TRUE,Connecticut,CT,,,,,, ,,,TRUE,Delaware,DE,,,,,, ,,,TRUE,Florida,FL,,,,,, ,,,TRUE,Georgia,GA,,,,,, ,,,TRUE,Hawaii,HI,,,,,, ,,,TRUE,Idaho,ID,,,,,, ,,,TRUE,Illinois,IL,,,,,, ,,,TRUE,Indiana,IN,,,,,, ,,,TRUE,Iowa,IA,,,,,, ,,,TRUE,Kentucky,KY,,,,,, ,,,TRUE,Louisiana,LA,,,,,, ,,,TRUE,Maine,ME,,,,,, ,,,TRUE,Maryland,MD,,,,,, ,,,TRUE,Massachusetts,MA,,,,,, ,,,TRUE,Michigan,MI,,,,,, ,,,TRUE,Minnesota,MN,,,,,, ,,,TRUE,Mississippi,MS,,,,,, ,,,TRUE,Missouri,MO,,,,,, ,,,TRUE,Montana,MT,,,,,, ,,,TRUE,Nebraska,NE,,,,,, ,,,TRUE,Nevada,NV,,,,,, ,,,TRUE,New Hampshire,NH,,,,,, ,,,TRUE,New Jersey,NJ,,,,,, ,,,TRUE,New Mexico,NM,,,,,, ,,,TRUE,New York,NY,,,,,, ,,,TRUE,North Carolina,NC,,,,,, ,,,TRUE,North Dakota,ND,,,,,, ,,,TRUE,Ohio,OH,,,,,, ,,,TRUE,Oklahoma,OK,,,,,, ,,,TRUE,Oregon,OR,,,,,, ,,,TRUE,Pennsylvania,PA,,,,,, ,,,TRUE,Rhode Island,RI,,,,,, ,,,TRUE,South Carolina,SC,,,,,, ,,,TRUE,South Dakota,SD,,,,,, ,,,TRUE,Tennessee,TN,,,,,, ,,,TRUE,Texas,TX,,,,,, ,,,TRUE,Utah,UT,,,,,, ,,,TRUE,Vermont,VT,,,,,, ,,,TRUE,Virginia,VI,,,,,, ,,,TRUE,Washington,WA,,,,,, ,,,TRUE,West Virginia,WV,,,,,, ,,,TRUE,Wisconsin,WI,,,,,, ,,,TRUE,Wyoming,WY,,,,,,
5/28/2010When you look at the edit details page there may be a lot of items on there that you don't want users to be bothered with. It is fairly easy to change what shows up on the page by modifying the user profile properties.
For example, if I wanted to remove Distinguished Name from the edit details page (and who doesn't? I mean how many end users need to see that) then I would
- open up Central Administration
-
and click on Manage Service Applications
- Click on User Profile Service Application
- Click on Manage User Properties under the People section
- Scroll down to Distinguished Name and click on that and choose Edit
- In the section called Display Settings you will see Show on the Edit Details page as shown below.
- Uncheck the box.
- The change should be immediate.
5/25/2010There are times you might want to stop a service instance (like the User Profile Synchronization Service) on SharePoint 2010 and the UI is not letting you stop it. This happens in instances where it might get hung up (due to something like a permissions issue). When this happens you will have to use the PowerShell command
stop-spserviceinstance <GUID of service instance>
Since you probably don't know the GUID of your service instance off the top of your head you need to use the following PowerShell command to show all the GUIDs of the service instance.
get-spserviceinstance
This will give you the listing in your powershell window. If you haven't done copy and paste inside the powershell command window it can be a bit tricky. First right click anywhere in the command window and choose Mark and then click on first letter/number of the GUID you want and drag the mouse to the end of the GUID. Then press the Enter key. Now it is in memory so you can right click after your command and choose Paste to put the GUID in.
Note: you need to put single quotes around your GUID and you will be asked to enter a Y or press enter to really stop it.
Example:
stop-spserviceinstance '5e4ae2d7-c364-4395-8cc9-c80dca4 a1c7f'
4/1/2010
This is for installation of the FAST server for SharePoint 2010 (Beta). If you fail to follow the instructions you can cause yourself to spend a lot of time trying to fix it. This is my attempt to help you get on the right road. If you haven’t installed FAST yet please refer to
Instructions: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=a65aef6f-bc99-4b29-81bb-37fce8ad6ea7
Bits: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=bcc37c48-11fb-40a2-8cfb-743de20260f6
Before you install:
· Make sure you have the enterprise version of SharePoint 2010 installed.
· Enterprise features are enabled.
· FAST options appear in the site settings at the site collection level.
After you install FAST (on its own server)
For HTTP these are the applicable ports and values. Note: Ignore the install_info.txt
Make sure the account you are using is in the FAST Administrators group
For FAST Search Content SSA
Content Distributor: FQDN:13329 (no http:// or net.tcp://)
Content Collection name: sp
For FAST Query SSA
Query service location: http://FQDN:13287 Note: If this is not correct the Search Core Results web part will throw an error.
Administration Services: net.tcp://FQDN:13256 Note: If this is not correct the FAST items in the Site Collection Admin section of your site setting will throw an error.
Resource Store Location: http://FQDN:13255
Trouble Shooting
· If your web part always shows empty and you have done the crawls make sure you have setup up the DefaultUserStoreId. This is what trims the items you see. If you fail to do it then you will see nothing. You do this by running the following two commands on the FAST server in PowerShell.
New-FASTSearchSecurityClaimsUserStore -id win Set-FASTSearchSecurityDefaultUserStore -DefaultUserStoreId win
· To check to see if the services are running on the FAST server run the following command in PowerShell.
nctrl status
· To check to see what programs are using what ports run the following command from the command line.
netstat –a –b
· To clear the backend (FAST) content you need to run the following command followed by entering sp. After you run it you can enter Y or hit the enter button to confirm. You do this after you clear the Fast Content SSA.
Clear-FASTSearchContentCollection
· If the query service is not working correctly you might need to tell SharePoint to pull from port 13287 with the following command in PowerShell on the SharePoint server. The fqdn refers to the FAST server.
Set-SPEnterpriseSearchExtendedQueryProperty -SearchApplication "FAST Query SSA" -Identity "FASTSearchQueryServiceLocation" -Value http://fqdn:13287/
· Make sure you remove the comments (both the <!-- and the --> from the lines that contain HTTP_CLAIMS_INSECURE in the file bin\qproxyservice.exe.config. This enable you to use http to get results from the query proxy service.
|
|