All About SharePoint

Liedong(Ken) Zheng,SharePoint Leader at SIMPLOT

Posts Tagged ‘Silverlight’

How to add SilverLight Web part in Sharepoint 2010

Posted by ken zheng on November 12, 2010

 

It is pretty easy to have SilverLight app. running in your SharePoint Site.

Here is a example you can add the SilverLight application into the feature then deployed to the server. But for quick test, you can manually.

Just create a new page add insert SilverLight Web Part in, then Go to SilverLight application Bin folder and find .XAP file upload to the same library.

image

Your config for the web part will look like

image

Tips:

If you have configured the web part right and the SilverLight still not showing. Close the IE then open again as there may be cache in your browser.

Posted in Sharepoint, Silverlight | Tagged: , | 1 Comment »

Fixing Error 2104: Could not download the Silverlight application. Check web server settings

Posted by ken zheng on April 7, 2010

Fixing Error: Unhandled Error in Silverlight 2 Application
Code: 2104
Category: Initializer Error
Message: Could not download the Silverlight application.
Check web server settings.

When you’re hosting Silverlight, you have to tweak your IIS6 or Appache settings to allow the server to know how to handle the extensions that it’s not familiar with. I’m sure in the future, Microsoft will encode this directly into new releases of IIS, but for now, you have to add these MIME types yourself.

.xaml application/xaml+xml
.xap application/x-silverlight-app
.xbap application/x-ms-xbap

To add the MIME types to IIS6:

1. Choose the Virtual Directory or Default Web Site in IIS
2. Open the context menu and choose “Properties”
3. Select the “HTTP-Headers” tab
4. Click the button labeled “File Types…” in MIME Map section
5. Choose “New Type” and type the extension from above into the extension field and the application type into the MIME type field.
6. After adding all 3, click “OK” then click “Apply” on the main menu. You’re done. No restart needed.

Posted in .Net, Silverlight | Tagged: , | 1 Comment »

Unable to see default Silverlight control in Toolbox

Posted by ken zheng on December 2, 2009

If you can’t see default Silverlight control in Toolbox, run “devenv /setup” or “/reestsettings” in Run or “Visual Studio 2008 Command Prompt”

Posted in Silverlight, VS2008, vs2010 | Tagged: | Leave a Comment »

InitializeError- Failed to load the application. It was built with an obsolete version of Silverlight

Posted by ken zheng on July 23, 2009

You may experience this problem when you try to run an existing SilverLight project.

I only know the quick and dirty solution to this problem. (at least, it worked for my app)
You’ll have to open the .xap file with an archive program like winara. Edit the AppManifest.xaml file, and change the version number into the current number (something like 2.0.30825.0). And your program should work.

Posted in Silverlight | Tagged: | Leave a Comment »

Silverlight 3 – Consumption of a WCF Service

Posted by ken zheng on June 21, 2009

I started to play with the SL3 with wcf, but keep getting the error when using default clientconfig file

Could not find default endpoint element that references contract ‘ProjectName.ServiceReference1.IService1′ in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element matching this contract could be found in the client element.

If you look at the config file you’ll see contract=”ServiceReference1.IService1″. This needs to be a fully qualified namespace, and should be changed to contract=”ProjectName.ServiceReference1.IService1″ (or whatever namespace is specified in your Reference.cs file)

Posted in Silverlight | Tagged: | Leave a Comment »

Switch SilverLight UserControl

Posted by ken zheng on July 30, 2008

Silverlight does not have the Page type, the term is currently used is RootVisual UserControl. RootVisual object is analogous to the root window in WPF and can only be set once for the lifetime of the app, and is effective once the Application’s Startup event is raised. But this not true, you can set RootVisual as many times you want. So Application_Startup can be used to call multiple Silverlight controls.

    <form id="form1" runat="server" style="height:100%;">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div  style="height:100%;">
            <asp:Silverlight ID="Xaml1" runat="server" InitParameters="ControlId=Page" Source="~/ClientBin/SilverlightApplication1.xap" MinimumVersion="2.0.30523" Width="100%" Height="100%" />
        </div>
    </form>
		<object data="data:application/x-silverlight," type="application/x-silverlight-2-b2" width="100%" height="100%">
			<param name="source" value="ClientBin/SilverlightApplication1.xap"/>
			<param name="onerror" value="onSilverlightError" />
			<param name="background" value="white" />
			<param name="initParams" value="ControlId=BookStore" />
			
			<a href="http://go.microsoft.com/fwlink/?LinkID=115261" style="text-decoration: none;">
     			<img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/>
			</a>
		</object>

