?
Solved

Error code 4001

Posted on 2009-04-23
12
Medium Priority
?
1,274 Views
Last Modified: 2013-11-12
Hi

I have build a sample silverlights application

folder structure of the application is

"test.html" -- > where code is written
folders-->
js  --> where silverlight.js is placed.
xaml --> where xaml file is placed.
images --> where image file is placed .

I am also attaching the xaml code in the code section.

But I am getting an error 4001. I am attaching the screen shot the error.
Am I missing something.
<Canvas   xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Background="#FF90EE90" Width="500" Height="500">
	<Canvas>
		<Ellipse Height="50" Width="50" Stroke="Black" StrokeThickness="5" Fill="Yellow" />
	</Canvas>
	<Canvas MouseLeftButtonDown="changelocation">
		<TextBlock x:Name="Hello" Canvas.Left="0" Canvas.Top="50" Foreground="Blue" Text="Hello Silverlight" />
		
	</Canvas>
	<Canvas>
		<Image x:Name="myImage" Stretch="Uniform" Source="images\1.GIF" Canvas.Top="50" Canvas.Left="50"></Image>
	</Canvas>
</Canvas>

Open in new window

error-4001.GIF
0
Comment
Question by:KaranGupta
  • 3
  • 3
  • 3
  • +1
11 Comments
 
LVL 16

Expert Comment

by:CuteBug
ID: 24222228
Have you installed beta version of Silverlight?

If yes, uninstall and install a fresh version of Silverlight 2.0.
0
 
LVL 16

Expert Comment

by:CuteBug
ID: 24222236
0
 

Author Comment

by:KaranGupta
ID: 24222331
If I see the version of silverlight then

2.0.40115.0

where can I get the fresh version of silverlight 2.0
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
LVL 16

Expert Comment

by:CuteBug
ID: 24222522
Visit the microsoft site.

Also which version of Internet explorer are you using?
0
 

Author Comment

by:KaranGupta
ID: 24222623
I am using version 7.0

But I do have silverlights 2.0
0
 
LVL 9

Expert Comment

by:peterdungan
ID: 24230746
You can't use gifs in Silverlight - use a jpg instead.
0
 
LVL 8

Expert Comment

by:unmeshdave
ID: 24235169
0
 
LVL 9

Expert Comment

by:peterdungan
ID: 24235557
It's not a Silverlight bug causing this - it's using a gif with Silverlight. You can't use gifs with Silverlight - you can only use jpgs or pngs.
0
 
LVL 8

Expert Comment

by:unmeshdave
ID: 24236615
well, I agree that there is no support for gif with SL. but thats not the only reason which cause this error which author posted.
0
 

Author Comment

by:KaranGupta
ID: 24247476
Hi

I have used JPG file as well but still I am getting this error.

I am attaching the sample example.

Please look into it.

I have changed the file extension to .txt , please change it to .rar then open it
Basic-silverlight-example.txt
0
 
LVL 9

Accepted Solution

by:
peterdungan earned 2000 total points
ID: 24266558
The path is incorrect
It should be:
Source="images/1.jpg"
instead of
Source="../images/1.jpg"
It works if this is changed.
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
SingleRun is a tool that ensures that only one instance of an application is started, running it again brings the application to focus.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question