Can't upload Default.html.js from samples
Last post 05-08-2007 4:51 PM by ddechant. 5 replies.
Sort Posts:
04-30-2007 7:20 PM
Can't upload Default.html.js from samples

I have a slight problem trying to test the new samples for either 1.0 beta and 1.1 alpha versions of silverlight.

There is always a Default.html.js file in the archive and I can't open it and so can't upload it to my server.

So my questions are: what are these Default.html.js files for and why can't I open them and upload them to my server?

 Thanks

 OzFab

OzFab

Loading...
Joined on 04-30-2007
Posts 3
05-02-2007 3:33 PM
Re: Can't upload Default.html.js from samples

Default.html.js contains the method call that initializes the Silverlight plug-in on the containing HTML page (default.html). In a typical Web file model, default.html is mostly HTML but contains a DIV and Script block that calls the CreateSilverlight method from default.html.js. Generally for each Web page that contains a Silverlight plugin, you customize the parameters in CreateSilverlight so that you can at very least size the control, and specify the XAML page that loads the UI. For more info on that: http://msdn2.microsoft.com/en-us/library/bb412401.aspx

 In the above link, what's refered to as CreateSilverlight.js is basically the same file as Default.html.js in the samples, and is also basically the same file as TestPage.html.js that comes from the 1.1 alpha tools installed Silverlight project templates for Visual Studio "Orcas". There are slight inter-related variations in projects/naming schemes/folder structures but the idea is the same: define a script method that instantiates the plug-in, in such a way that you don't need to change anything in the other JS file (Silverlight.js) and you could deploy Silverlight.js site-wide, as-is.

I don't really know how to address your specific problem with the archives of the samples. Sometimes the archive viewer (before extracting, just from doubleclick of .ZIP) is funny about how it acts with file extensions of the in-archive files, and a lot of that will depend on your unique system configuration, so I might not be seeing what you see. I'd recommend just Extract All and view the expanded archive, which gets the files out of the viewer and into the "real" file system. Sorry if that's what you're already doing, it isn't clear from your question.

Wolf Schmidt (MSFT)

Loading...
Joined on 05-02-2007
Posts 16
05-04-2007 5:17 PM
Re: Can't upload Default.html.js from samples

Thank you for your help.

I've finally found what was wrong on my computer. My Antivirus (AVG) blocked the Default.html.js file so it couldn't be opened and so not transfered as well. After uninstalling AVG everything is back to normal and working fine.

OzFab

Loading...
Joined on 04-30-2007
Posts 3
05-07-2007 8:24 AM
Re: Can't upload Default.html.js from samples

Hi, I'm curious. 'Working fine'... Except you have just opened up your system to attack.... Did you just sleepwalk into that?

Clearly AVG ID's these files as a threat. Whether thay are or not (in this case, not) why would you consider removing your AV to allow Silverlight projects to run?

It seems to me that removing AVG opens the door to every other possible script exploit and leaves a system wide open & vulnerable? Why does Silverlight NEED to operate with files that AVG ID's as a threat? ie html.js

smiler in the sun

S.Miller

Loading...
Joined on 05-07-2007
Scotland
Posts 4
05-07-2007 8:44 AM
Re: Can't upload Default.html.js from samples

When I said "I've removed AVG" I meant "I replaced it with another antivirus" so I think my computer is still safe.

I've choosen Avast as it has a free edition. I still have no problem yet (no viruses) and I can now play with Silverlight :) So yes it's working fine for me now :)

OzFab

Loading...
Joined on 04-30-2007
Posts 3
05-08-2007 4:51 PM
Re: Can't upload Default.html.js from samples
I've got the same problem here and unfortunately I'm in the position where uninstalling AVG off of my work machine is not an option.I'm not entirely sure why someone decided to name that particular file with double extensions, but I do understand why AVG is blocking it. Any way around it?
ddechant

Loading...
Joined on 05-08-2007
Posts 1
Page view counter