Welcome to MSDN Blogs Sign in | Join | Help

I was reviewing accessibility information today and found a quick list from the W3C that might be helpful to all Web developers. Also, it looks the link below includes these quick tips as a free business-card-size reference card (up to 500 cards are available at no charge). Cool!

W3C - Quick Tips to Make Accessible Web Sites

 

 -- Erik Reitan

ASP.NET User Education

This posting is provided "AS IS" with no warranties, and confers no rights.

 

This post shows how to persist the timeline position of a Silverlight video between postbacks.

(This information relates to Silverlight 2, ASP.NET and JavaScript)

Are you familiar with the Silverlight MediaPlayer? It allows you to easily play a video in a Web page. I was thinking it would be nice to have a client side (JavaScript) way to persist the video timeline. This way, when you leave a Web page in the middle of watching a Silverlight video, you can continue where you left off when you return. There may be a few different ways to accomplish this. The way I describe shows how to use a cookie to persist the video position.

Persistent Video Image

Here are the basic steps to create a Web page that uses a Silverlight MediaPlayer control to persist the video position between postbacks using a cookie.

In order to follow the steps below, it will be helpful to have the following available:

·         The .NET Framework version 3.5.

·         The Silverlight 2 Toolkit.

·         Visual Studio 2008.

·         A media file (.wmv or .wma file).

Add the controls to your Web page

 

1.      First, create a regular ASP.NET Web site.

2.      Add an AJAX ScriptManager and Silverlight MediaPlayer controls to your Web page.
Note: When you add a MediaPlayer control to your page from the ToolBox, Visual Studio adds System.Web.Silverlight.dll into the Bin directory of your project.

3.      Set the MediaSource property of the MediaPlayer control to point to a video file.

4.      Set the AutoPlay property of the MediaPlayer control to False.

5.      Add the following attributes to the MediaPlayer control so that it knows how to reach the client functions (that we add later):

OnClientMediaOpened="onMediaOpened"

OnClientCurrentStateChanged="onStateChanged"

 

Here’s how the HTML looks:

HTML

<html xmlns="http://www.w3.org/1999/xhtml">

<head id="Head1" runat="server">

    <title>Persistent Video Position</title>

</head>

<body>

    <form id="form1" runat="server">

    <div>

        <asp:ScriptManager ID="ScriptManager1" runat="server">

        </asp:ScriptManager>

        <asp:MediaPlayer

          OnClientMediaOpened="onMediaOpened"

          OnClientCurrentStateChanged="onStateChanged"

          AutoPlay="false"

          MediaSource="~/Media/video1.wmv"

          ID="MediaPlayer1"

          runat="server"

          Height="240px"

          Width="320px">

        </asp:MediaPlayer>

        <p></p>

        <asp:Label ID="Label1" runat="server" Text=""></asp:Label>

        </div>

    </form>

</body>

</html>

Add JavaScript to your Web page

1.      Add the following JavaScript to your Web page. Place it in a <script></script> tag.

JavaScript

    var myTimer;

    function timerInterval() {

        // Recursive timer call.

        myTimer = setTimeout("timerInterval()", 5000);

        onTimerReached();

    }

    function onMediaOpened(sender, args) {

        locMark = getCookie('locMark');

        if (locMark != null && locMark != "") {

            // Set the video position to the cookie value.

            sender.set_position(parseInt(locMark));

            $get("Label1").innerHTML = locMark;

        }

    }

    function onTimerReached() {

        // Each time the timer is called,

        // get the video position.

        var pos = Math.round($find("MediaPlayer1").get_position());

        if (pos != 0) {

            setCookie('locMark', pos, 365);

            $get("Label1").innerHTML = pos;

        }

    }

    function onStateChanged(sender, args) {

        // Only allow the timer to execute

        // when the video is playing.

        var state = sender.get_currentState();

        if (state === "Playing") {

            timerInterval();

        }

        else {

            clearTimeout(myTimer);

        }

    }

    function getCookie(c_name) {

        if (document.cookie.length > 0) {

            c_start = document.cookie.indexOf(c_name + "=");

            if (c_start != -1) {

                c_start = c_start + c_name.length + 1;

                c_end = document.cookie.indexOf(";", c_start);

                if (c_end == -1) c_end = document.cookie.length;

                return unescape(document.cookie.substring(c_start, c_end));

            }

        }

        return "";

    }

    function setCookie(c_name, value, expiredays) {

        var exdate = new Date();

        exdate.setDate(exdate.getDate() + expiredays);

        document.cookie = c_name + "=" + escape(value) +

        ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());

    }

How It Works

When the MediaPlayer plays the video, the MediaPlayer will start by doing the following:

·         Call the onMediaOpened client function.

o   Check if there is a cookie containing the last known video position.

§  If there is a cookie, it will set the position of the video and set the text of Label1 to the cookie value.

·         Call the onStateChanged client function.

o   Which will only allow the timer to execute when the video is playing.

o   And, will call the timerInterval function.

§  The timerInterval function will call itself recursively (set to every 5 seconds).

§  Also, the timerInterval function will call the onTimerReached function.

·         The onTimerReached function will get the video position, and conditionally will set the marker cookie and set the text of the label showing the position marker.

 

For more information about the Silverlight MediaPlayer control, including code, videos, and walkthroughs, see ASP.NET MediaPlayer Server Control.

 -- Erik Reitan

ASP.NET User Education

This posting is provided "AS IS" with no warranties, and confers no rights.

 

This FAQ provides answers to questions about Silverlight HTML Bridge. What is HTML Bridge? Why is HTML Bridge important? How do I use HTML Bridge classes in managed code? How do I call managed code from JavaScript? As well as several other questions, answers and code examples.

(This information relates to Silverlight 2 and ASP.NET)

What is HTML Bridge?

HTML Bridge is a technology in Silverlight that enables you to access the HTML Document Object Model (DOM) from managed code, and to call managed code from JavaScript.

 

Why is HTML Bridge important?

A Silverlight application runs within the Silverlight Plug-in. When you need to communicate between the Silverlight application and the rest of your Web page, you would commonly use HTML Bridge to transfer information, such as events, types and data.

 

In general, when would I use HTML Bridge?

You would commonly use HTML Bridge to:

·         Control the HTML DOM from managed code.

·         Attach events to HTML controls that are handled in managed code.

·         Call managed code from JavaScript.

 

More specifically, what does HTML Bridge allow me to do?

HTML Bridge is an integrated set of types and methods that enable you to:

·         Attach Silverlight managed event handlers to HTML controls.

