Category Archives: Microsoft Silverlight
Microsoft SharePoint Foundation 2010 is the fast growing corporate intranet portal gaining momentum in the development community and businesses. Powerful collaborative platform attracts developers and business users finding creative ways to utilize easy-to-build custom lists integrated with user generated content.
Developers soon discover that the custom list capabilities are limited and Microsoft does not recommend creating lists exceeding a couple of thousand records. The natural solution is the traditional database. Fortunately the development of applications based on Microsoft SharePoint is very simple. Install SharePoint Foundation 2010, build your app using Visual Studio 2010 and deploy to the server instance from Visual Studio.
There is a downside as well. It is your responsibility to write the code interacting with the database and presenting the results to the end users.
Code On Time and SharePoint Factory will greatly simplify the production of powerful database web applications that can be deployed natively to Microsoft SharePoint portals. These web applications will have a perfect visual match to SharePoint user interface elements. Generated web applications will provide data filtering and searching capabilities exceeding the comparable features of custom SharePoint lists while handling database tables of any size.
Installing Development Tools
Start by installing a Microsoft Foundation 2010 on your Windows 2008 or Windows 7 machine. We have compiled a useful tutorial that guides through the SharePoint Foundation 2010 installation steps.
Download and install Visual Web Developer Express and SharePoint Tools.
For the purpose of this tutorial we will create a web application that uses Microsoft SQL Server as the database backend.
Building a SharePoint Factory Project
Start Code On Time and select SharePoint Factory in the list of available project types.
Enter the project name and select the programming language that must be used to generate the project source code.
Click Create and validate the connection to your SharePoint instance.
Proceed to the Database Connection page of the project wizard. Click the button next to the Connection String input field. Enter the server name. If you are connecting to SQL Express instance then enter “.\SQLExpress”. If you have an instance of SQL Server then enter “.” in the Server field. Configure the login identity.
We will create a blank database and populate this database with the sample Northwind dataset. You can connect to an existing database if you wish.
Enter “SharePointNorthwindDemo” in the Database field and click Create button, select “Northwind” in the Sample Tables drop down and click Install.
Click OK button and continue to Reporting page of the project wizard. Enable dynamic and static reports and proceed to the Features page.
Activate Package Properties section and enter the title and description values as shown in the picture.
Click Next a few times until your reach the page displaying a summary of application data controllers. Proceed to generate the web application.
A sample web site will launch in the default browser when the web application code generation is over.
The web application displayed in the web browser does look a lot like Microsoft SharePoint portal. In fact, this is a sample ASP.NET web site created as a part of your project to allow quick prototyping and design that does not involve the actual instance of the portal.
The right-hand side of the page presents an area similar to the actual SharePoint Web Part property editor. Select the logical application page constructed by the code generator to activate the Preview mode.
Click OK button and you will see the selected logical application page in action.
Use Code On Time designer to customize the web application as needed.
Deploying SharePoint Factory Web Applications
The constructed web application solution include a special project that implements a single SharePoint 2010 web part. Web parts are building block of SharePoint sites.
Here is how you can deploy the application to the SharePoint portal installed on your computer.
Select the project name on the start page of the web application generator and click Publish.
The code generator will package the application for deployment and in a few short moments you will see a Windows prompt asking to allow the command line processor to alter settings on your computer.
The prompt will be launched to execute a Windows PowerShell installation script that requires elevated permission to run. The script will deploy your application to the SharePoint instance on your computer.
You will also see a folder with binary files that can be passed to your network for deployment on the production server. Notice that Deploy.bat and Retract.bat batch files are configured to run specifically on your computer and the administrator will have to change them to work correctly in the production environment.
Both batch files require elevated permissions to run. You can retract or re-deploy your web application if you right-click the corresponding file and choose “Run As administrator” option.
Using Generated Web Application in SharePoint
If the deployment has been successful then you are ready to start using your web application.
Launch a web browser and navigate to your local SharePoint instance. The following page will be displayed.
Create a new page by selecting Site Actions | New Page option in the menu.
Enter “Products” as the page name field and click Create button.
The new page will be displayed in design mode.
Select Insert tab on the ribbon and click Web Part button.
Select Web Apps under categories. You should see the single web part named “Share Point Factory Demo” listed under the category.
Click Add button to insert the web part in the page.
You will see the instruction in the main area of the page suggesting to select the logical application page. This is the default message rendered by your application when the web part is inserted in the page layout.
Choose Edit Web Part option in the context menu of the web part on the page.
Select the logical page Categories | Products and click OK button.
Exit page design mode and try interacting with your web application.
The next screen shot shows a SharePoint Factory web application up and running in the actual SharePoint portal.
The IIS Live Smooth Streaming extension for Internet Information Services (IIS) allows you to set up a web server as a Live Smooth Streaming server that delivers compelling, uninterrupted live video streams that instantly adjust quality (bitrate) to match changing network and CPU conditions at the client.
Live Smooth Streaming enables adaptive streaming of live events to Smooth Streaming-compatible clients, such as Microsoft Silverlight. Using HTTP to deliver a live web broadcast leverages the scale of existing HTTP networks by keeping content close to the user and making true HD (720p+) a realistic option for web broadcasts. The additional advantage of using HTTP-based delivery for live events is that the existing HTTP infrastructure provides much more availability. For many popular live web broadcasts, content providers and content distribution networks (CDNs) want to know how much capacity they can dedicate on their resource-constrained streaming networks. By using their primary HTTP networks, which are typically 10-to-20-times larger than their streaming networks, they don’t have to worry about maximizing network capacity and limiting the number of users for live events.
A Live Smooth Streaming server sources content from Live Smooth Streaming-capable encoders for delivery to Smooth-Streaming compatible clients. In addition to Microsoft Expression Encoder, there are many third-party encoding solutions available for encoding both live and on-demand Smooth Streaming video in production environments. To help you determine which encoding solution is best-suited for your Smooth Streaming configuration, see our list of encoding parters.
In this walkthrough:
- Setting Up a Live Smooth Streaming Web Server
- Creating a Live Smooth Streaming Publishing Point
- Pushing a Stream to the Live Smooth Streaming Publishing Point
- Serving the Live Stream to Clients
To install IIS Live Smooth Streaming, see the IIS Media Services Readme Installation Notes. This walkthrough describes how to set up a Live Smooth Streaming server using IIS Live Smooth Streaming in IIS Media Services 4.0, so be sure to select this version of IIS Media Services for installation.
After installation is completed, to verify that the Live Smooth Streaming extension is installed correctly, click the server name in the Connections pane in IIS Manager and then locate the Live Smooth Streaming icon in the Media Services area.
Note If IIS Manager was running during the installation process, you might need to restart it to see Live Smooth Streaming.
This section describes how to create a publishing point that can accept a live broadcast from a Live Smooth Streaming-capable encoder.
- In IIS Manager, select the desired website or virtual directory, and then double-click the Live Smooth Streaming Publishing Points icon.
- On the Live Smooth Streaming Publishing Points page, in the Actions pane, click Add.
- In the Add Publishing Point dialog box, on the Basic Settings tab, enter the following information:
- File name. Enter a name for the Live Smooth Streaming publishing point definition file. In this example and throughout the rest of this walkthrough, we’ll use the file name LiveSmoothStream. If you specify a different file name, be sure to substitute it appropriately as you follow the steps in this walkthrough.
- Estimated duration. If known, enter the duration (in hours:minutes:seconds) of the live event so that the Silverlight-based client can scale its Seek bar to the length of the content. In our example, we use an event duration of 1 hour (01:00:00).
- Live source type. In our example, the Live Smooth Streaming server is an “origin server” that receives the content that’s pushed to it from an encoder; therefore, we select the default Push option.
Note The Pull option for Live source type configures the publishing point to “pull” content from a publishing point on another Live Smooth Streaming server. This is a common configuration for content syndication. For more information, see Syndicating Live Smooth Streams between Servers.
- On the Advanced Settings tab, select the Start publishing point automatically upon first client request check box. This setting allows an encoder to connect to the publishing point when the broadcast starts. Connection errors might occur if you don’t enable this setting.
For more information about the additional settings that you can configure on the Advanced Settings tab, see Add/Edit Publishing Point Dialog Box.
- If you want to deliver live streams to Apple® mobile digital devices, on the Mobile Devices tab, select the Enable output to Apple mobile digital devices check box.
Important Before proceeding, be sure to check out the the following walkthrough article for more information about the requirements and publishing point configuration for Apple HTTP Live Smooth Streaming: Apple HTTP Live Streaming with IIS Media Services.
- In the Add Publishing Point dialog box, click OK. A new Live Smooth Streaming publishing point definition file named LiveSmoothStream.isml is added to the website root.
- On the Live Smooth Streaming Publishing Points page, select the publishing point, and then in the Actions pane, click Start Publishing Point.
- The publishing point State value changes from Idle to Starting, which means it’s waiting for external data (in this case, a live stream pushed to it from an encoder).
Because we haven’t configured an encoder to push live streams to the publishing point yet, the Publishing Point Summary panel shows that there are no incoming streams.
Note The Summary panel for Live Smooth Streaming publishing points in IIS Media Services 4 displays summary information about the live Smooth Streams that are received from all live sources (such as encoders or other Live Smooth Streaming publishing points) by the selected publishing point. You can also view details about the tracks within all of the live streams, and stream origin and destination information, in the Publishing Point Details page. For more information, see Viewing Publishing Point Details.
Note After the publishing point begins receiving data from an encoder, its State value changes to Started. However, due to a known issue, the change in the State value isn’t visible until after you refresh the Live Smooth Streaming Publishing Points page in IIS Manager.
- See the next section, which describes how to configure Microsoft Expression Encoder to push data to this publishing point.
This section describes how to create a Live Smooth Streaming broadcast in Microsoft Expression Encoder 4 and push it to the Live Smooth Streaming publishing point that you configured in the previous section. The steps in this section outline a general workflow, with details only on the specific tasks that you need to create Live Smooth Streaming output. For detailed information about how to create a live broadcast from various live and file-based sources in Expression Encoder 4, including how to assemble a complete program, encode it, encrypt it with Digital Rights Management (DRM), and instantly distribute it to your audience using Smooth Streaming technology, see Creating a Live Broadcasting Project.
Important If you enabled the publishing point to stream content to Apple devices, such as iPhone® and iPad™ devices, be sure to review the encoding requirements and settings outlined in Apple HTTP Live Streaming with IIS Media Services.
Note Live Smooth Streaming is available only in Microsoft Expression Encoder Pro.
- Start Expression Encoder (click Start > All Programs > Microsoft Expression > Microsoft Expression Encoder 4).
- In the Load a new project dialog box, select Live Broadcasting Project.
- Set up the source to use for your live broadcast. For File Sources, you can use audio or video sources in any file format that Expression Encoder can import. For Live Sources, you can connect multiple camera devices, such as USB webcams or FireWire (IEEE 1394) digital video cameras. Although you can connect multiple live sources, you can stream only one at a time.
- On the Presets tab, choose an encoding preset that supports the bit rates and encoding requirements for your Live Smooth Streaming scenario. Be sure to choose a preset with IIS Smooth Streaming in the preset name, and then click Apply.
To find out more information about a preset, such as the numbers of streams in the output and the codecs used, hover your mouse pointer over a preset name. The preset information is displayed in a box.
Note Clicking the Apply button automatically updates the Output Format, Video, and Audio settings on the Encode tab with the values used by the selected preset.
You can choose to not select a preset and specify your own values for the Output Format, Video, and Audio options on the Encode tab instead.
- On the Output tab, if the Streaming check box is present, select it to activate streaming.
To publish your content, select Publishing Point, and then in the Location box, type the URL of the Live Smooth Smooth Streaming publishing point that you want to publish your live broadcast to.
URL syntax: http://ServerName/SiteName/DirectoryName/PublishingPointDefinitionFileName.isml
For the example Live Smooth Streaming publishing point that we created in the previous section, the URL would be:
Note You can click the Connect button to test the connection to the publishing point after you specify its URL in the Location box. The publishing point must be started for the connection to be validated.
- If you want to add Digital Rights Management (DRM) to your content, select Digital Rights Management on the Output tab, and then specify DRM options. For more information, see Set DRM options.
Note The license provided for a Live Smooth Streaming session is non-persistent, meaning that after the user closes the client application being used to view the web broadcast, the license expires.
Important You shouldn’t use the DRM setting if you want to stream the content to Apple devices. To provide protected content to Apple devices, you can configure the Live Smooth Streaming publishing point to encrypt the content by using the Advanced Encryption Standard (AES) with a 128-bit key. For more information about how to configure Apple AES-128 encryption, see Add/Edit Publishing Point Dialog Box.
- Click Cue to enable your source for broadcasting (a cued file source is shown in the following figure)…
…and then click Start to begin your live broadcast.
As the broadcast runs, you can monitor Statistics and Connections data in the corresponding panels.
This section describes how to use the Microsoft Silverlight Media Framework 2.0 SmoothStreamingPlayer.XAP, a sample player that can easily be embedded in your website to enable client playback of Smooth Streaming media.
Important Apple devices use an HTML 5 webpage to play the Live Smooth Streaming presentation. If you enabled the publishing point to stream content to Apple devices, see Creating an HTML 5 page for use in Safari.
Note The latest version of Microsoft Silverlight must be installed on the client computer that you want to use to observe Live Smooth Streaming.
- On the web server, click the following link to download the sample player executable file: SmoothStreamingPlayer.exe.
- To extract the sample player files immediately, click Run.
To copy the sample player files to your web server in order to extract them at a later time, click Save, and then open the file from the saved location.
- When you are prompted for a location to store the extracted sample player files, enter the directory path of a temporary folder on your desktop. For example:
- Open the temporary desktop folder, review the terms in the End User License Agreement (EULA) file, and then right-click the zipped folder and click Extract All to extract the sample player files.
- When you are asked to select the destination folder to which the sample player files will be extracted, select a website or virtual directory that you want to use for client access to the live broadcast. In our example, we extract the files to the default website, which also contains the Live Smooth Streaming publishing point definition file (LiveSmoothStream.isml).
- To view the sample player files, in IIS Manager, open the website or virtual directory in Content View.
The following files are included in the download:
- Smooth Streaming Player-ReadMe.doc. Configuration instructions.
- SmoothStreamingPlayer.html. A sample webpage in which you must update the media reference to your live broadcast, and if necessary, width and height attributes to achieve a presentation size that fits your website design.
- SmoothStreamingPlayer.xap. A sample Smooth Streaming player.
- In a text editor, such as Notepad, open SmoothStreamingPlayer.html and update the mediaurl attribute value with the fully qualified URL of the Live Smooth Streaming publishing point definition (.isml) file. In our example, this is:
If necessary, also update the width and height attributes to appropriate values for your website design. For complete instructions, see the Readme file (Smooth Streaming Player-ReadMe.doc).
- In a web browser on the client computer, download the sample webpage from the web server and begin viewing the stream. In our example, in the web browser address bar, type http://IISMedia-Server/SmoothStreamingPlayer.html.
The Live Smooth Streaming broadcast opens in the web browser, using the Silverlight browser plug-in for Live Smooth Streaming.
For more information about how to to build rich Silverlight user experiences that take full advantage of live and on-demand IIS Smooth Streaming capabilities, see Smooth Streaming Client.