Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Silverlight WCF crossdomain
6 replies. Latest Post by coolio on January 13, 2009.
(0)
Prasad B...
Member
170 points
39 Posts
11-25-2008 4:53 PM |
I have created a silverlight control and linked it to an aspx page.Silverlight internally has WCF service reference and calls WCF exposed methods to populate the data.
I have hosted my application in IIS.When i am browsing the application with server name (say:http:\\servername:port\\silverlightpage.aspx) ,the control is getting rendered properly.
But when i acces the application with the server ip address, it throws an cross domain issue(i.e:http:\\172.65.52.213:8080\\silverlightpage.aspx) .The silverlight controls throws an exception for crossdomain
Here is my crossdomain.xml
<?xml version="1.0"?><!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"><cross-domain-policy> <allow-http-request-headers-from domain="*" headers="*"/></cross-domain-policy>
and clientaccesspolicy.xml:
<?xml version="1.0" encoding="utf-8"?><access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain uri="*"/> </allow-from> <grant-to> <resource path="/" include-subpaths="true"/> </grant-to> </policy> </cross-domain-access></access-policy>
here is my
ServiceReferences.ClientConfig
<
</
After changing all above modification
when i am refering .axpx page by url its working properlyeg. /PatientCare.Web/PatientGoal.aspx">http://<MyServer>/PatientCare.Web/PatientGoal.aspx
i am getting same error
when I refer url of .aspx page using Ip adreees
eg. /PatientCare.Web/PatientGoal.aspx">http://<MyServerIP>/PatientCare.Web/PatientGoal.aspx
preishuber
Contributor
3570 points
655 Posts
11-26-2008 10:17 AM |
you need nto both files only one. for trouble shooting i suggest to use httpfiddler to see if files i found and downloaded.
Also read http://timheuer.com/blog/archive/2008/04/06/silverlight-cross-domain-policy-file-snippet-intellisense.aspx
pmoffatt610
70 points
97 Posts
11-26-2008 2:58 PM |
Just to add to preishuber's post, I like to use Silverlight spy 2. Try using the http monitoring to see which request is generating an error.
http://silverlightspy.com/
It also has a crossdomain access policy validator to see if the file has errors!
Tools -> Cross-Domain Access Policy Validator
Patrick
11-26-2008 3:56 PM |
hi Patrick
yfi silverlightspy doenst work on my german vista :-(
11-26-2008 4:22 PM |
Bummer! It's a nice little tool. Thanks for the Info!
Respekt,
Pat
Jonathan...
All-Star
24581 points
2,409 Posts
12-01-2008 3:41 AM |
Hi Prasad,
I have noticed that you have posted the same thread here. I will mark this thread as resolved and if your problem persists there, please feel free to let me know. We can discuss it there.
Best regards,
Jonathan
coolio
369 points
114 Posts
01-13-2009 8:23 PM |
Hannes, what's wrong with SilverlightSpy on a german vista? Happy to help you out here if you could supply me with some details on the error you are getting.
Thanks,
Koen