·         Attach JavaScript event handlers to Silverlight controls.

·         Expose complete managed types to JavaScript for scripting.

·         Expose individual methods of managed types to JavaScript for scripting.

·         Use managed containers for DOM elements such as window, document, and standard HTML elements.

·         Pass managed types as parameters to JavaScript functions and objects.

·         Return managed types from JavaScript.

·         Control various security aspects of your Silverlight-based application.

 

Is it possible to hide the Silverlight plug-in and still use HTML Bridge?

Yes. The Silverlight plug-in does not need to have a visible UI to access the underlying DOM of the page.

 

What types can I use to access the HTML DOM from managed code?

HTML Bridge includes three main types that enable you to access and modify the HTML DOM from managed code:

·         HtmlPage represents the Web page.

·         HtmlDocument represents the document object.

·         HtmlElement represents DOM elements.

 

How do I use the HTML Bridge classes in managed code?

To use the HTML Bridge classes in managed code, you must add a using or Imports statement accessing the System.Windows.Browser namespace. You can use the HtmlDocument.GetElementById method to access an HTML element from managed code if you include an ID with your HTML element. You can use the HtmlElement.GetProperty and HtmlElement.GetAttribute methods to get properties and attributes of an HTML element. Also, you can use the HtmlElement.SetProperty and HtmlElement.SetAttribute methods to set properties and attributes of an HTML element.

 

C#

    HtmlDocument htmlDoc = HtmlPage.Document;

    HtmlElement htmlEl = htmlDoc.GetElementById("Input");

    htmlEl.SetProperty("disabled", false);

    htmlEl.SetAttribute("value", "This text is set from managed code.");

 

Visual Basic

    Dim htmlDoc As HtmlDocument = HtmlPage.Document

    Dim htmlEl As HtmlElement  = htmlDoc.GetElementById("Input")

    htmlEl.SetProperty("disabled", False)

    htmlEl.SetAttribute("value", "This text is set from managed code.")

 

Can you step me through an example of using the HTML Bridge classes?

First, you must create a Silverlight project with a linked Web Site project. For details, see Walkthrough: Integrating XAML into an ASP.NET Web Site Using Managed Code.

 

Next, locate your default.aspx page in your Web site project. Right-click the default.aspx page and select Set As Start Page. Also, add the following HTML to create two text boxes and a button.

HTML

Enter lowercase text <input  type="text"   id="Input" disabled="true"/><br>

Convert to uppercase <button type="button" id="Convert">Convert </button><br>

Uppercase text       <input  type="text"   id="Output"/>

Add the following managed code to the page behind of the Page.xaml (Page.xaml.cs or Page.xaml.vb) file to access the HTML DOM from Silverlight. This code is in the Page constructor and runs during application startup. The code gets a reference to the Input element, sets the disabled property to false, and sets the value attribute to "This text is set from managed code."

C#

public Page()

{

    InitializeComponent();

    HtmlDocument htmlDoc = HtmlPage.Document;

    HtmlElement htmlEl = htmlDoc.GetElementById("Input");

    htmlEl.SetProperty("disabled", false);

    htmlEl.SetAttribute("value", "This text is set from managed code.");

}

Visual Basic

Public Sub New()

    InitializeComponent()

    Dim htmlDoc As HtmlDocument = HtmlPage.Document

    Dim htmlEl As HtmlElement  = htmlDoc.GetElementById("Input")

    htmlEl.SetProperty("disabled", False)

    htmlEl.SetAttribute("value", "This text is set from managed code.")

End Sub

 

Next, add a ScriptManager control and a Silverlight control to your default.aspx page. Make sure the Source attribute of the Silverlight control points to the .xap file located in the ClientBin of your Web site project.

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

<asp:Silverlight Source="~/ClientBin/htmlbridge01.xap" ID="Silverlight1"

  runat="server" Height="100px" Width="100px">

</asp:Silverlight>

 

Now you are ready to run this example. When you run it, you will see the textbox labeled “Input” is enabled and contains text. The text is populated from managed code.

 

What method do I use to attach a managed event handler to an HTML element?

This HtmlElement.AttachEvent method enables you to attach a Silverlight event handler to an HTML element. HtmlElement derives from HtmlObject, which includes the HtmlObject.AttachEvent method.

 

What would be a code example of attaching a managed event handler to an HTML element?
The following managed code in the Page.xaml (Page.xaml.cs or Page.xaml.vb) file shows how the Convert button's onclick handler is attached to a managed event handler named OnConvertClicked by using the AttachEvent method. The code also shows the OnConvertClicked event handler, which gets the value attribute on the Input text box and sets the value attribute on the Output element to an uppercase string.

C#

public Page()

{

    InitializeComponent();

    HtmlDocument htmlDoc = HtmlPage.Document;

    HtmlElement htmlEl = htmlDoc.GetElementById("Input");

    htmlEl.SetProperty("disabled", false);

    htmlEl.SetAttribute("value", "This text is set from managed code.");

 

    // Add an event handler for the Convert button.

    htmlEl = htmlDoc.GetElementById("Convert");

    htmlEl.AttachEvent("onclick", new EventHandler(this.OnConvertClicked));

}

 

void OnConvertClicked(object sender, EventArgs e)

{

   HtmlDocument htmlDoc = HtmlPage.Document;

   HtmlElement input = htmlDoc.GetElementById("Input");

   HtmlElement output = htmlDoc.GetElementById("Output");

   output.SetAttribute("value", input.GetAttribute("value").ToUpper());

}

 

Visual Basic

Public Sub New()

    InitializeComponent()

    Dim htmlDoc As HtmlDocument = HtmlPage.Document

    Dim htmlEl As HtmlElement = htmlDoc.GetElementById("Input")

 

    ' Add an event handler for the Convert button.

    htmlEl = htmlDoc.GetElementById("Convert")

    htmlEl.AttachEvent("onclick", _

        New EventHandler(Of HtmlEventArgs)(AddressOf OnConvertClicked))

End Sub

 

Private Sub OnConvertClicked(ByVal sender As Object, ByVal e As HtmlEventArgs)

    Dim htmlDoc As HtmlDocument = HtmlPage.Document

    Dim input As HtmlElement = htmlDoc.GetElementById("Input")

    Dim output As HtmlElement = htmlDoc.GetElementById("Output")

    output.SetAttribute("value", input.GetAttribute("value").ToUpper)

End Sub

 

How do I call managed code from JavaScript?

·         Make the managed types and members scriptable.

