Solved

How can I access a WCF service hosted in a windows service in my silverlight app

Posted on 2012-04-12
6
456 Views
Last Modified: 2012-05-05
I am trying to access a WCF service in my silverlight app (silverlight 4)
I have added the clientaccesspolicy and crosdomainpolicy files to the root directory.

But I keep getting the error - The remote server returned an error: NotFound
0
Comment
Question by:countrymeister
  • 3
  • 3
6 Comments
 
LVL 25

Expert Comment

by:apeter
ID: 37846785
where you able to access wcf wsdl in Browser ? You have any firewall between ur client and server ?

Fiddler might hlep you to give you more details on this.
0
 
LVL 1

Author Comment

by:countrymeister
ID: 37846805
I checked the raw output in Fiddler, the error states - Bad Request.
It gives an error on the clientaccesspolicy.xml and then an error on the crossdomainpolicy files error.
The wcf is working fine when accessed from a regular console app.
I have the two files in the location of the windows exe.
But I guess I need to make code changes to dynamically load the access policy files, which I am trying to avoid. Because this is an existing working WCF service I want to access
0
 
LVL 25

Expert Comment

by:apeter
ID: 37848413
Save the crossdomain.xml and clientaccesspolicy.xml file to the root of the domain where the service is hosted. If, for example, the service is hosted in http://fabrikam.com, then the file must be located at http://fabrikam.com/crossdomain.xml.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 1

Author Comment

by:countrymeister
ID: 37853731
It does not work that way for a WCF service hosted in a windows service.
My windows service has bindings with some port numbers
SO it cannot find the policy files. So this has to be done via code to dynamically load the cap file.
0
 
LVL 25

Accepted Solution

by:
apeter earned 500 total points
ID: 37863227
0
 
LVL 1

Author Closing Comment

by:countrymeister
ID: 37932828
This just gave me a few things to read and dig more into
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now