Does not work on hosted provider

Dec 22, 2008 at 10:47 PM
This loader is cool, but while everything is fine when testing using VS local web server, when i upload the project to my hosting provider splash screen gets stuck, and i never see the progress.
It looks like that for some strange reason loader can't dowload the real application.
Do i need to include any additional file?

Thanks
Coordinator
Dec 23, 2008 at 1:12 AM
Edited Dec 23, 2008 at 1:39 AM

Hi Corcav,

You don't need any additional file it should work the same way as it did on your local.

The most common reason for these kind of problems is a missing resource or some kind of network access permission problem.

First make sure that you remembered to upload both the application and the loader to the server.

In any case the good news is that you can debug the problem even if its on the server.

To find out if the problem really has to do with the loader or something else.

Open your project solution in Visual studio.

Go to your downloadCompleteCallback handler and put a break point in that function (you can also put a message box if that's more convenient  for you).

public void downloadCompleteCallback(Uri packageSource, DownloadCompleteEventArgs eventArgs)
{
     if (eventArgs.Error != null
     {

        // take a look at the error or display it in a message box etc....

      }
}

Run your application and then in the browser enter the url of your application on the remote server.

The break point should be hit and you can debug (if you are running the same version as the application that is on the server).

Good luck!

 P.S make sure you have the latest version of Silverlight loader. I released a patch with some bug fixes not long ago.

http://www.codeplex.com/SilverlightLoader/Release/ProjectReleases.aspx?ReleaseId=19648

Dec 23, 2008 at 7:19 AM
Thanks for your help,
Problem was on my side and things are going better now, I just have the following issue:
If i open the application using www.mysite.com/default.aspx everything goes fine, but if i just use www.mysite.com the application doesn't get dowloaded.
I presume that it might depend on dowloader not finding application's xap, do you have an idea of how to fix this?

Great work!
Coordinator
Dec 23, 2008 at 7:16 PM
Edited Dec 23, 2008 at 7:17 PM

Thanks Corcav,

The problem you are describing should be solved if you use the latest version (1.1).
There was a bug in version 1.0 that caused XAP files served from the root url not to work in some cases.

To solve the problem just download the latest version of SilverlightLoader.cs and replace the old one you currently use with the new one. You can find the fixed version at:
http://www.codeplex.com/SilverlightLoader/Release/ProjectReleases.aspx?ReleaseId=19648

 

Dec 24, 2008 at 5:25 AM
Thanks apijunkie,
Using the new release works like a charm!