·         Include a JavaScript function that calls a managed method and returns an expected value.

 

How do I make the managed types and members scriptable?
To make the managed types and members scriptable, you need to:

·         Mark the managed type and members using the appropriate attributes.

·         Instantiate the marked managed type with the new operator.

HTML Bridge provides the ScriptableType and ScriptableMember attributes. These attributes are used to mark managed types and members as scriptable. After these attributes are applied to a type or member, the type must be instantiated with the new operator, and then registered by using the HtmlPage.RegisterScriptableObject method. The type or method is then available to be called from JavaScript.

What would be an example of calling managed code from JavaScript?

Create a new Silverlight project with a linked Web site project. Added the following HTML to the default.aspx page:

HTML

Enter the text to send <input  type="text"   id="Text1" /><br>

Call Silverlight method <button type="button" onclick="Call_SL_Scriptable()">

Call Silverlight Scriptable method</button><br>

Display the return string  <input  type="text"   id="Text2"/>

 

The following shows the JavaScript Call_SL_Scriptable function. The JavaScript gets the text from the Text1 text box and passes it to the managed SimpleMethodExample method. The text that is returned from the method is displayed in the Text2 text box. The SimpleMethodExample method call has the following format:

·         SLPlugin is a reference to the Silverlight plug-in.

·         strIn references the input string.

·         strOut references the output string.

·         Content is an object that represents the plug-in area.

·         SL_SMT is the name that is used to register the managed object show later in the managed code.

·         SimpleMethodExample is the managed method name that will be marked as scriptable later in the managed code.

JavaScript

<script type="text/javascript">

    function Call_SL_Scriptable()

    {

        var SLPlugin = document.getElementById("SLP");

        var strIn = document.getElementById("Text1").value;

        var strOut = SLPlugin.Content.SL_SMT.SimpleMethodExample(strIn);

        document.getElementById("Text2").value = strOut;

    }

</script>

The following shows the managed code in the Page.xaml (Page.xaml.cs or Page.xaml.vb) file that the above JavaScript Call_SL_Scriptable function calls. In the below Page constructor, a new ScriptableManagedType is created and registered during application startup. This object is registered with the name SL_SMT by using the HtmlPage.RegisterScriptableObject method.

The ScriptableManagedType class definition appears after the Page constructor. ScriptableManagedType has one method named SimpleMethodExample that has the ScriptableMember attribute. SimpleMethodExample calls the HtmlWindow.Alert method with the passed-in string. It returns a string to the JavaScript function.

C#

public Page()

{

    InitializeComponent();

 

    // Create and register a scriptable object.

    ScriptableManagedType smt = new ScriptableManagedType();

    HtmlPage.RegisterScriptableObject("SL_SMT", smt);

}

 

public class ScriptableManagedType

{

    [ScriptableMember]

    public string SimpleMethodExample(string s)

    {

        HtmlPage.Window.Alert("You called the Silverlight 'SimpleMethodExample'\n" +

            "and passed this string parameter:\n\n" + s);

        return "Returned from managed code: " + s;

    }

}

Visual Basic

Public Sub New()

    InitializeComponent()

 

    ' Create and register a scriptable object.

    Dim smt As ScriptableManagedType = New ScriptableManagedType()

    HtmlPage.RegisterScriptableObject("SL_SMT", smt)

End Sub

 

Public Class ScriptableManagedType

    <ScriptableMember()> _

    Public Function SimpleMethodExample(ByVal s As String) As String

        HtmlPage.Window.Alert("You called the Silverlight 'SimpleMethodExample'" + _

            vbCrLf + "and passed this string parameter:" + vbCrLf + vbCrLf + s)

        Return "Returned from managed code: " + s

    End Function

End Class

 

What is the Silverlight programming model?

When using the Silverlight programming model, you can choose one of three API variations: JavaScript interpreted by the browser, managed code, or dynamic languages interpreted by the dynamic language runtime (DLR). This FAQ focuses on the more common managed API approach for creating and running Silverlight applications.

You can use managed code to handle interaction with the Silverlight server control (a Silverlight 2 scenario) by using Visual Studio 2008 SP1 or Microsoft Expression Blend 2 SP1 to create a Silverlight application project that is compiled as a .xap package. This managed code contained within the .xap package can use HTML Bridge to transfer information between the Silverlight application and the rest of your Web page.

For more information about creating a Silverlight application using managed code, see Walkthrough: Integrating XAML into an ASP.NET Web Site Using Managed Code. For more information about Silverlight XAP, see ASP.NET - Silverlight XAP FAQ.

 

What is the managed Silverlight API?

The Silverlight managed API defines a set of objects as object trees that enable you to populate the initial content of a Silverlight-based application by loading XAML, and then adjust the object tree at run time. The Silverlight object tree is exposed through the Silverlight plug-in, which you create as a plug-in instance on a Web page. Silverlight uses the ActiveX plug-in model for Microsoft Internet Explorer, and uses the Netscape API plug-in model for other browsers. For more information, see Managed API for Silverlight.

 

What is XAML?

XAML stands for Extensible Application Markup Language. XAML simplifies creating a UI for the .NET Framework programming model. You can create visible UI elements in the declarative XAML markup, and then separate the UI definition from the run-time logic by using code-behind files, joined to the markup through partial class definitions. The ability to mix code with markup in XAML is important because XML by itself is declarative, and does not really suggest a model for flow control. An XML based declarative language is very intuitive for creating interfaces ranging from prototype to production, especially for people with a background in web design and technologies. Unlike most other markup languages, XAML directly represents the instantiation of managed objects. This general design principle enables simplified code and debugging access for objects that are created in XAML. For more information, see XAML Overview.

 

Do I have the latest Silverlight 2 plug-in or, where can I find it?

http://www.microsoft.com/silverlight/resources/install.aspx?v=2.0

 

What are the Compatible Operating Systems and Browsers for the Silverlight 2 plug-in?

Compatible Operating Systems and Browsers

 

What managed programming languages can I use to create a Silverlight 2 application?

C#, Visual Basic

 

What are some good links for additional information?

ASP.NET Controls for Silverlight

Silverlight FAQ

Why Silverlight?

Silverlight Resources

HTML Bridge (Contains many of the above code examples)

This FAQ provides answers to questions about Silverlight XAP and ASP.NET. What does XAP mean? Why is XAP important? How does XAP work? How can I create a .xap file in Visual Studio? And, several other questions and answers.

(This information relates to Silverlight 2 Beta 2)

What does XAP mean?

