Blog Home  Home |  Breeze Home RSS 2.0 Atom 1.0 CDF  
Mick's Breeze Blogs - Biztalk/Sharepoint/... - MOSS
Things hard and not so hard....
 Thursday, August 14, 2008

John Powell has a great article (with piccys) that will hopefully get you out of a pickle.

http://blogs.msdn.com/johnwpowell/archive/2008/08/14/error-configuring-biztalk-sharepoint-adapter-on-sharepoint-sp1.aspx

Thanks John!

Thursday, August 14, 2008 9:56:03 AM (AUS Eastern Standard Time, UTC+10:00)  #    Comments [0]   BizTalk | MOSS | Tips  | 
 Sunday, July 13, 2008

After the more than normal pain in getting this done for my previous post, I decided to post the fruits of my labour (not labor that my wife tells me about watermellons and men wouldn't know the first thing about birth....I'm not about to do the pepsi challenge on that :))

- this is a stock standard Web.Config for a MOSS install NOT a plain WSS install (there's about 3 lines different from a plain WSS install to a MOSS install - mainly anything that references SharePoint.Publishing....)

Grab this and these are the changes that WORK!

Enjoy!

Cheers,

Mick.

Sunday, July 13, 2008 10:38:41 PM (AUS Eastern Standard Time, UTC+10:00)  #    Comments [0]   .NET Developer | MOSS | Silverlight  | 

"Could not load file or assembly 'System.Web.Silverlight, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies."

You're starting to Roll your sleeves up and get dirty with Silverlight 2 Beta 2, load up some of the Silverlight Blueprint for SharePoint Samples, run the installer (it's great that most of these examples have an installer) and Boom! you get the above error!!!

Here's a list I've compiled to get Silverlight working - I'm currently running this on Win2008 IIS7

(1) Install WSS SP1/MOSS SP1 on your SharePoint box if you haven't already. You need the SP1 to support .NET 3.5 calls through SharePoint - my guess is that these tell SharePoint not to intercept the calls and let them go to their rightful owners.

(2) Create a 'dummy' site collection on a test Web Application - e.g. http://localhost:81 - This is so you can see all the changes to the web.config that are made through the installation process, in isolation. By keeping this separate to your usual web.config, you'll be able to merge changes at a later date.

(3) Install the Silverlight 2 Beta 2 runtime and other developer bits - From http://Silverlight.net - VS2008 Developer Bits and just the runtime if you want from here

(4) Do one installation of a Silverlight for BluePrint Sample - the installer creates a 'virtual directory' under your Web Site called ClientBin where the various Silverlight 2 files go (*.js, *.XAP). This is a handy install so you can see what the directory execution settings are required to make this work through SharePoint. i.e. Execute permissions only. Take note of this directory.

(5) Add a IIS MIME type - With Silverlight 2 beta 2 - there is a new file type added which is a *.XAP file type. IIS by default doesn't know how to encode/translate or send these files down over the wire.
Add a mime type of: Extention: xap Mime Type: application/x-silverlight-app to your IIS Test Web Site

(6) Make Web.Config changes - there's a whole series of Web.Config changes to be made to your SharePoint Web Application to support AJAX/.NET 3.5 and now Silverlight.... fortunately other hard working folks have done this for you!!!! :) Bless their cotton socks! - grab the Feature that makes the modifications from here (** NB: you want the 3.5 config feature)

You're almost done........ :)

(7) EXCEPT for the error above!!! After much inspection of your system, you'll realise that you *don't* have that DLL (on a clean install). The Silverlight Ninja will know that this is from Silverlight 2 Beta 1 and not found in the Beta 2 kits!! Yay team!

The System.Web.Silverlight.dll is found in the Silverlight 2 beta 1 SDK - so download that puppy, extract out the DLL and either GAC it, or add it to your BIN directory on your SharePoint site. (I added it to my BIN directory - as I reckon when SL2 is released, this problem would have been resolved)
(**UPDATED: Due to how painful that was, I decided to package up the DLL for you - HERE**)

Here are the Compiled Files - FOR SL2 BETA 2 - they WORK!! :-)

(I grabbed the Blueprint Hello World Web Part and updated to work)

1. Silverlight Web Part DLL

2. Silverlight *.XAP updated for Beta 2, copy straight to the *sub-directory* under your client BIN

3. Sample SharePoint Web.Config with all the changes! :-)

Sunday, July 13, 2008 9:08:09 PM (AUS Eastern Standard Time, UTC+10:00)  #    Comments [4]   .NET Developer | MOSS | Silverlight  | 
 Wednesday, July 02, 2008

