?
Solved

How to deploy silverlight application?

Posted on 2010-08-21
8
Medium Priority
?
1,024 Views
Last Modified: 2013-11-12
Hi,

I created a small  silverlight application with  button and text . I want to deploy this  application in IIS.
How can I do that. Can you please let me  know step by step.
0
Comment
Question by:N_Sri
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 27

Accepted Solution

by:
nmarun earned 1336 total points
ID: 33493781
Sri, Use Visual Studio's publish feature. Right-click on your project and choose Publish... point the publish folder to a local folder, say 'c:\temp\mySlApp'. Once the process is complete, all you need to do is to copy the entire folder structure (inside the 'mySlApp' folder) to your hosting server.Unless there's something weird on your hosting server, you should be able to get your SL app working.Arun
0
 
LVL 16

Assisted Solution

by:Vikram Singh Saini
Vikram Singh Saini earned 664 total points
ID: 33493900
Hi,

I am assuming that you are creating your Silverlight application using Visual studio 2010 and Silverlight 3.0. And you are having OS Windows XP SP2 and IIS 5.1.

But one thing I came to know about the deployment of the Silverlight Application on IIS is that you need to register some of the MIME types with IIS. By default IIS 7.0 have that mime support default. However for registering MIME types with IIS 5.1 and 6.0 you can check link:
http://techencoder.com/index.php/2009/05/deploying-silverlight-2-on-iis/

I learned Silverlight and created application after reading your problem statement. I used two buttons named Submit and Reset. One TextBox for accepting user name and label to show that name.
Steps for Deployment of Silverlight App on IIS 5.1:

(1) Start --> Control Panel --> Internet Information Services.

(2) In IIS window, Default Web Site --> Right Click --> New --> Virtual Directory. (I am assuming that you are aware of creating virtual directory on IIS, if not please let me know back).

(3) You would need to set DefaultDocument for your website by selecting your alias or virtual directory you created earlier in step2 and then right click --> Properties --> Tab Documents -->And here set your default page (In my case it was http://localhost/Silverlight/) -->OK.

(4) Now open your web browser. I used both Internet Explorer and Mozilla Firefox 3.5. And type as http://localhost/Silverlight/ where Silverlight is the name of the virtual directory created by you in the step 2.

Now you would see the default page set by you.

Regards,
V.S.Saini


-------------------------
// Mainpage.xaml
-------------------------
<UserControl x:Class="MyFirstSL.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400" xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input">

    <Grid x:Name="LayoutRoot" Height="199" Width="328" Background="WhiteSmoke" Margin="1" UseLayoutRounding="True" ShowGridLines="False">
        <Button Content="Submit" Height="23" HorizontalAlignment="Left" Margin="144,135,0,0" Name="btnSubmit" VerticalAlignment="Top" Width="75" Click="btnSubmit_Click" />
        <dataInput:Label Height="23" HorizontalAlignment="Left" Margin="12,86,0,0" Name="label1" VerticalAlignment="Top" Width="100" Content="Enter your Name:" />
        <dataInput:Label Height="22" HorizontalAlignment="Left" Margin="102,12,0,0" Name="label2" VerticalAlignment="Top" Width="151" Content="MY FIRST SL APPS." FontFamily="Trebuchet MS" FontSize="13" Foreground="DarkOrange" FontWeight="ExtraBold"></dataInput:Label>
        <dataInput:Label Content="Status:" Height="23" HorizontalAlignment="Left" Margin="12,164,0,0" Name="lblStatus" VerticalAlignment="Top" Width="304" Foreground="Blue"></dataInput:Label>
        <TextBox Height="23" HorizontalAlignment="Left" Margin="120,86,0,0" Name="txtName" VerticalAlignment="Top" Width="188" Foreground="Navy" />
        <Image Height="58" HorizontalAlignment="Left" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="79" Source="/MyFirstSL;component/Images/logo_SilverLight1.JPG" Margin="12,12,0,0" />
        <Button Content="Reset" Height="23" HorizontalAlignment="Left" Margin="233,135,0,0" Name="btnReset" VerticalAlignment="Top" Width="75" Click="btnReset_Click" />
    </Grid>
</UserControl>

-------------------------------
// Mainpage.xaml.cs
-------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace MyFirstSL
{
    public partial class MainPage : UserControl
    {
        public MainPage()
        {
            InitializeComponent();
        }

        private void btnSubmit_Click(object sender, RoutedEventArgs e)
        {
            lblStatus.Content = "Your Name: "+this.txtName.Text;
        }

        private void btnReset_Click(object sender, RoutedEventArgs e)
        {
            this.txtName.Text = String.Empty;
            lblStatus.Content = "Status:";
        }        
    }
}

Open in new window

SA.bmp
0
 
LVL 16

Expert Comment

by:Vikram Singh Saini
ID: 33493918
Hi,

Sorry I mentioned wrong OS Windows XP SP2 but it is SP#. Because VS 2010 needs SP3 minimum for installing.

 However deployment steps discussed above can be tried with any application created with any tool.

Regards,
V.S.Saini
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 27

Expert Comment

by:nmarun
ID: 33556249
You need any other help on this?

Arun
0
 

Author Comment

by:N_Sri
ID: 33599594
Can you please help how to deploy in IIS 7 WebServer
0
 

Author Comment

by:N_Sri
ID: 33599701
Please let me know the steps how to publish and and how to deploy it.

0
 
LVL 16

Expert Comment

by:Vikram Singh Saini
ID: 33601781
Follow the steps mentioned above. I think they would work successfully in case of deployment too. And in IIS 7.0 you would not need to register mime types. They are already there (based on reading online).

Let us know the result back.
0
 
LVL 27

Assisted Solution

by:nmarun
nmarun earned 1336 total points
ID: 33606637
What happens when you do as I posted?

Arun
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question