XAP (pronounced ZAP) is the file extension for a Silverlight-based application package (.xap). This file contains the compressed assemblies and resources of a Silverlight 2 application.

 

What is a .xap file?

A .xap file is a Silverlight-based application package (.xap) that is generated when the Silverlight project is built.

 

Why is XAP important?

Tools, such as Visual Studio 2008 with the Microsoft Silverlight Tools Beta 2 for Visual Studio 2008, allow you to create Silverlight applications that are client based using managed code. You can use managed code, such as C# or Visual Basic, and benefit by using the tools that you are used to working with.

 

How does XAP work?

Once you have created the .xap file (explained below), the Silverlight 2 plug-in downloads the file and runs it in a separate work space.

 

How do I use a .xap file?

A .xap file is used to contain and transfer the assemblies and resources of a managed code application. This managed code application must be run within the Silverlight 2 browser plug-in. Silverlight understands xap files natively and so it can be used as the source directly. 

 

Where can I find the Silverlight 2 Beta 2 plug-in?

http://www.microsoft.com/silverlight/resources/install.aspx?v=2.0

 

What are the Compatible Operating Systems and Browsers for the Silverlight 2 plug-in?

Compatible Operating Systems and Browsers

 

How can I view the contents of a .xap file?

To view the contents of a .xap file you can rename the extension of the .xap file to .zip. Then view the .zip file using any standard .zip utility.

 

What are the files contained in the .xap file?

A basic xap file will have an assembly related to specific code for the application, an application manifest file and any additional assemblies need to run the application. At a minimum, two files are needed, the application manifest file and the application assembly.

For example:

AppManifest.xaml

MyPianoV2.dll

 

What is contained in the AppManifest.xaml file?

The AppManifest.xaml file contains the deployment details needed to run the application.

Basic example:

<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="MyPianoV2" EntryPointType="MyPianoV2.App" RuntimeVersion="2.0.30523.4">

  <Deployment.Parts>

    <AssemblyPart x:Name="MyPianoV2" Source="MyPianoV2.dll" />

  </Deployment.Parts>

</Deployment>

For more information, see Katrien De Graeve blog post titled Silverlight 2: structure of the new .XAP file (Silverlight packaged application).

 

How can I view the contents of the project related assembly?

You can use any dll inspection utility. Here’s an example of the contents of myPianoV2.dll:

dll contents 

 

What tools support creating .xap files?

·         Visual Studio 2008 using the Microsoft Silverlight Tools Beta 2 for Visual Studio 2008.

·         Expression Blend 2.5 June 2008 Preview

·         Chiron.exe – Located in the Tools folder of your Silverlight Tools Beta 2 for Visual Studio 2008 installation. For more information see, Dynamic Languages in Silverlight 2.

 

I’m unable to display the contents of the .xap file when I run the application in a Web page within the browser?

Check the following:

·         Make sure you are using the Silverlight 2 Beta 2 plug-in.

·         Make sure you have the XAP mime type set for IIS (see below).

·         Check to be sure you included your resources, such as graphics, with your Silverlight Application (see below).

·         Make sure the .xap file is contained in the ClientBin folder of your Web application.

·         Check the Silverlight Tools page for additional troubleshooting details.

 

What is the XAP mime type?

The .xap mime type is:

application/x-silverlight

For more information, see Michael Schwarz blog post and Microsoft Help and Support.

 

How can I create a .xap file in Visual Studio?

1.       Install the following:

·         Visual Studio 2008.

·         The .NET Framework version 3.5.

·         Microsoft Silverlight Tools Beta 2 for Visual Studio 2008.

·         Silverlight version 2 Beta 2 plug-in.

 

2.       Follow the steps in the following walkthrough to create a .xap file:
Walkthrough: Integrating XAML into an ASP.NET Web Site Using Managed Code

 

What managed programming languages can I use to create a Silverlight 2 application?

C#, Visual Basic

 

What dynamic programming languages can I use to create a Silverlight 2 application?

IronPython, IronRuby, and Managed JScript

For more information, see Programming Silverlight with Dynamic Languages and Dynamic Languages in Silverlight 2.

 

How do I run the Silverlight 2 application (including the .xap file) with the Silverlight 2 plug-in?

You can use the ASP.NET Silverlight Server Control to reference your .xap file. Specifically, you use the Source property to reference the XAP application package. The Version must be set as well.

 

Code contained in an .aspx file:

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

 

<asp:Silverlight runat="server" ID="Silverlight1"

  Height="340"

  Width="320"

  Source="MyPianoV2.xap">

 

Is there an example of a Silverlight 2 Beta 2 .xap application available?

Yes.