There's a great line up this month that are too good to keep secret.

Some fellow CSD experts are lining up for some great topics to give all around Workflow and WCF!!!

Does it get better? Get on and register.

For more, check out the Live Calendar 

Live Webcasts

MSDN Webcast: Transactional Windows Communication Foundation Services with Juval Lowy (Level 200)

Monday, July 7, 2008

10:00 A.M.–11:15 A.M. Pacific Time

MSDN Webcast: Using Windows Workflow Foundation to Build Services with Jon Flanders (Level 300)

Wednesday, July 9, 2008

10:00 A.M.–11:00 A.M. Pacific Time

MSDN Webcast: WCF Extensibility Deep Dive with Jesus Rodriguez (Level 400)

Friday, July 11, 2008

10:00 A.M.–11:00 A.M. Pacific Time

MSDN Webcast: Bringing Enterprise Data to Life with SharePoint Server and Windows Communication Foundation (Level 300)

Friday, July 18, 2008

10:00 A.M.–11:00 A.M. Pacific Time

Wednesday, July 02, 2008 1:41:05 PM (AUS Eastern Standard Time, UTC+10:00)  #    Comments [0]   BizTalk | Insights | RFID | Usergroup | Events | MOSS | Silverlight  | 
 Thursday, May 22, 2008

 

Thursday, May 22, 2008 3:49:28 PM (AUS Eastern Standard Time, UTC+10:00)  #    Comments [0]   MOSS | Tips  | 

Back in V2.0 we had a Web Service that did this sort of stuff for us, now in V3.0 it's delivered straight from the Object Model.

Essentially:

  1. We create a batch of XML which could have 'adds, updates + deletes' in there.
  2. We call the web.ProcessBatchData(xml) method, handing to it our wishes.

This technique is fast, and CAML based :(

So if you need to add 100 items to the list - this would be a way to do it. (I've got to check whether this technique fires event handlers on the lists or whether it's a 'back door' thing)

Note: in the snippet below, the fields are referenced via their namespace#<name>
- you can get the field's details by saving your list 'As a template', downloading the *.stp file, renaming to *.stp.cab, opening it and looking into the *.xml file there.

- you could also call the lists.asmx webservice (..\_vti_bin\lists.asmx) and calling the GetListCollection(); method to see a chunk of describing XML.

   1:  "<ows:Batch OnError=\"Return\">" +
   2:              "<Method ID=\"A1\"><SetList>" + myGuid + "</SetList>" +
   3:                  "<SetVar Name=\"ID\">New</SetVar>" +
   4:                  "<SetVar Name=\"Cmd\">Save</SetVar>" +
   5:                  "<SetVar Name=" +
   6:                      "\"urn:schemas-microsoft-com:office:office#Title\">" +
   7:                      "New Manager</SetVar>" +
   8:                  "<SetVar Name=" +
   9:                      "\"urn:schemas-microsoft-com:office:office#Body\">" +
  10:                      "Congratulations to Mary for her promotion!</SetVar>" +
  11:                  "<SetVar Name=" +
  12:                      "\"urn:schemas-microsoft-com:office:office#Expires\">" +
  13:                      "2003-09-14T00:00:00Z</SetVar>" + 
  14:              "</Method>" 

Here's a small MSDN article on it - http://msdn.microsoft.com/en-us/library/cc404818.aspx

Cheers,

Mick.

Thursday, May 22, 2008 3:39:46 PM (AUS Eastern Standard Time, UTC+10:00)  #    Comments [0]   MOSS | Tips  | 
 Wednesday, May 21, 2008

(it even includes MOSS 2007 BI Dashboards)

This is one of the best BAM posters I have seen to date. As part of your Bat-Utility belt this is a must.

You could even print it out and stick it on the wall in the office....you never know....that raise should come sooner rather than later :)

Download the poster from HERE

Wednesday, May 21, 2008 9:07:29 PM (AUS Eastern Standard Time, UTC+10:00)  #    Comments [0]   BizTalk | MOSS  | 
 Tuesday, May 13, 2008

Clayton sent through a great picture that explains what the main placeholders are on SharePoint Master Pages.

Well done CJ - thanks!

sharepoint_masterpage

Tuesday, May 13, 2008 11:37:37 PM (AUS Eastern Standard Time, UTC+10:00)  #    Comments [2]   MOSS | Tips  | 
 Wednesday, March 19, 2008