and in the App.xaml.cs

        private void Application_Startup(object sender, StartupEventArgs e)
        {
            if (e.InitParams.ContainsKey("ControlId"))
            {
                switch (e.InitParams["ControlId"])
                {
                    case "BookStore":
                        this.RootVisual = new BookStoreWithConverters();
                        break;

                    case "Page":
                        this.RootVisual = new Page();
                        break;
                }
            }        
        }

Posted in Silverlight | Tagged: | 2 Comments »

Expression Blend Tutorial

Posted by ken zheng on July 9, 2008

Today I have found very good tutorials for Expression Blend from http://www.movielibrary.lynda.com. These tutorials covers the topics like
Overview and Installation, The Workspace, Managing Your Projects, Drawing in Blend, Appearance, Working with Text, Using 3D, Media Integration, Layout Controls, Media Integration, Layout Controls, Transformations, Animation and Interactivity, WPF Controls, Working with Data, Application Deployment, Please find following Expression Blend tutorial pages
Expression Blend
Getting Started with Expression Blend 3.75 hours

Expression Blend Beta Preview 2.5 hours

Expression Design
Getting Started with Expression Design

Hope these tutorials are useful. Suggest the some more best tutorials on this topic in bellow comment section.

Posted in Uncategorized | Tagged: , | Leave a Comment »

Silverlight 2 Beta2 Released

Posted by ken zheng on June 9, 2008

Silverlight 2 Beta2 was released today.  You can download both Silverlight 2 Beta2 and the Visual Studio and Expression Blend tools support to target it here.

Beta2 adds a lot of new features (more details below), but is still a 4.6 MB download that takes less than 10 seconds to install on a machine.  It does not require the .NET Framework or any other software to be installed for it to work, and all features work cross-browser on both Mac and Windows machines.  These features will also be supported on Linux via the Moonlight 2 release.

Silverlight 2 Beta2 supports a go-live license that allows you to start using and deploying Silverlight 2 for commercial applications. There will be some API changes between Beta2 and the final release, so you should expect that applications you write with Beta2 will need to make some updates when the final release comes out.  But we think that these changes will be straight-forward and relatively easy, and that you can begin planning and starting commercial projects now.

You can build Silverlight Beta2 applications using the VS 2008 Tools for Silverlight and Expression Blend 2.5 June Preview downloads.  You can download both of them here.  The VS 2008 Tools for Silverlight download works with both VS 2008 and the recent VS 2008 SP1 beta release.

Posted in Uncategorized | Tagged: | Leave a Comment »

Tips/Tricks: Silverlight 2 (beta 1) Tools for Visual Studio 2008 Installation Error

Posted by ken zheng on June 6, 2008

Problem ~

An Error Has Occurred:
Silverlight Tools cannot be installed because one or more of the following conditions is true:

1. Visual Studio 2008 RTM is not installed.
2. The Web Authoring feature of Visual Studio is not installed.
3. A previous version of the Silverlight Runtime is installed.
4. A previous version of the Silverlight SDK is installed.
5. The Visual Studio Update KB949325 is installed.
6. A previous version of Silverlight Tools is installed.

To continue, please install or uninstall the appropriate products and run this installer again.

SL 2 Tool for VS 2008 2 ERROR

Solution ~

Short Answer: You are sure that all of conditions above are false but you are getting this error. Then, The shortest answer is “uninstall Silverlight 2 beta1 SDK” from your machine.

That’s all. You should be able to install after uninstalling. but If you want to read more details, please keep on reading further.

Detailed ~

Step #1. Install Visual Studio 2008 release version or RTM version