Code (C# & VB) that shows how to include a .xap file in a Web page.

Example that shows a running Silverlight 2 Beta 2 application. Note: You will need to install the current runtime plug-in, unless you already have it installed. After installing, close all browser windows and click the Example link.

 

How do I include resources with my Silverlight 2 application?

The example above shows one way to include resources in a Silverlight 2 application. However, Katrien De Graeve has a blog entry titled Different ways for loading images and files in Silverlight 2 applications that explains how to include resources in more detail.

 

What is the XmlXapResolver class?

The XmlXapResolver class is used to resolve resources that are contained in the Silverlight application’s XAP package.

 

What about the XACT Project File Format (.xap)? Is this the same file type as a Silverlight .xap file?

This file type is not related to Silverlight.

The Xbox Audio Creation Tool Project File format (.xap), is read and written by the XACT authoring tool (xact.exe), is utilized by the command-line build environment (xactbld.exe), and contains all of the instructions necessary to generate XACT content. It is a complete description of all XACT wave banks, sound banks, and global settings. For more information see, XACT Project File Format (.xap).

 

Can you point me to additional information?

Yes. Here are a number of links that you may find interesting and helpful.

ASP.NET Controls for Silverlight – ASP.NET Documentation that includes code and running examples.

System.Web.UI.SilverlightControls Namespace – ASP.NET Documentation - managed reference.

Sys.UI.Silverlight (client) Namespace – ASP.NET Documentation – client reference

Silverlight FAQ

Why Silverlight?

Silverlight Resources

Silverlight 2 Beta 2 and Silverlight Streaming

Scott Guthrie’s - Silverlight 2 Beta2 Released

 

What is Silverlight?

Silverlight is a new Web presentation technology that is created to run on a variety of platforms. It enables the creation of rich, visually stunning and interactive experiences that can run everywhere: within browsers and on multiple devices and desktop operating systems (such as the Apple Macintosh). In consistency with WPF (Windows Presentation Foundation), the presentation technology in Microsoft .NET Framework 3.0 (the Windows programming infrastructure), XAML (eXtensible Application Markup Language) is the foundation of the Silverlight presentation capability. For more details, see Getting Started with Silverlight.

 

What is the difference between Silverlight 1.0 and Silverlight 2.0?

Silverlight 1.0 is a cross-browser, cross-platform plug-in allowing rich media experiences and interactive applications for the Web. Silverlight 2.0 extends the 1.0 plug-in by also including a light-weight .NET framework. This light-weight .NET framework supports the C# and Visual Basic programming languages.

 

Why was Silverlight 1.1 changed to Silverlight 2.0?

Previously, Microsoft had been referring to the .NET-enabled Silverlight release as "Silverlight V1.1".  After stepping back and looking at all the new features in it, they realized that calling it a point release doesn't reflect the true nature of it. Consequently, they decided to change the name and refer to it as "Silverlight V2.0" going forward. For more details, see Scott Gu’s blog.

What platforms does the Silverlight 1.0 Plug-in support?

The runtime is available for Microsoft Windows and Mac OS X, with Linux support under development via the third-party Moonlight runtime.

 

How do I control the Silverlight 1.0 Plug-in?

You control the Silverlight 1.0 Plugin using the JavaScript programming language. Specifically, see the Client Reference section of the Microsoft AJAX Library.

 

What is the Silverlight client namespace?

Sys.UI.Silverlight. For preview information about the Silverlight client namespace, see the ASP.NET 3.5 Extensions Preview.

 

Can I completely control the Silverlight Plug-in using client script?

Yes. For more information, see the section title Using Client Script with the MediaPlayer Control of the topic titled ASP.NET MediaPlayer Server Control.

 

Where can I find out more about the JavaScript syntax and capabilities?

The ASP.NET web site details the Microsoft AJAX Library and has a Client Reference section that is helpful. For more information about AJAX, see the ASP.NET AJAX Roadmap.

 

Are there server side controls for Silverlight?

Yes. These are also in development based on the time of this blog post. For preview information about the Silverlight server namespace and controls, see the ASP.NET 3.5 Extensions Preview.

 

What are the Silverlight ASP.NET Controls?

System.Web.UI.SilverlightControls.MediaPlayer

This control provides a XAML-based player that runs media (movie or audio) in an ASP.NET Web page. The player can be represented through a number of pre-defined skins. The Media server control inherits from the Sys.Web.UI.SilverlightControls.Silverlight control. For more information see, the ASP.NET 3.5 Extensions Preview.

System.Web.UI.SilverlightControls.Silverlight

This control provides a way to integrate Silverlight in an ASP.NET Web page. This control inherits from System.Web.UI.Controls.WebControl, and implements System.Web.UI.IScriptControl. The Silverlight server control uses XAML in combination with the Silverlight plug-in and the JavaScript Sys.UI.Silverlight.Control class. Unlike the MediaPlayer server control, the Silverlight server control is generic and is not designed only to manage media files. For more information see, the ASP.NET 3.5 Extensions Preview.

 

*** Of course, the above information contains preview details. Details may change.

 

What is the difference between the MediaPlayer server control and the Silverlight server control?

The MediaPlayer control inherits from the Silverlight control. The MediaPlayer control offers ways to play media in a skin (frame with controls). The skin can be modified. It is XAML.

 

What DLL are the Silverlight server controls contained in?

System.Web.Extensions.dll. Note the latest version at the time of this blog post is version 3.6.

 

How do I use the ASP.NET MediaPlayer server control?

To use the MediaPlayer server control, you reference a media source file and select a built-in skin.

The following example shows the declarative markup for a MediaPlayer server control with property settings.

<asp:MediaPlayer runat="server" ID="Media1"

   ScaleMode="Stretch"

   AutoPlay="true"

   MediaSource="MyVideoFile.wmv"

   PluginBackColor="blue"

   MediaSkin="Professional"

   Height="240"

   Width="320" />

The MediaPlayer control creates the Sys.UI.Silverlight.MediaPlayer client script class (based on the model used in the ASP.NET AJAX Extensions) that provides a JavaScript programming model to control the client player. By default, the Silverlight client player is the Silverlight 1.0 browser plug-in. For more information, see ASP.NET MediaPlayer Server Control.

 

What does the MediaPlayer server control use as its source?

The MediaPlayer control supports a variety of media file types, including .wmv, .wma and .mp3.

 

What is a MediaSkin file?

The MediaSkin is the frame for the media. It is XAML based. If you want to change the appearance of the MediaPlayer control's rendered skin, you can create your own XAML markup in a .xaml file. You can then reference the .xaml file by setting the MediaSkin property of the MediaPlayer control.

 

How do I use the ASP.NET Silverlight server control?

The following example shows the markup for a Silverlight server control that defines a simple calculator in XAML. The logic for interacting with the XAML is defined in a separate JavaScript class. The Silverlight server control references the file that contains the XAML markup (Calculator.xaml). You can also see how to reference the client-script library (Calculator.js) for the calculator code, and how to reference the JavaScript class (Custom.Calculator).

<asp:ScriptManager ID="ScriptManager1" runat="server">

  <Scripts>

    <asp:ScriptReference Name="SilverlightControl.js" />

    <asp:ScriptReference Path="calculator.js" />

  </Scripts>

</asp:ScriptManager>

 

<asp:Silverlight runat="server" ID="Silverlight1"

    Height="340"

    Width="320"

    Source="calculator.xaml"

    ClientType="Custom.Calculator"

    OnClientPluginError="onXamlError">

In its basic form, the Silverlight server control provides a JavaScript type that includes members such as the pluginLoaded event and the pluginError event. The Silverlight server control references a XAML file through the Source property. The code for interacting with the XAML can be in a managed-code assembly or in a client JavaScript library (.js file).

 

What does the Silverlight server control use as its source (the information it renders)?

XAML.

 

What is XAML?

XAML simplifies creating a UI for the .NET Framework programming model. You can create visible UI elements in the declarative XAML markup, and then separate the UI definition from the run-time logic by using code-behind files, joined to the markup through partial class definitions. The ability to mix code with markup in XAML is important because XML by itself is declarative, and does not really suggest a model for flow control. An XML based declarative language is very intuitive for creating interfaces ranging from prototype to production, especially for people with a background in web design and technologies. Unlike most other markup languages, XAML directly represents the instantiation of managed objects. This general design principle enables simplified code and debugging access for objects that are created in XAML. For more information, see XAML Overview.

What tools can I use to help me create XAML files?

Microsoft Expression Blend. For more information, see Silverlight QuickStart

Using Microsoft Expression Blend, Expression Blend and Expression Blend and Design – Team Blog.

 

 

Let me know if this information is helpful. I'll add aditional details.

 

Erik Reitan

Programming Writer - ASP.NET User Education

ASP.NET AJAX makes working with client objects and client events much easier. The code below allows you to choose the type of event and the "test" object to act upon. I pulled a sub-set of client events from the W3Schools.com site (included below). Also, the code I'm working with began as an AJAX sample I created for the ajax.asp.com/doc site. Although now, this code is much more dynamic. 

I included a number of events that you can select from the UI:

Events
keyup
keydown
keypress
focus
blur
change
click
dblclick
mousedown
mousemove
mouseover
mouseout
mouseup
select

I think the most interesting aspect of the client events involve the charCode verses the keyCode. The keyCode field is raised by the keyUp or keyDown event. The charCode field is raised by the keyPress event. The keyUp and keyDown events are raised for every key, which includes modifier keys such as ALT, CTRL, and SHIFT. The keyPress event is not raised for these single modifier keys. Try out the code below. You can select the type of event and the object to interact with. Once you have made your selection, interact with the "Test" object to see the event details.

Client Object Window

Here's the code:

<%@ Page Language="C#" %>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<script runat="server">

 

</script>

 

<html xmlns="http://www.w3.org/1999/xhtml">

 

<head id="Head1" runat="server">

    <title>Example</title>

    <style type="text/css">

    #UpdatePanel1 {

      width:300px; height:100px;

     }

    </style>

