Solved

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

Posted on 2012-04-12
6
477 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

749 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