• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 861
  • Last Modified:

Access a Self-Hosted WCF from JSON / ScriptManager

Given a self-hosted WCF (not IIS), operating at http://myserver:8080/Myservice/
I want to configure the app.config for the above so that ScriptManager can reach it.

Since it's self hosted there doesn't seem to be support for an svc file, so that's evidently not an option.
I'm calling the service from the same domain, but different port ... so it probably looks like a separate domain to script...

Is this possible?

if I browse to the service url I get the "you have created a service. To test the service, you will need to creat a client..." message.
If I browser to ...service/?wsdl, I get the service definition file.
If I browse to ...service/HelloWorld (a contract method), I get nothing back...

If I assign the service url to ScriptManager, I get:
http://mysite:8080/serviceurl//jsdebug        400 (Bad Request)

I've also tried jquery $.ajax call with no response back whatsoever... (error response with no exception object and only "error")

  • 2
1 Solution
Hello Bro!

If the selfhost wcf is running on different machine, or on same machine with different port(not 80), then you may encounter the Cross-Domain issue. cross-domain service call in javascript is not allowed.

There are some workaround for calling crossdomain service by javascript, please have a look



Hope this will help you.


Asif Ahmed Khan
Hello Bro!

I found another helpful article regarding your problem please see the link below.


Hope this will help you to fix your problem.


Asif Ahmed Khan
Amandeep Singh BhullarCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now