Solved

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

Posted on 2012-04-12
6
489 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

617 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