This project is read-only.

Just getting a black screen?

Oct 27, 2008 at 10:02 PM
Edited Oct 29, 2008 at 8:52 PM

I am getting just a black screen and have been unable to figure out why. Below are the htm and xml file contents. I have no new .js file to go with SL2 nor have I refrenced the old one for SlideShow 1.2. Any ideas? Thank you for your time.
<html>
<body>

<object type="application/x-silverlight-2" data="data:application/x-silverlight-2," width="1024" height="768"> 
 <param name="background" value="black" />
 <param name="minRuntimeVersion" value="2.0.31005.0" />
 <param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"><img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/></a>
 <param name="source" value="code/Vertigo.SlideShow.xap" />
 <param name="initParams" value="ConfigurationProvider=LightTheme,DataProvider=XmlDataProvider;Path=Data2.xml"/>
</object>

</body>

</html>


<data transition="CrossFadeTransition">

 <album
  title="Album 1"
  description="First try"
  source="Images/album.jpg">
  
  <slide
   title="Kid on a swing"
   description="testing"
   source="Images/kswing.jpg"
   thumbnail="Images/t-kswing.jpg" />
  <slide
   title="Rainy day"
   description="testing"
   source="Images/misting.jpg"
   thumbnail="Images/t-misting.jpg" /> 
 </album>
</data>

Oct 27, 2008 at 10:20 PM
Hi dcmckinney,

Where abouts is your data2.xml file located? In Silverlight 2 all images, videos and XML files are relative to the directory in which the .XAP file is located. Based on your code snippets above I would expect data2.xml to be located in the code directory and a directory called Images to be located in the code directory. Is this the case?

Cheers,
Liam
Oct 28, 2008 at 12:18 AM
I'm having similar problem, except i get a while screen.  Everything is in the same folder.  Here's part of the code:
[slide.aspx]
<div>
<object type="application/x-silverlight-2"
    data="data:application/x-silverlight-2,"
    width="520" height="390">
    <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"><img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/></a>
    <param name="minRuntimeVersion" value="2.0.31005.0" />
    <param name="autoUpgrade" value="true" />
    <param name="source" value="Vertigo.SlideShow.xap" />
    <param name="initParams" value="ConfigurationProvider=XmlConfigurationProvider;Path=config.xml,DataProvider=XmlDataProvider;Path=data.xml" />
</object>
</div>
<!-------------------->
[config.xml]
<?xml version="1.0" encoding="utf-8" ?>
<configuration background="Black">
  <module name="NavigationTray">
    <option name="Enabled" value="true" />
    <option name="BackgroundOpacity" value="1" />
    <option name="Background" value="Black" />
  </module>
  <module name="SlideViewer" />
  <module name="SlideDescription" />
  <transitions>
    <transition type="FadeTransition" name="CrossFadeTransition" />
    <transition type="WipeTransition" nam="WipeRightTransition" />
    <option name="direction" value ="Right" />
  </transitions>
</configuration>
<!---------------->
[data.xml]
<data transition="CrossFadeTransition">
  <album title="Photos" description="Various Photos">
    <slide title="Slide Title #1" description="Slide Description #1" source="128358 164.jpg" />
    <slide title="Slide Title #2" description="Slide Description #2" source="128358 173.jpg" />
    <slide title="Slide Title #2" description="Slide Description #2" source="camping may27-29 031.jpg" />
  </album>
</data>


Oct 28, 2008 at 12:28 AM
I think that I have same problem with you guys. I get black screen, too. But it would run if I use Visual Studio.
Oct 28, 2008 at 4:16 PM
Add me to that list of black screen when on the web server.  it runs fine in Visual Studio. I checked the file structure and contents and they match exactly.  Not sure what's going on.  Could it be the way the project is built for deployment?

-Trish
Oct 28, 2008 at 4:16 PM
Add me to that list of black screen when on the web server.  it runs fine in Visual Studio. I checked the file structure and contents and they match exactly.  Not sure what's going on.  Could it be the way the project is built for deployment?

-Trish
Oct 29, 2008 at 3:49 PM
Hi phamtq,

Your config.xml file does not look valid to me. Can you try running with the confuguration.xml file that is included in the samples and see if that helps.

Cheers,
Liam
Oct 29, 2008 at 3:54 PM
Just for another point of reference, I'm using the same configuration as dcmckinney.  I feel like we're getting close though...

Thanks!
Oct 29, 2008 at 4:29 PM
I am not even using a configuration XML file. Just trying to get the slideshow to display.
On the server side, I am running .Net 3.5 with IIS 7.0.6000.16386 on a Win 2008 64 bit server.
On the client side, I have tried IE, Firefox, and Chrome all with the same results.

I did not use VS or any tool other than notepad to put this together. Could the dev tools be doing something automatically that isn't covered in the documentation which is causing this?