</head>

<body>

    <form id="form1" runat="server">

        <asp:ScriptManager ID="ScriptManager1" runat="server"/>

        <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">

            <ContentTemplate>

                   <p></p>

                   <asp:Panel ID="Panel2" runat="server" GroupingText="Select Event & Object">

                   <table>

                   <tr>

                   <td>

                   <asp:Label ID="Label3" runat="server" Text="Event Type: "></asp:Label>

                   </td>

                   <td>

                   <asp:DropDownList ID="DropDownList3" runat="server">

                        <asp:ListItem>keyup</asp:ListItem>

                        <asp:ListItem>keydown</asp:ListItem>

                        <asp:ListItem>keypress</asp:ListItem>

                        <asp:ListItem>focus</asp:ListItem>

                        <asp:ListItem>blur</asp:ListItem>

                        <asp:ListItem>change</asp:ListItem>

                        <asp:ListItem>click</asp:ListItem>

                        <asp:ListItem>dblclick</asp:ListItem>

                        <asp:ListItem>mousedown</asp:ListItem>

                        <asp:ListItem>mousemove</asp:ListItem>

                        <asp:ListItem>mouseover</asp:ListItem>

                        <asp:ListItem>mouseout</asp:ListItem>

                        <asp:ListItem>mouseup</asp:ListItem>

                        <asp:ListItem>select</asp:ListItem>

                   </asp:DropDownList>

                    </td>

                    </tr>

                    <tr>

                    <td>

                   <asp:Label ID="Label5" runat="server" Text="Test Object: "></asp:Label>

                    </td>

                    <td>

                   <asp:DropDownList ID="DropDownList2" runat="server">

                        <asp:ListItem>TextBox1</asp:ListItem>

                        <asp:ListItem>Button1</asp:ListItem>

                        <asp:ListItem>LinkButton1</asp:ListItem>

                        <asp:ListItem>DropDownList1</asp:ListItem>

                        <asp:ListItem>CheckBox1</asp:ListItem>

                        <asp:ListItem>Calendar1</asp:ListItem>

                   </asp:DropDownList>

                   </td>

                   </tr>

                   </table>

                   </asp:Panel>

 

                   <p></p>

                    <asp:Panel ID="Panel1a" runat="server" GroupingText="Interact with Test Object">

                        <br />

                        <asp:TextBox ID="TextBox1" runat="server" Text="" ></asp:TextBox>

                        <asp:Button ID="Button1" runat="server" Text="Button" style="display:none" />

                        <asp:LinkButton ID="LinkButton1" runat="server" style="display:none">LinkButton</asp:LinkButton>

                        <asp:DropDownList ID="DropDownList1" runat="server" style="display:none">

                            <asp:ListItem>Test1</asp:ListItem>

                            <asp:ListItem>Test2</asp:ListItem>

                        </asp:DropDownList>

                        <asp:CheckBox ID="CheckBox1" runat="server" />

                        <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>

                    </asp:Panel>

                   <p></p>

                   <asp:Panel ID="Panel1" runat="server" GroupingText="Event Details">

                   <asp:Label ID="Label2" runat="server"></asp:Label>

                   </asp:Panel>

            </ContentTemplate>

        </asp:UpdatePanel>

    </form>

</body>

 

    <script type="text/javascript">

    updateEventHandling();

    // On change of DropDownList3, set handler

    $addHandler($get("DropDownList3"), "change", updateEventHandling);

    // On change of dropdownlist2, set handler

    $addHandler($get("DropDownList2"), "change", updateEventHandling);

    var eventVal;

    var myArray = ['altKey', 'button', 'charCode', 'clientX', 'clientY',

                   'ctrlKey', 'offsetX', 'offsetY', 'screenX', 'screenY',

                   'shiftKey', 'target.id', 'type', 'keyCode'];

 

    function updateEventHandling() {

      // Clear handlers and hide all "Test" objects

      var objectList = $get("DropDownList2");

      var elementIDVal;

      for (i=0;i<objectList.length;i++) {

        elementIDVal = objectList.options[i].text;

        $clearHandlers($get(elementIDVal));

        $get(elementIDVal).style.display="none";

        $get("Label2").innerHTML = "";

      }

 

      // Show the "Test" object and set the handler

      $get($get("DropDownList2").value).style.display="inline";

      eventVal = $get("DropDownList3").value;

      $addHandler($get($get("DropDownList2").value), eventVal, processEventInfo);

    }

 

    function processEventInfo(eventElement) {

        var result = '<br />';

        var arrayVal;

        for (var i = 0, l = myArray.length; i < l; i++) {

            arrayVal = myArray[i];

            if (typeof(arrayVal) !== 'undefined') {

                // Example: eventElement.clientX

                result += arrayVal + " = " + eval("eventElement." + arrayVal) + '<br/>';

            }

        }

        // Display results

        $get('Label2').innerHTML = result;

    }

    </script>

 

</html>

 

 

 

