I'm just trying to do those sample circles. When I run debug on visual studio, it works fine, but when I put the files on my server, I just get a blank canvas. This is the same way it acts if I misspell the xaml file. The xaml file is there.
Here is my create script.function createMySilverlightPlugin()
{
Silverlight.createObject(
"testx.xaml",
// Source property value.
parentElement,
// DOM reference to hosting DIV tag.
"mySilverlightPlugin",
// Unique plugin ID value.
{
// Per-instance properties.
width:
'1200',
// Width of rectangular region of
// plugin area in pixels.
height:
'1200',
// Height of rectangular region of
// plugin area in pixels.
inplaceInstallPrompt:
false,
// Determines whether to display
// in-place install prompt if
// invalid version detected.
background:
'#D6D6D6',
// Background color of plugin.
isWindowless:
'false',
// Determines whether to display plugin
// in Windowless mode.
framerate:
'24',
// MaxFrameRate property value.
version:
'1.0'
// Silverlight version to use.
},
{
onError:
null,
// OnError property value --
// event handler function name.
onLoad:
null
// OnLoad property value --
// event handler function name.
},
null); // Context value -- event handler function name.
I had this problem before. It is probably because MIME type for XAML is not registered on your server. Until you get it registered you can change the file extension from .xaml to .xml and this should work.
I supposed an obvious question is the typecase of the xaml file being the same as what's called out, and that it is in the same folder as the file calling it...
I recompiled and it worked now. I did have the wrong ID name in my parent element, but i'm not sure why it then worked on debug mode and not anything else.
Silverlight.createObject(
"myxaml.xml",
// Source property value.
parentElement,
// DOM reference to hosting DIV tag.
"mySilverlightPluginHost",
// Unique plugin ID value.
danparker276
Member
6 Points
5 Posts
Server isn't seeing my xaml file
Aug 18, 2007 01:24 AM | LINK
I'm just trying to do those sample circles. When I run debug on visual studio, it works fine, but when I put the files on my server, I just get a blank canvas. This is the same way it acts if I misspell the xaml file. The xaml file is there.
Here is my create script.function createMySilverlightPlugin(){
Silverlight.createObject(
"testx.xaml", // Source property value.parentElement,
// DOM reference to hosting DIV tag. "mySilverlightPlugin", // Unique plugin ID value.{
// Per-instance properties.width:
'1200', // Width of rectangular region of // plugin area in pixels.height:
'1200', // Height of rectangular region of // plugin area in pixels.inplaceInstallPrompt:
false, // Determines whether to display // in-place install prompt if // invalid version detected.background:
'#D6D6D6', // Background color of plugin.isWindowless:
'false', // Determines whether to display plugin // in Windowless mode.framerate:
'24', // MaxFrameRate property value.version:
'1.0' // Silverlight version to use.},
{
onError:
null, // OnError property value -- // event handler function name.onLoad:
null // OnLoad property value -- // event handler function name.},
null); // Context value -- event handler function name.}
VladF
Member
216 Points
87 Posts
Re: Server isn't seeing my xaml file
Aug 18, 2007 02:21 AM | LINK
I had this problem before. It is probably because MIME type for XAML is not registered on your server. Until you get it registered you can change the file extension from .xaml to .xml and this should work.
JesseLiberty
Member
511 Points
1013 Posts
Microsoft
Re: Server isn't seeing my xaml file
Aug 18, 2007 06:36 PM | LINK
Can I ask you to try this:
1. Download the template for Visual Studio and place it in the C# templates
2. Generate a new project
3. Does it recognize the xaml?
If so, my guess is you'll be happier following the create method shown in the VS template (which uses CreateObjectEx).
I recognize that this answer doesn't get to the heart of the question, but it may get you up and running quickly.
-jesse
Silverlight Geek
danparker276
Member
6 Points
5 Posts
Re: Re: Server isn't seeing my xaml file
Aug 20, 2007 09:26 PM | LINK
Didn't work for me. Tried registering it, and tried making it an xml file. Still see a blank canvas
WynApse
Star
14658 Points
343 Posts
Re: Re: Server isn't seeing my xaml file
Aug 20, 2007 11:38 PM | LINK
Can you send a link to the site?
I supposed an obvious question is the typecase of the xaml file being the same as what's called out, and that it is in the same folder as the file calling it...
-Dave
Silverlight MVP
http://www.wynapse.com
danparker276
Member
6 Points
5 Posts
Re: Re: Server isn't seeing my xaml file
Aug 20, 2007 11:45 PM | LINK
http://reports.musicreg.net/report_proj/
Here's a link to it.
typecase is good. it gives a javascript error if the file is wrong.
danparker276
Member
6 Points
5 Posts
Re: Re: Re: Server isn't seeing my xaml file
Aug 21, 2007 12:19 AM | LINK
I recompiled and it worked now. I did have the wrong ID name in my parent element, but i'm not sure why it then worked on debug mode and not anything else.
Silverlight.createObject(
"myxaml.xml", // Source property value.parentElement,
// DOM reference to hosting DIV tag. "mySilverlightPluginHost", // Unique plugin ID value.