Is there any requirement other than having Silverlight 2 installed (which I have) that I could be missing?
Oct 29, 2008 at 5:44 PM

Hi all,

I suspect this is most likely a mime type issue within IIS can you check your mime types within IIS and verify the following entries are there. If not can you add the, do an IISREST and then check and see if it works?

The fact that mautuyet can see it in his dev environent through VS but not IIS is an indicator of this.

 

.xaml application/xaml+xml

.xap application/x-msdownload

 

Cheers,

Liam

Oct 29, 2008 at 7:13 PM
That was a good thing to look at.

This was set:
.xaml application/xaml+xml

This is what XAP was set to:
application/x-silverlight-app

I tried the following for the .xap mime type (with IISreset's between of course) with no change in my result:
application/x-silverlight-2
application/x-msdownload

Some interesting information was on the following link.. didn't wind up making my results any different though.
http://blogs.msdn.com/katriend/archive/2008/10/14/silverlight-2-rtw-all-the-links-you-need-to-get-started.aspx

Oct 29, 2008 at 8:06 PM
Hi dcmckinney,

can you please post a copy og the html you are using, along with a copy of the data.xml file you are using. can you also describe the folder structure you are using?

Cheers,
Liam
Oct 29, 2008 at 8:56 PM
Edited Oct 30, 2008 at 4:40 PM
My original post has the totality of both files. (I was missing the <html> tags, but I put them in now).
All this is, is a simple page to try out the SS2  tool.

-D

Edit: I forgot to refrence my folder structure.
Root (htm and xml files are located here)
Root\Images (jpeg files)

that is it... no client bin, no dlls, nothing. Thus my questions about what might be needed other than just the XAP file.
Oct 29, 2008 at 9:36 PM
Hi Imolloy,
I checked the mime types inside the IIS like you said, but won't fix the issue. My did change my XAP to application/x-msdownload from application/x-silverlight-app. The page I tried to run is default.html from example folder that I download from this website.
Oct 30, 2008 at 7:24 PM
hi dcmckinney,

your object tag's source parameter references a code directory which is where your .xap file is located. <param name="source" value="code/Vertigo.SlideShow.xap" /> Is this .value/location correct? You don't mention a code directory in your post above.

If so then based on your data.xml file I would expect your images lo live underneath the code directory (root\code\images) as images and videos are reletive to the .XAP file

<data transition="CrossFadeTransition">

 <album
  title="Album 1"
  description="First try"
  source="Images/album.jpg">
  
  <slide
   title="Kid on a swing"
   description="testing"
   source="Images/kswing.jpg"
   thumbnail="Images/t-kswing.jpg" />
  <slide
   title="Rainy day"
   description="testing"
   source="Images/misting.jpg"
   thumbnail="Images/t-misting.jpg" /> 
 </album>
</data>



Cheers,
Liam
Oct 31, 2008 at 5:30 AM
Hey Liam,

I've ran your same within Visual Studio and was able to see the everything except for the images itself.  Even if I click on the thumbnail, the image does not appear in the panel.  I also used your sample to load my, but it still a blank screen.  Here's my folders structure:

<root>
+<Bin>
++Vertigo.SlideShow
+<Images>
++<Folder1>
+++data.xml
+++config.xml
+++images.jpg
default.aspx

In the default.aspx, I have the following:
<object type="application/x-silverlight-2" data="data:application/x-silverlight-2," width="640" height="480">
            <param name="background" value="#000" />
            <param name="source" value="Bin/Vertigo.SlideShow.xap" />
            <param name="initParams" value="ConfigurationProvider=LightTheme,DataProvider=XmlDataProvider;Path=../Images/Folder1/data.xml" />
            <a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"><img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /></a>
        </object>

Now, originally, this did not work so I moved the xap to another folder, App_Scripts.  This is where I have the original Silverlight.js and Slideshow.js.  After moving the xap file and modified the param for the source to value="App_Scripts/Vertigo.SlideShow.xap".  The slide show works!!

I had to change the configuration as I had used settings from the original slide show. 

I'm unable to remove the embedded items from the navigation menu, like the album button or embedded viewer.

Nov 3, 2008 at 2:13 PM
Liam,
That was it exactly. Sorry, I had switched several times between using my code directory and not. If I have the XAP file in the root and the images in root/images, then it all works just fine. So... great!!

However... it's kind of strange, but I seem to HAVE to use a sub folder of the container holding the XAP file in order for the slide show to see the images. On the Data.xml, if I specify something like this:

  <slide
   title="Kid on a swing"
   description="testing"
   source="../Images/kswing.jpg"
   thumbnail="../Images/t-kswing.jpg" />

Slide.Show can't seem to find the images. Is that something that I am doing incorrectly or is it a definate setting that sub folders for images have to either be full URL's or subfolders of the XAP file's container?

For me to get the slideshow working, I changed <param name="source" value="code/Vertigo.SlideShow.xap" />  to <param name="source" value="Vertigo.SlideShow.xap" /> and copied the Vertigo.SlideShow.xap file from the root/code folder to the root folder.

Once again, thanks :-)
-D
Nov 5, 2008 at 5:59 PM
I am also having problems with the black screen.  I have read through the above discussions and tried to figure out if any of them apply to my situation.  All I get is a black spot on my screen.  I can right-click on it and get the configuration pop-up for SilverLight2.