In addition to the ASP.NET MSDN links (see related blog entry), here are C# links to MSDN content. I hope these links are helpful in this format.

 

I recently read a post on http://forums.asp.net that asked where ASP.NET resources could be found. Here's a listing that I adapted from msdn that may be helpful.

ASP.NET

Building ASP.NET Applications

ASP.NET Introduction

ASP.NET Overview

What's New in ASP.NET

ASP.NET Development Requirements

ASP.NET Web Applications

ASP.NET Web Site Structure

ASP.NET Life Cycle

Site Navigation

ASP.NET Web Site Configuration

Master Pages

Themes and Skins

State Management

Globalization and Localization

Custom ASP.NET Processing with HTTP Handlers

Extending ASP.NET Processing with HTTP Modules

Accessibility

Web Forms Pages

ASP.NET Web Pages Overview

Programming ASP.NET Web Pages

Web Parts

ASP.NET Web Parts Overview

Walkthrough: Creating a Web Parts Page

Web Parts Control Set Overview

Web Parts Page Display Modes

Web Parts Personalization

Web Parts Connections Overview

How to: Treat a User Control as a Web Parts Control

Securing Web Parts Pages

Using ASP.NET Server Controls in Web Parts Applications

Web Parts Control Description Files

Creating a Data-bound Web Parts Control

How to: Provide Optional Web Parts Controls

How to: Enable Users to Import Web Parts Control Settings

How to: Export Web Parts Control Settings

Web Server Controls

ASP.NET Web Server Controls Overview

Working with ASP.NET Web Server Controls

Individual ASP.NET Web Server Controls

Standard ASP.NET Web Server Controls

Data Web Server (ASP.NET) Controls

Data Source Web Server Controls

Validation ASP.NET Controls

Navigation ASP.NET Controls

Login ASP.NET Controls

Web Parts Controls

ASP.NET User Controls

Data Access

ASP.NET Data Access Overview

Binding to Databases

Data-Binding Expression Syntax

Using SQL Server Express Edition with ASP.NET

Securing Data Access

Web Site Security

Getting Started

ASP.NET Web Application Security

Managing Users by Using Membership

Managing Authorization Using Roles

Encrypting Configuration Information Using Protected Configuration

Performance

Developing High-Performance ASP.NET Applications

Optimizing Performance in ASP.NET

How to: Precompile ASP.NET Web Sites

Monitoring ASP.NET Application Performance

Performance Counters for ASP.NET

How to: View the ASP.NET Performance Counters Available on Your Computer

Design and Configuration for Performance

Performance Considerations for Applications Using Services

Caching

Deployment

ASP.NET Web Site Precompilation

Walkthrough: Deploying an ASP.NET Web Application Using XCOPY

Side-by-Side Support in ASP.NET

Troubleshooting and Debugging

ASP.NET Debugging

ASP.NET Tracing

Error Handling in ASP.NET Pages and Applications

ASP.NET Health Monitoring

Migration (ASP)

Migration Overview

Migrating ASP.NET 1.x Applications to ASP.NET 2.0

Migrating ASP Pages to ASP.NET

COM Component Compatibility

Mobile Devices

Mobile Web Development Overview

Device Filtering Overview

Creating ASP.NET Mobile Web Pages

 

 

What is a Web Application Project?

A Web Application Project is a Visual Studio 2005 project template.

 

Why would I use Web Application Projects?

The Web Application Projects template is ideal for web developers who are converting a Visual Studio .NET 2003 web project to Visual Studio 2005. The new Web Application Projects model provides the same Web project semantics as Visual Studio .NET 2003 Web projects. This includes a structure based on project files and a build model based on a single assembly. However, the new project type makes available all the new features of Visual Studio 2005, such as class diagrams, test development, and generics. The new project type also makes available all the new features of ASP.NET 2.0, such as master pages, data controls, membership and login, role management, Web Parts, personalization, site navigation, and themes.

 

Does Web Application Projects replace the existing template model?

The new Web Application Projects template does not replace the Web Site Project type introduced in Visual Studio 2005. Instead, it is an alternative project type that developers might choose depending on their requirements and their preferred development workflow.

 

How do I install Web Application Projects?

Currently, you must install Microsoft Visual Studio 2005 - Update to Support Web Application Projects, and then you must install Visual Studio 2005 Web Application Projects.

 

What are Web Site Projects?

The Web Site Project model is the default Visual Studio 2005 web project model.

 

What are the differences between Web Application Projects and WSP?

A whitepaper includes this information - Comparing Web Site Projects and Web Application Projects.

 

Which came first, Web Application Projects or Web Site Projects?

Before Visual Studio 2005, we commonly worked with “Web Applications”. Then, with Visual Studio 2005, the Web Site Projects template was introduced. Shortly after, the Web Application Projects template became available.

 

How does Web Deployment Projects fit into all of this?

A Web Deployment Project creates and maintains an MSBuild project file, and is associated in a solution with a Web Site Project or Web Application Project. A Web Deployment Project enables you to manage not only build configuration and merge options, but other tasks such as specifying changes for the application's Web.config file during compilation, changing connection strings, creating virtual directories, and performing other tasks at specific points in the deployment process.

 

How do I select Web Application Projects?

Once you have installed the update to Visual Studio and Web Application Projects template, you can select Web Application from the available templates.

 

Where can I find out more about Web Application Projects and related topics?

Introduction to Web Application Projects – MSDN Whitepaper

VS 2005 Web Application Projects – ASP.NET Forums

FAQ and Known Issues - Web Application Projects

Visual Studio 2005 Web Application Project - Tutorials and Help

ScottGu's Blog

 

What is Health Monitoring?

Health Monitoring is a framework for monitoring status of running ASP.NET applications and logging significant ASP.NET application events.

 

Why would I use Health Monitoring?

  • Health Monitoring is runtime based for your production environment, so it provides information of your running ASP.NET applications
  • Health Monitoring gives event details rather than providing a number or a total, which can be useful to solve running application issues.
  • Health Monitoring is customizable, so you can tailor the event information they way you need it.

 What are examples of Health Monitoring events that can be logged?

  • Application starts and stops
  • Failed logins and unhandled exceptions
  • "Heartbeats"
  • Successful and failed login attempts through Membership
  • Successful and failed URL and ACL authorizations by authenticated users
  • Valid and expired forms authentication tickets
  • View state validation failures
  • Compilation errors
  • Configuration errors
  • Unhandled exceptions
  • Request validation failures
  • Anything that causes request to abort
  • Requests queued, processing, or rejected
  • Specific or periodic monitoring event
  • Process start time and more

 What are examples of locations where Health Monitoring events can be logged?

  • Windows event log
  • SQL Server database
  • Email
  • Console window using WMI
  • Trace output window

