0

I need help, pls…or, at least, a direction…

I have a very peculiar scenario for WCF…I need to self-host a service (no IIS permitted) and consume it through a HTML page using jQuery ajax … (no IIS allowed too)…the page will run “standalone”, plain HTML with javascript…Is it possible??

Note: WCF Service and HTML/javascript on the same machine.

marcoaoteixeira
  • 505
  • 2
  • 14

2 Answers2

0

Is it possible??

I believe it should be possible, assuming you configured the application correctly to support HTTP endpoints: http://msdn.microsoft.com/en-us/library/ee939340.aspx

If you go down to the section "Define Endpoints in Configuration Files" you'll even see after they configure the server, they then configure the client which connects to localhost. Of course you will have javascript connecting to the service instead, but the point being that there is no restriction that prevents WCF from communicating with a client on the same machine over HTTP.

The details of how to consume WCF from javascript are covered elsewhere:

Consume WCF with JavaScript but keep it generic enough for all clients?

Community
  • 1
  • 1
AaronLS
  • 37,329
  • 20
  • 143
  • 202
0

Ok...I get it....I can't consume a self hosted WCF service from a page in file system (different domains)...instead, i serve my html page throught one service and, using ajax, consume the others services...well...that's not the real good solution but works for me right now...

anyway, tks very much AaronLS!

marcoaoteixeira
  • 505
  • 2
  • 14