Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

Files to webserver RSS

11 replies

Last post May 05, 2008 08:31 AM by mchlsync

(0)
  • haagel

    haagel

    Member

    97 Points

    98 Posts

    Files to webserver

    Apr 08, 2008 12:17 PM | LINK

    How do I get my Silverlight application to my webserver in the "right" way?

    When I tried this I just took the content of the "ClientBin" folder and uploaded to the server. This works, but I'm guessing there must be a better way. Maybe all those files aren't needed?

    So, which files do I have to upload to make my app work? And what is the best method of doing this? Just copying them from the ClientBin seems a bit strange, but I can't find any "Publish" or similiar. I'm not talking about the uploading process itself (FTP works fine) but rather the process of getting the necessary files out of my Silverlight project in Visual Studio.

    Is there a good guide for stuff like this that you can point me to? I would really like to get a grip of this since it seem like important basics.
     

  • mchlSync

    mchlSync

    Star

    14968 Points

    2799 Posts

    Re: Files to webserver

    Apr 08, 2008 02:41 PM | LINK

    If you are talking about Silverlight 2, you just need to copy .xap file and webpage that you host the Silverlight content.

    (If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

    Regards,
    Michael Sync
    Silverlight MVP

    Blog : http://michaelsync.net
  • haagel

    haagel

    Member

    97 Points

    98 Posts

    Re: Files to webserver

    Apr 08, 2008 02:52 PM | LINK

    Ok, that's nice! :)

    But what about "producing" the files. Should I just go into the "ClientBin" and grab those files? I know I can do that, but is that the way the Silverlight development team mean you to do? I know it doesn't matter in the end, I'm just curious about what the best and most convinient way to work with Silverlight projects is.

    Also, if i create a Silverlight application with an ASP.NET website and run a Publish on the website, the .xap is put into the "ClientBin" folder. But there's also some files put into the the "bin" folder: System.Web.Silverlight.dll and System.Web.Silverlight.resources.dll. What are those files?
     

  • mchlSync

    mchlSync

    Star

    14968 Points

    2799 Posts

    Re: Files to webserver

    Apr 08, 2008 03:10 PM | LINK

    haagel

    what about "producing" the files. Should I just go into the "ClientBin" and grab those files?
     

    Yes. It's better if you just go and grab those files. If not, you can manually generate xap file by using Chiron.exe from Silverlight SDK.

     

    haagel

    is that the way the Silverlight development team mean you to do?

    I can't say for Silverlight team but this is the way that I used to do. :) maybe, Someone from Silverlight team may give you the exact answer.

    Initally, System.Web.Silverlight.dll is from ASP.NET 3.5 extension. Now, this dll is added to Silverlight 2 SDK. 

    If we create a Silverlight application with ASP.NET, we used asp:Silverlight control. This control comes from this dll. So, if you don't have ASP.NET 3.5 extension or Silverlight SDK installed in your server, you will need to copy this file.

    I think System.Web.Silverlight.resources.dll is the satellite assembly for  System.Web.Silverlight.dll

    Hope it helps.  

    (If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

    Regards,
    Michael Sync
    Silverlight MVP

    Blog : http://michaelsync.net
  • cdubone

    cdubone

    Member

    204 Points

    260 Posts

    Re: Files to webserver

    May 03, 2008 09:40 PM | LINK

    I'm confused about this. I tried copying the Default.html and the xap from the bin/Debug folder to my web server but when I go to the page there is nothing but a white page. No errors or anything, just a white page. Anyone know what I need to do here?

    Chris Williams
  • mchlSync

    mchlSync

    Star

    14968 Points

    2799 Posts

    Re: Files to webserver

    May 04, 2008 07:03 AM | LINK

    cdubone

    I'm confused about this. I tried copying the Default.html and the xap from the bin/Debug folder to my web server but when I go to the page there is nothing but a white page. No errors or anything, just a white page. Anyone know what I need to do here
     

    If you are using IIS, you need to register MIME type for xap. If you don't know how to do it, please google "Register MIME for xap extension" .

    (If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

    Regards,
    Michael Sync
    Silverlight MVP

    Blog : http://michaelsync.net
  • cdubone

    cdubone

    Member

    204 Points

    260 Posts

    Re: Files to webserver

    May 04, 2008 07:03 PM | LINK

    Ah ha! That's it. Unfortunately I just found out my host doesn't support Silverlight.

    Thanks for the help! 

    Chris Williams
  • haagel

    haagel

    Member

    97 Points

    98 Posts

    Re: Files to webserver

    May 04, 2008 09:36 PM | LINK

    cdubone

    Ah ha! That's it. Unfortunately I just found out my host doesn't support Silverlight.

    Thanks for the help! 

     

    The .xap is really just a .zip, so you can rename it to .zip and it will work just as fine. Remember to update the filename in the HTML also though.

    The only thing the host need is the xap MIME, and if you rename to .zip the host only need zip MIME (which most hosts have).
     

  • cdubone

    cdubone

    Member

    204 Points

    260 Posts

    Re: Files to webserver

    May 05, 2008 12:08 AM | LINK

    That did the trick!
    Chris Williams
  • mchlSync

    mchlSync

    Star

    14968 Points

    2799 Posts

    Re: Files to webserver

    May 05, 2008 01:34 AM | LINK

    Good. but your application won't work for those who are behind the cooperate network. The most of Offices don't allow people to download zip file.  

    (If this has answered your question, please click on "Mark as Answer" on this post. Thank you!)

    Regards,
    Michael Sync
    Silverlight MVP

    Blog : http://michaelsync.net