Ph: 20310050
Jan
12

I had a strange problem today with a single WFE server that was hosted behind an ISA server with off-box ssl termination.
AAM was configured as per below.

http://sp

Default

http://sp

https://sharepoint.client.com

Intranet

https://sharepoint.client.com

http://spwfe2010.internal.client.hoster.com

Intranet

https://sharepoint.client.com

 

Default zone configured so that indexing would work (sp was an entry in the hosts file resolving to 127.0.0.1)
Intranet zone (as this is a hosted Intranet for the client) configured to support ISA reverse proxy.

The site appeared to work for the most part but any javascript generated links in the pages contained http://spwfe2010... in the url rather than https://sharepoint...

The nearest description to this problem I could find was a MOSS 2007 TechNet article on troubleshooting AAM issues that said…

Mistake 3: Trying to reuse the same URL in alternate access mapping or not aligning the URLs to the same zone

This is a mistake that often catches people when they configure Office SharePoint Server 2007 to expose a Web application to both their internal network and the Internet. For example, if you have configured a Web application on your corporate network with "http://sharepoint" as your Default zone URL and you want to expose it to the Internet as http://www.contoso.com, you might configure your reverse proxy server to forward the requests to http://sharepoint and then add http://www.contoso.com as a public URL to the Internet zone. This is a mistake. While access to the site from your corporate network will continue to work as expected, you might find that access from the Internet is not working very well and there are several links pointing to http://sharepoint. This is because the two URLs have been entered into different alternate access mapping zones and therefore are not associated with each other.

I wasn't using the same url in two zones but spwfe2010 was the NetBios name of the server so maybe it was somehow associated with the IIS Default site (not the default Zone) and that affected some internal SharePoint process for generating translated links.

Anyway, creating a new DNS entry (A Record) in the hosting environment (spisa.internal.client.hoster.com), update IIS Host Header and AAM Internal url to this, fixed the problem.

Normally I would create unique DNS entries for everything but as this server was hosted by an ISP and I only had remote access to the SharePoint server, I wanted to minimise the number of change requests. Lesson learnt, don't take shortcuts.

 

Categories:

 
Dec
4

This was a simple solution I built for a SharePoint user group presentation to show the power of Lists.

Videos can be added to list items as attachments and when the list item is opened, the video is embedded in the list view item page using Silverlight.

Yes, I know Microsoft created the Asset library but you don't get that feature with SharePoint Foundation. I could have also used a document library to store the video but then it would have had anything to do with the topic of my user group presentation;-) It also seemed much easier to initiate the "New" item process from a list rather than a document library which would have involved a 2 step process (upload video then edit properties to add metadata).

It is interesting to look at how attachments are handled in lists. You can see via SharePoint Designer that each attachment is stored in a sub folder

I could even get to these folder from Windows Explorer (\\server\davwwwroot\training\Lists\Videos\Attachments\1)

In this solution I make use of the lists web service to access the attachments.

The solution is made up of a web part page, custom list item display form and 2 lists.

The web part page looks like this and has 2 web parts with a connection so that selecting a product will filter the list of relevant videos.

The display item page looks like this and has the video player for the list item attachment included on the page.

The 2 lists are defined as follows:

List: Products (based on Custom list template)

 

Column: Title

Rename field to Product

Column: icon (Hyperlink or Picture column)

OOTB Attachment support. Upload icon as attachment to list item and copy the attachment url into this field (could be automated with workflow or calculated column + script).

Better solution from ArtfulBits: http://j.mp/y5RqZa

Other list settings

Default view sort order: By Title

Hide from quick launce navigation

Search items in this list disabled

 

List: Videos (based on Custom list template)

 

Column: Title

Rename field to Product

Column: Description

Multiple lines of text (plain text is easier to deal with in the data view web part).

Column: Product (lookup to Products – Title)

 

Column: Level (Choice)

Beginner

Intermediate

Advanced

Column: Topic (Choice)

This is used to group short videos into a series.

What's New

(allow Fill-in choices)

Other list settings

Upload video as attachment to list item

Default view sort order: By Title

Default view group by: Series

 

The web part page can be created entirely in the browser UI. I find it useful to disable the Tabular View option in the web part view to remove the row selection tick boxes.

The connection can only be made when the page is in edit mode.

Note: I found a bug – because the connection is based on a lookup field, the web part connection will fail for product titles that have a space in them. This can only be fixed by editing the connection in SharePoint Designer.
It seems the ddwrt:ConnEncode(string(@Title)) puts %20 in place of a space but the receiving web part the string comparison doesn't decode the connection parameter so it doesn't find a match.
If you do fix this problem in SPD (as I did), never edit the web part connection in the browser, otherwise you lose your customization (as I did while writing this)

The Display Item page is edited with SharePoint designer to hide the default web part and add 2 additional web parts:

Hide the default List Form web part by setting the web part properties Layout/Hidden value to True.

Add a Data View web part of the Videos List with only the Title and Description fields visible. Because I built this so that it would work with SharePoint Foundation I didn't include rating or tagging fields but these would be great additions if you do have the full server version:

Create a parameter for the web part to get the current list item ID from the URL

Set the Paging limit to 1 item.

You should test the page at this point to check that the correct item is displayed in the page when you select to view it from the list.

Add a new SOAP Services Data Source called VideoAttachments with the following settings:

Note: listName GUID value can be obtained from the List settings page. listItemID is set to 1 as a default value but will be replaced at runtime by the web part connection.

Add another Data View to the page for the VideoAttachment data source:

In the code view for the web part, find the <xsl:template name="dvt_1.rowview"> and after the first <table> tag within this template, place the following code:

<tr>

    <td width="75%" class="ms-vb">

        <div id="silverlightControlHost{generate-id()}">

        <xsl:text disable-output-escaping="yes"><![CDATA[<object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="640" height="480">

        <param name="source" value="/training/VideoPlayer.xap" />

        <param name="background" value="white" />

        <param name="initParams" value="m=]]></xsl:text>

        http://<xsl:value-of select="$Hosturl" /><xsl:value-of select="$relVideoUrl" />

<xsl:text disable-output-escaping="yes"><![CDATA[">

<param name="minruntimeversion" value="2.0.31005.0" />

<a href="http://go.microsoft.com/fwlink/?LinkId=124807" style="text-decoration: none;"><img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /></a>

        </object>]]></xsl:text>

        </div>http://<xsl:value-of select="$Hosturl" /><xsl:value-of select="$relVideoUrl" />

</td>

</tr>

Note: Download VideoPlayer.xap from codeplex.com http://slvideoplayer.codeplex.com/ and place in folder or library (training document library in my case). Copy paste this code via Notepad if required.

Create a web part connection between the 2 new web parts on the page.

Next step is to connect to another web part on this page, then…

After saving the page, you can test it out from the Videos list by selecting an item to view.

Clicking on an an item from the web part page should also display the video.

One important lesson I learnt from building this solution, be careful of absolute URL's if you are using Alternate Access Mappings (AAM). When you create a SOAP data source in SharePoint designer, the resulting dataview configuration FQDN address for the SharePoint web service is not AAM aware. Edit the data source xml file in SharePoint Designer before you add the DVWP to a page or edit the DVWP directly to make the web service URL relative.


 
Aug
26

Avi Sujeeth has produced a version of the Productivity Hub as a SharePoint Sandbox solution and created a Policy Hub derivative.

This is the Office 365 site I used in my TechED New Zealand demo.

Download it from https://skydrive.live.com/?cid=756B7CB9E93C55A0&id=756B7CB9E93C55A0!2525&sc=documents#!/?cid=756B7CB9E93C55A0&id=756B7CB9E93C55A0%212525&sc=documents&group=0&sff=0

Categories:

 
Aug
20

If you have used SharePoint 2010 to store documents in a document library you will know that users are prompted to download and save them rather than just opening in the default PDF reader application.

This annoying behaviour can be change by disabling Strict Browser File Handling in the web application general settings (Permissive mode). Why a farm administrator can't specify the extensions that are "safe" we will probably never know.

[Update: you can specify individual extensions via Windows Powershell, but not on Office 365 (thanks Nick).

 $app = Get-SPWebApplication http://myWebApp 
 $app.AllowedInlineDownloadedMimeTypes.add("application/pdf") 
 $app.Update()

If you do this you take on the risk of cross-site scripting attacks via bugs in the PDF application installed on your desktop]

The problem in Office 365 is that you can't disable safe file handling or add individual file exclusions.

I found a work around which can be implemented in multiple ways.

It is based on some HTML/JavaScript that will render the PDF inside an HTML page using the PDF Reader installed on the client.

document.write('<object data="filename.pdf" type="application/pdf" width="99%" height="700" ></OBJECT>');

I have used this in the DisplayForm.aspx page of a document library to show the PDF file under the properties by editing the form page with SharePoint designer and adding the following code (use the Form Web Part and replace the html/script in it with this):

<![CDATA[

<div>
    <script type="text/javascript" >
    var fileName = document.getElementById('SPFieldFile').getElementsByTagName('a')[0]; //filename from field on page
    var fileExt = fileName.href.split('.').pop().toLowerCase(); //get file extension
    if (fileExt == "pdf"){
     document.write('<object data="' + fileName.href + '" type="application/pdf" width="99%" height="700" ></OBJECT>');
    }
    </script>
</div>
]]>

Results in this…

You could use a similar approach in the AllItems.aspx page.

This would probably work with XPS documents also.

Categories:

 
Jun
22

The recently released SharePoint 2010 Adoption Kit includes a site template you can install on your SharePoint server.

The videos link out to the Internet but you can change this if users are blocked from playing Internet videos or you want to make use of your own Windows Media Server.

I have hosted a copy of the site template up on http://www.spsdemo.com/sites/adoption

Categories:

 
Apr
28

​I thought I would share a term set that I have created using Wictor Wilén's Excel Macro Template.

It is a list of countries grouped by region. The USA is a region to allow for the selection of states without this causing a 3rd level (silly decision on my part but I'm not going to change it at this stage). The regions are able to be selected as terms but you could set this to false for each region before importing.

Download...

 
Apr
23

New in SharePoint 2010 Administration Toolkit 2.0, the SharePoint Diagnostic Studio 2010 (SPDiag 3.0) provides SharePoint administrators with a unified interface that can be used to gather relevant information from a farm, display the results in a meaningful way, identify performance issues, and share or export the collected data and reports for analysis.

Before you try and use the Diagnostic Studio, follow the steps in the online help http://technet.microsoft.com/en-us/library/hh144782.aspx to enable remoting using the following Windows Powershell commands:

Enable-PSRemoting
Enable-WSManCredSSP server

Sample output from my farm:

Categories:

 
Mar
29
Categories:SharePoint 2010

 
Mar
20
One of the most overlooked features of using content types in document libraries is the ability to define a custom Document Information Panel (DIP). This video shows a much simpler way to create the DIP than I have been doing it in the past, like this http://www.wssdemo.com/Blog/Lists/Posts/ViewPost.aspx?ID=462 (even I am learning new things about SharePoint after all these years;-)
 
Categories:

 
Mar
19

This is my PowerPoint presentation from the New Zealand SharePoint conference.

 
Hosted by http://office.live.com
Categories:SharePoint

 


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser