Friday, July 31, 2009

Display a list view in InfoPath

If you want to display all entries from a SharePoint list inside your InfoPath form, browser enabled or not, then do the following.

You have a list in SharePoint already, right..
Add a data connection to that list the usual way in InfoPath
Open the "Data source" in the right task pane and select the list (it is listed as a Secondary):


Right click it and select "Repeating table" and drag and drop it to your form



The list is displayed with all entries:


Wednesday, July 29, 2009

Stream a wmv file

If you upload a .wmv file to a library in SharePoint you will be asked if you want to "Open" or "Save" the file, as usual:


















But if you want the user to be able to stream the file directly, without being presented that message box, then you must perform some more steps. Create a new virtual directory on your SharePoint site inside the IIS (in the inetpub folder, wss, virtual directores, and then the sites folder), I named mine to "Webcasts". Upload the wmv file to that Webcasts directory. Edit the directory security on the Virtual directory to Anonymous so that the user doesn't get a login prompt.

Then create a new file inside the Webcasts-directory with the extension .wvx. This will trigger the wmv file and stream it directly inside Windows Media Player.

Open a text editor, such as Notepad. Type the following metafile script, but replace the URL with that of your file. Reference the audio or video file just as you would any other Web file:



You can place the metafile in the same folder as that of your digital media file. If you do so, you can use a relative path, which is simply the name of the file. The REF line would look like this:

add a href tag with only the filename: yourfile.wmv

Save the text file using the name of your digital media file followed by the .wvx extension if the metafile points to a file with a .wmv extension, or .wax if the metafile points to a file with a .wma extension, such as YourFile.wvx. You can also use the .asx file name extension for either audio or video.

Now, when you add the link to this wvx file by typing http://yoursharepointsite/webcasts/yourfile.wvx then the media file will stream in Media Player.

Friday, July 10, 2009

Error 6398

This is my platform:

A server farm with one SQL Server and one WSS 3 SP2 server (win server 2003). I have installed Search Server Express 2008 with Swedish language packs. Everything is working fine, the search is up and running and all. But, in Event Viewer I got this error message each time the indexer started (and I hate to have error messages, it is so disturbing! I want a clean log!):

Event Type: Error
Event Source: Windows SharePoint Services 3
Event Category: Timer
Event ID: 6398
Date: 2009-07-10
Time: 14:30:01
User: N/A
Computer: XXX
Description:The Execute method of job definition Microsoft.SharePoint.Search.Administration.SPSearchJobDefinition (ID aeb1e8f1-9341-417b-ab76-9442095f1019) threw an exception. More information is included below.

Retrieving the COM class factory for component with CLSID {629DA12E-9AD5-4FEC-B886-42C5982C5109} failed due to the following error: 80070422.

Hm. Looked in Central Administration on "Services on server", and both services were started there, that is Office Server Search and WSS Search. BUT, when I looked in Services (from the Control Panel) then the "Windows SharePoint Services Search" was disabled. Started it, and now all errors are gone.