Hot off the 'Hot-Cross Bun' RFID Conveyor belt (Happy Easter all also!!!) - myself and local Sharepoint MVP funny man - Ivan Wilson will be delivering the sessions...
(How do you have a conversation with more than 3 MVPs in the room??? you don't- they all talk about themselves :-) - that's mine, not Ivan's)
which will be great news....just have to get the content together...shhhhh...you didn't hear me say that smile_wink

MS Partner Training Schedule in the land of MOSS

This is for an Instructor Led 'Chalk & Talk Session' designed for Pre-sales Technical Consultants, Technical Consultants, Technical Project Managers, Architects and Business Analysts 

Dates First:
Brisbane – April 3 & 4
Melbourne – April 7 & 8
Sydney – April 10 & 11

REGISTER HERE

What is being covered is:

1.     MOSS Capability Overview - a brief discussion of the six major functional areas in SharePoint 2007:

o    Collaboration

o    Portals

o    Search

o    Web Content Management

o    Business Forms

o    Business Intelligence

2.    Understanding the "MOSS Building Blocks" - a description of both the physical and logical components that make up a SharePoint solution. We discuss how they fit together and how you can combine these to ensure your solutions can scale to meet demand

3.    A tour of the Central Administration site - gain an insight into how a SharePoint Farm is administered.

4.    Applications, Site Collections and Subsites - explore the main components used to build any SharePoint site. Learn what capabilities are managed at each level.

5.    Inside a sub-site - now that we understand the high level components we can get into the details of what makes up a subsite. We examine:

o    Document Libraries and the SharePoint Document Management concepts

o    Lists

o    Web Parts

o    Security

o    Navigation Controls

6.    Search - we look into the rich functionality in MOSS to allow users to quickly locate content that exists inside and outside of SharePoint. We look at how the search capabilities are administered and what options are available to fine-tune the search engine to match your client's needs.

7.    Web Content Management - we look at how SharePoint incorporates Web Content Management functionality. This overview includes:

o    Workflows

o    Master Pages

o    Page Layouts

o    Content Deployment

o    Variations

o    Examples of public sites that use MOSS

8.    Business Data Catalog - the BDC provides a framework to gain access to information stored in third-party products. Learn how SharePoint can make use of this content directly within its own environment

REGISTER HERE
Wednesday, March 19, 2008 2:24:59 PM (AUS Eastern Standard Time, UTC+10:00)  #    Comments [0]   General | MOSS | Training  | 
 Wednesday, February 13, 2008

Went and caught a session by Chris Johnson around the Studio extensions for Sharepoint, an area that needs to catch up with the pace of the adoption of the product :-)

This Visual Studio Integrated toolset goes a long long way in bridging the gap and streamlining development in Sharepoint.
Features, manifest explorer etc etc.

One of the biggest features in this release is the ability to control the Sharepoint Solution Deployment process for e.g. Chris originally created a solution with 3 Features in it, where he drag' dropped the 3 Feature elements into 1 Feature.

http://blogs.msdn.com/cjohnson/archive/2008/02/12/visual-studio-2005-extensions-for-windows-sharepoint-services-3-0-version-1-1-rtm-user-guide-part-1.aspx

Enjoy!!!

Wednesday, February 13, 2008 11:51:50 AM (AUS Eastern Standard Time, UTC+10:00)  #    Comments [0]   .NET Developer | MOSS  | 
 Monday, February 11, 2008

Wow - a BizTalk adapter Pack announcement is looming (ready March 1 actually).

What is the BizTalk Adapter Pack?? I hear you ask.....I did too when I first heard of it.

