Click here to Skip to main content
15,892,480 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi ,

I downloaded this Silverlight project in order to use it on my asp webproject .

http://designwithsilverlight.com/?p=162


The slide show works fine inside its project with WCF methode that returns the img url from my database .

but when I add the XAP file and the html test page to my web project , no img loaded .

any idea ?

when I use wbeservice\WCF outside from the Silverlight WebHost project as the webreference i'm getting this error :

An error occurred while trying to make a request to URI'localhost:25573/WebService1.asmx'.This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services.You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. –
Posted
Updated 26-Jun-11 1:11am
v3
Comments
Mark Salsbery 26-Jun-11 12:31pm    
Did you move the WCF service server-side code into your web project or are you you leaving it where it was? If the latter, then you'll need to have a cross-domain policy in place for it to work.
idanb 26-Jun-11 17:00pm    
At start I moved the WCF service to the webproject , and it didnt work ,than I moved it back to the silverlight host project and it worked . thats the big problem, I need it to work with the WCF in my webproject ...
Mark Salsbery 26-Jun-11 17:11pm    
Please use the "Reply" link here when replying to comments, otherwise the person you are replying to doesn't get notified! :) If applicaple, did you move the WCF configuration over (all the WCF stuff in web.config)? Also if any namespace and/or class names changed in the move then you may need to change those in the configuration. Test your service by hitting the service URL from a browser....if you see the WCF service page then at least it's up and working.
idanb 26-Jun-11 17:51pm    
Thanks Mark , I already have WCF in my webproject that works for other things , I', trying to use it Insted the WCF inside SL project , I didnt moved the Web.config becuase I already got one im my webproject.
idanb 26-Jun-11 18:37pm    
can you explain more or show me an example ?
10x .

1 solution

Make sure the startup is set to the html test page.
You can right click on the file and "set as startup".
 
Share this answer
 
Comments
idanb 26-Jun-11 6:25am    
I tried that , no change .

I can see that the Xap file loaded , but no photos inside it , I opened a new WCF inside my webproject , I tried to get the Imgurls from database through it , seems there's a problem with that becuase it doent work , but the WCF inside the silverlight webhost project it works , I'm confused ....

how can I fix that ?
Abhinav S 26-Jun-11 7:20am    
You are probably reading the URL of the webservices throught the aspx page (through initparms or some other mechanism).
This code wont be there in the html page - this could be another reason for the error.
idanb 26-Jun-11 7:22am    
I'm using the silverlight HTML testpage, it works gr8 inside the sildeshow project but not inside the webproject.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900