My config:
root
root\images

.xap & .xml files are in root
Default.aspx in root
images are all under root\images

+++from default.aspx+++
<object type="application/x-silverlight-2" data="data:application/x-silverlight-2," width="340" height="204">
<param name="background" value="black" />
<param name="source" value="Vertigo.SlideShow.xap" />
<param name="initParams" value="ConfigurationProvider=LightTheme,DataProvider=XmlDataProvider;Path=slideshow.xml"/>
<param name="autoUpgrade" value="true" />
<a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"><img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none"/></a>
</object>
+++++++++++++++

+++slideshow.xml+++
<data transition="CrossFadeTransition">
  <album title="NCBC" description="NCBC Camps" source="images/horseback.jpg">
    <slide title="Slide Title #1"
           description="Slide Description #1"
           source="images/archery.jpg"/>
    <slide title="Slide Title #2"
           description="Slide Description #2"
           source="images/horseback.jpg"/>
    <slide title="Slide Title #3"
           description="Slide Description #2"
           source="images/climbing340x204.jpg"/>
  </album>
</data>
++++++++++++++++

What am I missing????

Thank you,
aaron

Nov 5, 2008 at 6:19 PM
Edited Nov 5, 2008 at 7:23 PM
Make sure you check your IIS mime types

If:
.xap    application/x-silverlight-2

is not what you see for XAP or if XAP is imissing, then this can present in this manner.
Nov 5, 2008 at 7:08 PM
Thank you,
I had made a mistake on the mime type. 

It now works...now to create a custom configuration....
Dec 1, 2008 at 4:34 PM
Thanks for all answers. I've same problem and it works now with "setting mime type" and setting correct path to .xap and data.xml file.
Jan 13, 2009 at 4:43 AM
Can someone tell me how to check/set my mime types.  I'm working on my local machine and the site is hosted with go daddy.
Jan 14, 2009 at 2:04 PM
In IIS (6) right click on your website and goto properties. Then, click on the HTTP Headers tab and in the bottom grooup box MIME Map click on File Types...

If your hosting is shared you will need to contact GoDaddy to check the mime type. If your hosting is dedicated RDP to your server and follow the above step.
Jan 17, 2009 at 5:13 PM
I too am experiencing the Black Screen... I tried to dummy it down to the lowest possible config... Everything is currently in my root directory

wwwroot
wwwroot/default.aspx
wwwroot/slideshow.xml
wwwroot/vertigo.slideshow.xap
wwwroot/slideshow/1128947-original.jpg
wwwroot/slideshow/1128496-original.jpg

<object type="application/x-silverlight-2" data="data:application/x-silverlight-2," width="640" height="480">
<param name="background" value="black" />
<param name="source" value="Vertigo.SlideShow.xap" />
<param name="initParams" value="ConfigurationProvider=SimpleTheme,XmlDataProvider;Path=SlideShow.xml"/>
<a href="http://go.microsoft.com/fwlink/?LinkID=124807" style="text-decoration: none;"><img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style: none" /></a>
</object>

<?xml version="1.0" encoding="utf-8" ?>
<data transition="CrossFadeTransition">
<album>
<slide title="Number One" source="SlideShow/1128496-original.jpg" />
<slide title="Number Two" source="SlideShow/1128947-original.jpg" />
</album>
</data>
Jan 17, 2009 at 5:26 PM
Also...
I am simply trying to run it out of VS 2008 on my Vista box, so I don't think its an IIS issue.
Jan 17, 2009 at 7:11 PM
In your SlideShow.xml, remove the 1st line "<?xml version="1.0" encoding="utf-8" ?>", and see what it does... mine wasn't working 'till I did that...
Jan 17, 2009 at 7:33 PM
Na... that made no difference.
Jan 18, 2009 at 12:08 AM
Never mind... I got it
<param name="initParams" value="ConfigurationProvider=SimpleTheme,XmlDataProvider;Path=SlideShow.xml"/>
Should Be..
<param name="initParams" value="ConfigurationProvider=SimpleTheme,DataProvider=XmlDataProvider;Path=SlideShow.xml"/>
Sep 15, 2010 at 10:11 PM

Hi everyone.

I have read all posts and just adding a new mime type works for me. Thanks a lot!

.xap application/x-silverlight-2

Fabio Lima