What are Health Monitoring events?

Health Monitoring events help you keep track of different things that are occurring while your ASP.NET application is running. These events are divided into five main areas:

  • Application Lifetime Events
  • All Audits
  • All Errors
  • Reqeust Processing Events
  • Heartbeats

What are Health Monitoring providers?

Providers consume Web event data. By default, the ASP.NET health-monitoring system can deliver Web event data using the built-in providers listed in the following table. More than one provider can listen for the same event, and more than one event can be consumed by the same provider.

 

Event Providers

Details

EventLogWebEventProvider

Writes Web event data to the Windows event log. By default, this provider is configured to write all errors to the Windows event log. Security operation errors are logged under the event name Failure Audits and logs all other errors are logged under the event name All Errors.

To read event log data, you can view data using the Windows Event Viewer or read event log data programmatically.

SqlWebEventProvider

Logs Web event data to a Microsoft SQL server database. By default, this provider logs data to the SQL Server Express database in the Web application's App_Data folder. It does not subscribe to any events by default.

WmiWebEventProvider

Passes Web events to WMI, converting them to WMI events. By default, this provider does not subscribe to any events.

To listen for WMI events, you can build an application such as the one illustrated in Walkthrough: Listening for WMI Events in ASP.NET Health Monitoring. For more information, see Using WMI to Deliver ASP.NET Health Monitoring Events. WMI applications do not have to be written in managed code.

SimpleMailWebEventProvider and TemplatedMailWebEventProvider

Sends an e-mail message when Web events are raised. By default, these providers are not configured and do not subscribe to any events.

TraceWebEventProvider

Passes event data to the ASP.NET page tracing system. By default, this provider is not configured and does not subscribe to any events. Tracing provides you the ability to start and stop event tracing sessions, to instrument applications to provide trace events, and to consume trace events. You can use the events to debug an application and perform capacity and performance analysis. For more information, see ASP.NET Tracing.

 

What are Health Monitoring profiles?

Profiles determine how events are collected by ASP.NET and raised to providers.

By default, there are two profiles named Critical and Default included in the configuration.

 

What are Health Monitoring buffers?

Buffers (BufferModes) define how health-monitoring events can be buffered before they are raised. The three included providers that can use bufferModes are:

  • SqlWebEventProvider (included by default)
  • SimpleMailWebEventProvider
  • TemplatedMailWebEventProvider

Each of the above providers inherits from the BufferedWebEventProvider class.

 

What are Health Monitoring rules?

The rules define the map of how an event is raised. At a minimum each rule must list the event name, the provider and the profile.

 

How is Health Monitoring configured and controlled?

The configuration is the main location to control what events will be monitored and how those events will be monitored. You can either modify the configuration using a text editor or use the API. For more information see, HealthMonitoringSection Class and ASP.NET Configuration Files.

 

Where in the configuration is Health Monitoring found?

The <healthMonitoring> section is within the <system.web> section of the configuration.

 

What are the sub-sections within the <healthMonitoring> section of the configuration?

There are five sub-sections within the <healthMonitoring> section. The Health Monitoring section looks like the following:

<healthMonitoring ...>

  <bufferModes>

    ...

  </bufferModes>

  <providers>

    ...

  </providers>

  <eventMappings>

    ...

  </eventMappings>

  <profiles>

    ...

  </profiles>

  <rules>

    ...

  </rules>

</healthMonitoring>

 

Are there default values (a default configuration) established in the <healthMonitoring> section of the configuration?

Yes. These values are contained at the root web.config file. The root web.config file is located at %windir%\Microsoft.NET\Framework\v2.0.50727\CONFIG. By default, a number of eventMappings, providers, profiles, rules, and bufferModes are already established within the <heathMonitoring> section.

 

What are the default Health Monitoring events included in the configuration?

The default events are mapped in the root web.config file:

<eventMappings>

  <add name="All Events" type="System.Web.Management.WebBaseEvent, ..." />

  <add name="HeartBeats"

    type="System.Web.Management.WebHeartBeatEvent, ..." />

  <add name="Application Lifetime Events"

    type="System.Web.Management.WebApplicationLifetimeEvent, ..." />

  <add name="Request Processing Events"

    type="System.Web.Management.WebRequestEvent, ..." />

  <add name="All Errors"

    type="System.Web.Management.WebBaseErrorEvent, ..." />

  <add name="Infrastructure Errors"

    type="System.Web.Management.WebErrorEvent, ..." />

  <add name="Request Processing Errors"

    type="System.Web.Management.WebRequestErrorEvent, ..." />

  <add name="All Audits" type="System.Web.Management.WebAuditEvent, ..." />

  <add name="Failure Audits"

    type="System.Web.Management.WebFailureAuditEvent, ..." />

  <add name="Success Audits"

    type="System.Web.Management.WebSuccessAuditEvent, ..." />

</eventMappings>

 

What are the default Health Monitoring providers included in the configuration?

The default providers are included in the following section of the root web.config file:

<providers>

    <add name="EventLogProvider"

            type="System.Web.Management.EventLogWebEventProvider, …

    <add name="SqlWebEventProvider"

            connectionStringName="LocalSqlServer"

            maxEventDetailsLength="1073741823"

            buffer="false"

            bufferMode="Notification"

            type="System.Web.Management.SqlWebEventProvider, …

    <add name="WmiWebEventProvider"

              type="System.Web.Management.WmiWebEventProvider,…

</providers>

 

What are the default Health Monitoring profiles included in the configuration?

The default profiles are included in the following section of the root web.config file:

<profiles>

    <add name="Default"

              minInstances="1"

              maxLimit="Infinite"

              minInterval="00:01:00"

              custom="" />

    <add name="Critical"

              minInstances="1"

              maxLimit="Infinite"

              minInterval="00:00:00"

              custom="" />

</profiles>

 

What are the default Health Monitoring buffers included in the configuration?

The default bufferModes are included in the following section of the root web.config file:

<bufferModes>

    <add name="Critical Notification"

         maxBufferSize="100"

         maxFlushSize="20"

         urgentFlushThreshold="1"

         regularFlushInterval="Infinite"

         urgentFlushInterval="00:01:00"

         maxBufferThreads="1" />

    <add name="Notification"

        

    </>

    <add name="Analysis"

         

    </>

    <add name="Logging