Quick Bit of History
- 'Adapters' was a term typically used within a BizTalk space and to build adapters in BizTalk was a 'character' building experience where several COM interfaces needed to be implemented (with some of those interface's origins being in the year 2000!)
- for all that dev effort the 'adapters' only lived in BizTalk -land.

Wouldn't it be great to utilise your Adapter from other 'hosts' or environments such as Word/Sharepoint/Access/MS Project/BizTalk/Your Website etc etc....
(this is a very similar case to the initial *.OCX controls that came out. These controls were based on *.VBX which is something written in VB3 and used in the VB3 environment. Access/C/C++ developers had to duplicate the effort if they wanted similar functionality in their system)

WCF LOB Adapter SDK is the essence here.
- with BizTalk 2006 R2 on the scene, it comes with a 'new' adapter and new adapter 'style' known to trained BizTalk Ninjas as WCF Custom Adapter or BizTalk Adapter Framework V2.0
- so the LOB Adapter SDK is:

  • Free
  • .NET based
  • A Framework and VSNET project template
  • Allows you to build custom 'adapters'
  • Does alot of the heavy lifting for you.
  • Search/Browse/Consume WCF Service metadata
  • Able to be hosted in .NET/.NET related Host environment (BizTalk could be one of these :-)

Enter the (Supported)BizTalk Adapter Pack - (Help files Here)

So the BizTalk team have been busy building on top of the WCF LOB SDK to provide 3 .NET Adapters (at this stage) which allow connections to:

  • SAP
  • Siebel
  • Oracle - Database

So at this point you can grab these adapters and connect straight away - this bridges the gap between you and those systems.
For e.g. Sharepoint can connect straight away, the BDC can connect, your .NET app etc.

The fact it's supported and ready to roll makes it attractive :-)

Briefly the implementation details is that these 3 'adapters' are implemented as WCF Proxy Clients with a custom transport. Any application using these will essentially be calling a 'proxy' to a pretend WCF Service, where the 'Service' is the back end system with the WCF Transport implementing the appropriate features.

The word on the street about Pricing is that it will be under US$6000 and if you have BTS R2 with SA you get the adapter pack. For the rest of us, you need to weigh up the fact how long is it going to take you or your team to develop those adapters/connectors????. Licensing is per CPU.

Just to re-iterate, you do *not* need BizTalk in any version, any way shape or form to run this - you could run BTS Adapter pack from a console app.

Monday, February 11, 2008 3:43:59 PM (AUS Eastern Standard Time, UTC+10:00)  #    Comments [0]   BizTalk | Insights | MOSS | Tips  | 
 Thursday, December 13, 2007

Well firstly - I've got to say this comes off the back of a great Sharepoint MVP and collegue of mine Ishai Sagi. Big THANKS Ishai!!!

Typically my experience with the DataFormWebPart has been through the eyes of Sharepoint Designer - open pages with webparts on them and looking at the XML configuration of these parts. It look pretty ugly AND very site/web specific - IDs all over the place etc etc.

Ishai the wealth of knowledge came up with this solution - by overriding the SetDataSourceProperties method, you can effectively create a datasource from anywhere!!!! Forgetting the IDs etc that cause all the pain.

I've marked the 2 important lines with (**) in the code.

Big Thanks Ishai!!! Folks he's always one to watch - lock his blog in and learn!! :)

Ishai mentioned that his code below is purely for educational purposes

using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;
using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;
using System.Data;
using System.Xml;

namespace AdvancedQueryWebPart
{
[Guid("46a8853d-415c-458e-990c-419c12fa04f5")]
public class AdvancedQueryWebPart : DataFormWebPart, IWebPart
{
public AdvancedQueryWebPart()
{
this.ExportMode = WebPartExportMode.All;
}

protected override void SetDataSourceProperties()
{
   try
   {
      // Call a custom function that returns the data you want to show as a data table
      DataTable results = GetCustomData();
      if (results.Rows.Count > 0)
      {
         // generate xml for selected items
         XmlDocument doc = new XmlDocument();
         XmlNode root = doc.AppendChild(doc.CreateElement("Rows"));
         foreach (DataRow row in results.Rows)
         {
            XmlElement rowNode = doc.CreateElement("row");
            foreach (DataColumn col in row.Table.Columns)
            {
               string val = row[col].ToString();
               XmlAttribute att = doc.CreateAttribute(col.ColumnName);
               att.Value = val;
               rowNode.Attributes.Append(att);
            }
            root.AppendChild(rowNode);
         }
         // create an XmlDatasource with the new data, and set it to cache for one second
         XmlDataSource ds = new XmlDataSource();
         ds.CacheDuration = 1;
         ds.Data = doc.InnerXml;
         // bind the web part to the xml
(**)     this.DataSource = ds;
(**)     this.DataBind(true);
       }
       else
       {
         Label noResults = new Label();
         noResults.Text = "No results were found";
         this.Controls.Add(noResults);
       }
   }
   catch (Exception ex)
   {
      Label lblError = new Label();
      lblError.Text = ex.ToString();
      this.Controls.Add(lblError);
   }
   base.SetDataSourceProperties();
}

private DataTable GetCustomData()
{
   try
   {
      SPWeb webSite = SPContext.Current.Web;
      SPSiteDataQuery query = new SPSiteDataQuery();
      //look only in document libraries
      query.Lists = "<Lists ServerTemplate=\"101\" />";