Files to webserver
Last post 05-05-2008 4:31 AM by mchlsync. 11 replies.
Sort Posts:
04-08-2008 8:17 AM
Files to webserver

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.
 

haagel

Joined on 04-03-2008
Posts 16
04-08-2008 10:41 AM
Re: Files to webserver

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!)

Best Regards,
Michael Sync

Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed

mchlsync

Joined on 09-16-2005
Singapore
Posts 2,021
04-08-2008 10:52 AM
Re: Files to webserver

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?
 

haagel

Joined on 04-03-2008
Posts 16
04-08-2008 11:10 AM
Marked as Answer
Re: Files to webserver

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!)

Best Regards,
Michael Sync

Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed

mchlsync

Joined on 09-16-2005
Singapore
Posts 2,021
05-03-2008 5:40 PM
Re: Files to webserver

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

cdubone

Joined on 03-11-2008
Seattle
Posts 77
05-04-2008 3:03 AM
Re: Files to webserver

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!)

Best Regards,
Michael Sync

Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed

mchlsync

Joined on 09-16-2005
Singapore
Posts 2,021
05-04-2008 3:03 PM
Re: Files to webserver

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

Thanks for the help! 

Chris Williams

cdubone

Joined on 03-11-2008
Seattle
Posts 77
05-04-2008 5:36 PM
Re: Files to webserver

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).
 

haagel

Joined on 04-03-2008
Posts 16
05-04-2008 8:08 PM
Re: Files to webserver
That did the trick!

Chris Williams

cdubone

Joined on 03-11-2008
Seattle
Posts 77
05-04-2008 9:34 PM
Re: Files to webserver

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!)

Best Regards,
Michael Sync

Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed

mchlsync

Joined on 09-16-2005
Singapore
Posts 2,021
05-05-2008 4:17 AM
Re: Files to webserver

mchlsync:

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.  

Does .xap work fine in those cases? Does these offices have a list of forbidden file types or a list of allowed file types? Just curious...
 

haagel

Joined on 04-03-2008
Posts 16
05-05-2008 4:31 AM
Re: Files to webserver

haagel:
Does .xap work fine in those cases?
 

Yes.. It works in my office. I tried to upload some demos in my blog and tried to access it from my office. It's working fine.

Actually, it is totally depend on your office policies. In my office, they have a list of forbidden file types (e.g. zip, exe, mp3 and etc) and a list of forbidden websites .. :(

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

Best Regards,
Michael Sync

Blog : http://michaelsync.net
Feed : http://michaelsync.net/feed

mchlsync

Joined on 09-16-2005
Singapore
Posts 2,021