473,325 Members | 2,480 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

calling WCF service methods from JavaScript in another domain?

Can someone please give me an example on how to call a wcf method that
resides on a different domain from JavaScript (not from C#/asp.net)?
All the examples that I have seen show how to call from the same
domain.
I don't care what the binding is. I'll use what works.
I need concrete examples or links to concrete example please. Not
just links to articles describing how to do it.
Your help is greatly appreciated.

Mar 25 '08 #1
4 5911
jake wrote:
Can someone please give me an example on how to call a wcf method that
resides on a different domain from JavaScript (not from C#/asp.net)?
All the examples that I have seen show how to call from the same
domain.
I don't care what the binding is. I'll use what works.
I need concrete examples or links to concrete example please. Not
just links to articles describing how to do it.
Your help is greatly appreciated.
We can use JavaScript to call a executable file but the security setting
of IE must be set to lowest level; and then that file can call wcf
method in turn
If you want only JavaScript can do the calling, I think you must be the
first one having that idea.
--
Thanks,
Duy Lam Phuong
Mar 26 '08 #2
On Mar 26, 10:57 am, Duy Lam <duylamphu...@gmail.comwrote:
jake wrote:
Can someone please give me an example on how to call awcfmethod that
resides on a different domain from JavaScript (not from C#/asp.net)?
All the examples that I have seen show how to call from the same
domain.
I don't care what the binding is. I'll use what works.
I need concrete examples or links to concrete example please. Not
just links to articles describing how to do it.
Your help is greatly appreciated.

We can use JavaScript to call a executable file but the security setting
of IE must be set to lowest level; and then that file can callwcf
method in turn
If you want only JavaScript can do the calling, I think you must be the
first one having that idea.

--
Thanks,
Duy Lam Phuong
JavaScript can call methods in regular web services. Why can't it
call WCF methods as well?
I highly doubt that I am the first one to think of this.
Did everyone who used google (which has javascript calls to web
services through the XMLHttpRequest) have to have IE or any other
browser's security set to the lowest level?
The structure of the website that I am building is such that some
calls are to be made from the server (asp.net) side and some from the
client side, to save bandwidth and such, and to be efficient.
But please elaborate as to why this is such a strange thing to do (why
would I be the first one to inquire about this).
I am not being sarcastic; I really need to know if there is a better
way to do what I am doing now.
All help is greatly appreciated.
Thanks
jake
Mar 26 '08 #3
jake wrote:
JavaScript can call methods in regular web services. Why can't it
call WCF methods as well?
I highly doubt that I am the first one to think of this.
Did everyone who used google (which has javascript calls to web
services through the XMLHttpRequest) have to have IE or any other
browser's security set to the lowest level?
When saying set the IE security to lowest levelt, I meant to use ActiveX
object (call an executable file).
You use XMLHttpRequest to a call to server, and then what thing happen
next? Does JavaScript *communicate* with WCF or wait for response from
server? If you do that, it seems there is a misunderstand about your
question.
Anyway, trying to argue about this could go nowhere. You said you used
JavaScript to trigger a calling to web server (by ajax), and it does not
mean "JavaScript call a WCF method".
The structure of the website that I am building is such that some
calls are to be made from the server (asp.net) side and some from the
client side, to save bandwidth and such, and to be efficient.
But please elaborate as to why this is such a strange thing to do (why
would I be the first one to inquire about this).
I am not being sarcastic; I really need to know if there is a better
way to do what I am doing now.
All help is greatly appreciated.
Thanks
jake
It seems you're angry about my reply. I'm sorry.
--
Thanks,
Duy Lam Phuong
Mar 27 '08 #4
On Mar 27, 9:18 am, Duy Lam <duylamphu...@gmail.comwrote:
jakewrote:
JavaScript can call methods in regular web services. Why can't it
callWCFmethods as well?
I highly doubt that I am the first one to think of this.
Did everyone who used google (which has javascript calls to web
services through the XMLHttpRequest) have to have IE or any other
browser's security set to the lowest level?

When saying set the IE security to lowest levelt, I meant to use ActiveX
object (call an executable file).
You use XMLHttpRequest to a call to server, and then what thing happen
next? Does JavaScript *communicate* withWCFor wait for response from
server? If you do that, it seems there is a misunderstand about your
question.
Anyway, trying to argue about this could go nowhere. You said you used
JavaScript to trigger a calling to web server (by ajax), and it does not
mean "JavaScript call aWCFmethod".
The structure of the website that I am building is such that some
calls are to be made from the server (asp.net) side and some from the
client side, to save bandwidth and such, and to be efficient.
But please elaborate as to why this is such a strange thing to do (why
would I be the first one to inquire about this).
I am not being sarcastic; I really need to know if there is a better
way to do what I am doing now.
All help is greatly appreciated.
Thanks
jake

It seems you're angry about my reply. I'm sorry.

--
Thanks,
Duy Lam Phuong
No, no; I am not angry at all. Not even in the least bit. No need to
be sorry. I am just anxious for some help. In fact, I am the one who
should be sorry for asking and replying as ambiguously as I did.

Let me try again:
I need to make AJAX work with WCF from the client's JavaScript, to
update only part of the web page instead of a full reload.
I know AJAX (XmlHttpRequest) works from the client's JavaScript to
retrieve info from regular web services and update part of the web
page.
I need to do the same thing, but with a WCF service instead of a
regular web service.
In other words:
instead of,
client ---(through Get or Post request)---asp.net/C#/IIS ---(through
XmlHttpRequest)---WCF service ---asp.net/C#/IIS ---client
I would like
client ----(through XmlHttpRequest)---WCF service ---client
Is this possible?

If this is still somewhat vague, let me know and I will clarify it
some more.
Thanks
jake
Mar 27 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jessica | last post by:
I have a .Net 1.0 web service that uses a .Net 1.1 assembly to create users, change users' passwords, validate users, and remove users from an LDAP server. The 1.1 code uses the DirectoryServices...
1
by: Lakshmi | last post by:
Hi All, I am having performance issues with the .NET client calling the Java Webservice running on axis. Have detailed the problem below. Please help. I wrote a webservice in Java. Lets name...
3
by: Merav Orion via .NET 247 | last post by:
I have a problem calling webservice from client side javascript. The javascript call the settimeout() method. when the user press submit button it ignore the press and keep refreshing the page. it...
3
by: Grant Schenck | last post by:
Hello, I have a Windows Service developed in C# .NET. I'm making it a remote server and I can, via an IPC Channel, expose methods and call them from a client. However, I now want my remoted...
2
by: Johan | last post by:
We have run into problems calling a web service from a client running .NET framework 2.0. The problem is that the first call to the web service, after the client has been started, takes very long...
3
dmjpro
by: dmjpro | last post by:
plz send me a good link which can clearify me how the J2EE framework works i want the details information .... plz help thanx
4
by: Nuno | last post by:
Hello, I'm trying to call some web services only using javascript from a html page. I succeeded on doind this in IE with the use of the behavior:url(webservice.htc); (technique founded in the...
0
by: =?Utf-8?B?V2ViemVzdA==?= | last post by:
Greetings: I am attempting to generate a Microsoft Office Communicator 2005 client installer that needs to interface with a Web service that resides on the LCS Server. Specifically, the Web...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.