You have to install the release or RTM version of Visual Studio 2008 in your machine. Your Visual Studio should be Professional Edition or Standard Edition or Team System. You can’t use VS 2008 beta or Express version.

Step #2. Install the Web Authoring Component of Visual Studio

The Web Authoring feature of Visual Studio

You need to check whether you have Microsoft Visual Studio Web Authoring Component installed in your machine or not. If you have installed Visual Studio 2008, you already have that web authoring component installed. but just in case you accidentally remove that component, you can run WebToolsCore.exe to install that component manually. The setup fiel is located under WCU\WebToolsCore of VS DVD. If you are not sure about what VS Web Authoring Component is, you can read this post.

Step #3. Remove the Visual Studio Update KB949325 if it’s installed

You have to remove that Visual Studio Update (KB949325) from your machine.

If you are a Windows Vista user, please go to “Control Panel” and open “Programs and Features”. Then, Click “View installed updates” and find “KB949325″.
view-install-update.gif

If you are XP users, go to “Add and Remove Programs” and select “Show Update”. And find “KB949325″ in the list.

Step #4. Uninstall all of the previous versions of the Silverlight Runtime/SDK/Tool

You have to uninstall all of the previous versions of Silverlight runtime/SDK/Tool from your system.

Uninstalling is very simply. but sometimes, you might face some weird problems. One of my friends faced one weird problem when he tried to uninstall the previous version of Silverlight. He installed “Silverlight 1.0 SDK VS 2005 template” in his machine long time back. The time when he installed that SDK, he had VS 2005.

sdk-template.jpg

but after sometime, he removed VS 2005 from his machine. Now, he wanted to remove SL 1.0 SDK but he couldn’t. The message below kept on showing when he tried to uninstall.

sl-sdk-10.jpg

So, I suggested him to use Windows Installer CleanUp Utility to remove that SDK and he did it.

ms-clean-up-remove.jpg

Note: I would like to suggest you to use CCleaner to scan your registry and fix all issues after removing SL 1.0 SDK from your machine.

Step #5. Uninstall Silverlight 2 (beta1) runtime, SDK, Tool for Visual Studio 2008

Please uninstall Silverlight 2 (beta1) runtime, SDK, Tool for Visual Studio 2008 in case you have installed before facing this problem.

Step #6. Install Silverlight 2 (beta1) runtime

Now, you can install Silverlight 2 (beta1) runtime. (It’s just for the sequence of installing. That’s why I asked you to uninstall SL2-related things first.)

Step #7. Install VS 2008 Web Development Hot-Fix

You can download this hot-fix from this link. then, install it in your machine after installing Silverlight 2 runtime.

Finally,

Now, you can run silverlight_chainer.exe again.I hope you should be able to run the setup successfully. Feel free to let me know if you have any problem in installing SL 2 Tool.

Issues after installing Silverlight 2 Tool for VS 2008

#1: ‘Microsoft.VisualStudio.Web.Silverlight.IVsSilverlightService’ error

If you are getting one of the following error, you have by-passed the validation of Silverlight 2 Tool installer by extracting (winrar-ing) the silverlight_chainer.exe or following this post. You have to follow 7 steps that I mentioned above to install Silverlight 2 Tool firstly. If you are able to install that tool, the following error will be disappeared.

vs-2-err.jpg

OR

error.jpg
#2. The project type is not supported by this installation

error.jpg

Run devenv.exe /resetskippkgs in case you got this error. (Thanks to BradleyB for this post.)

Posted in .Net, VS2008 | Tagged: | 2 Comments »

Silverlight Blueprint for SharePoint

Posted by ken zheng on May 27, 2008

Silverlight Blueprint for SharePoint site: http://www.ssblueprints.net/sharepoint/ !

 You can read more details on Patrick’s blog and Karine’s blog (she posted some screenshots). The Blueprint will also be announced by Bill Gates during the SharePoint Conference keynote later today, the SharePoint team blogged about the other announcements as well (SharePoint Online and Microsoft Search Server 2008 Epxress).

Posted in Sharepoint | Tagged: , | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.

Join 28 other followers