473,756 Members | 4,511 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Ajax calls web service in wcf(windows service)

我们现在遇 到一个问题 ,通过wcf创 建的webservic e,选择windo ws
service作为 主,采用ja va作为客户 调用成功 但是*法 用asp.net ajax调用。
我们参考了http://msdn.microsoft.com/zh-cn/libr...应的sample
code,但是 现这些sampl e基本上都 要在iis上 署一个svc 件,但是* 据当前业 需求,我 *法部署ii s服务器。
是否有window s service host的wcf service与asp.n et ajax协作的 决方案? 谢。

Jul 30 '08 #1
7 4602
Hi Billy,

The thread content is displayed as garbo code, have you verified that all
the contents are posted via UTF8 or other unicode format? You can try first
paste them into a notepad with unicode encoding and repost the content
again to see whether it works.

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

--------------------
>From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
Subject: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 01:57:01 -0700
>
我们现在 到一个问 ,通过wcf 建的webservi ce,选择wind o
ws
>service作为 主,采用j ava作为客户 端调用成功 ,但是*法
用asp.net ajax调用?
我们参考了http://msdn.microsoft.com/zh-cn/libr...0.aspx的资
,并且下 了相应的sa mple
>code,但是 现这些samp le基本上都 要在iis上 署一个svc
件,但是* 据当前业 需求,我 *法部署ii s服务器?
是否有window s service host的wcf service与asp.n et
ajax协作的 决方案? 谢?
>
Jul 30 '08 #2
I wrote it in Chinese, could you read Chinese in your tool?

"Steven Cheng [MSFT]" wrote:
Hi Billy,

The thread content is displayed as garbo code, have you verified that all
the contents are posted via UTF8 or other unicode format? You can try first
paste them into a notepad with unicode encoding and repost the content
again to see whether it works.

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

--------------------
From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
Subject: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 01:57:01 -0700

æˆ‘ä»¬ç Ž°åœ¨é 到一 ä¸ªé—®é ¢˜ï¼Œé€ šè¿‡wcfå ›å»ºçš webserviceï Œé€‰æ ©windo
ws
serviceä½œä ¸ºå®¿ä¸ ,采 用javaä½ œä¸ºå®¢ ˆ·ç«¯è° ƒç”¨æˆ å*Ÿï¼Œä *æ˜¯æ— æ³•ä
½¿ç”¨asp. net ajaxè°ƒç” ¨ã€?
æˆ‘ä»¬å ‚考ä *http://msdn.microsoft.com/zh-cn/libr...资æ–
™ï¼Œå¹¶ 且下 ½½äº*ç ¸åº”çš „sample
codeï¼Œä½ *是发 çŽ°è¿™ä º›sampleåŸ ºæœ¬ä¸* ƒ½éœ€è åœ¨iisä *部署 一个sv cæ–
‡ä»¶ï¼Œ ä½*æ˜¯æ ¹æ®å½“ 前业å *¡éœ€æ± ‚ï¼Œæˆ ä»¬æ— æ³•éƒ¨ç ½²iis服å *¡å™¨ã ?
æ˜¯å¦æ ‰windows service hostçš„wcf service与as p.net
ajaxåä½ çš„è§£ *³æ–¹æ ¡ˆï¼Ÿè° è°¢ã€?

Jul 30 '08 #3
Hi Billy,

I have performed some research on this. Here is some information I've got
so far:

As for the ASP.NET client script based AJAX call, it is limited by the web
page script model. For all the web pages in webbrowser, webbrowser will
restrict the script to access pages on remote server. For example, if your
page is from http://serverA , if your script try use some script
component to send webrequest to other server/application, it is not
allowed. And this also restrict the AJAX method call to remote
applications(we bservice or wcf). I've even tried call WCF on the same
machine(differe nt server application), it is now allowed.

So far, one way to make such remote WCF method call I can get is create a
local server-side page method in which you use server-side code to call the
remote WCF service. And your page's client-side script call this
server-side page_method via AJAX. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
References: <6D************ *************** *******@microso ft.com>
<4#************ **@TK2MSFTNGHUB 02.phx.gbl>
>Subject: RE: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 02:46:05 -0700
>
I wrote it in Chinese, could you read Chinese in your tool?

"Steven Cheng [MSFT]" wrote:
>Hi Billy,

The thread content is displayed as garbo code, have you verified that
all
>the contents are posted via UTF8 or other unicode format? You can try
first
>paste them into a notepad with unicode encoding and repost the content
again to see whether it works.

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
>suggestions about how we can improve the support we provide to you.
Please
>feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

--------------------
>From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
Subject: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 01:57:01 -0700
>
我们 Ž°åœ¨é ‡åˆ°ä¸ 个问 ¢˜ï¼Œé
šè¿‡wcfå ›å»ºçš webserviceï Œé€‰æ ©windo
>ws
service作 ¸ºå®¿ä¸ »ï¼Œé‡ 用javaä œä¸ºå®¢
ˆ·ç«¯è° ƒç”¨æˆ å*Ÿï¼Œä *是æ? 法?
½¿ç”¨asp. net ajaxè°ƒç” ¨ã€?
>>
æˆ‘ä»¬å ‚考ä *http://msdn.microsoft.com/zh-cn/library/bb
410780.aspxçš „资æ?
™ï¼Œå¹¶ 且下 ½½äº*ç ¸åº”çš „sample
>>
codeï¼Œä½ *æ˜¯å çŽ°è¿™ º›sampleå ºæœ¬ä¸*
ƒ½éœ€è åœ¨iisä *部署 一个sv cæ?
>
‡ä»¶ï¼Œ ä½*是? ¹æ®å½“ 前业å *¡éœ€æ±
,我 们æ?æ³ •éƒ¨ç½² iis服å*¡ 器ã€?
>æ˜¯å¦æ œ‰windows service hostçš„wcf service与as p.net
ajaxåä½ œçš„解 å*³æ–¹ ¡ˆï¼Ÿè° ¢è°¢ã€?
>

Jul 31 '08 #4
As you said, this also restrict the AJAX method call to remote
applications(we bservice or wcf).

But actually I could call the web service in other IIS site by using Ajax.

Do I misunderstand you?

"Steven Cheng [MSFT]" wrote:
Hi Billy,

I have performed some research on this. Here is some information I've got
so far:

As for the ASP.NET client script based AJAX call, it is limited by the web
page script model. For all the web pages in webbrowser, webbrowser will
restrict the script to access pages on remote server. For example, if your
page is from http://serverA , if your script try use some script
component to send webrequest to other server/application, it is not
allowed. And this also restrict the AJAX method call to remote
applications(we bservice or wcf). I've even tried call WCF on the same
machine(differe nt server application), it is now allowed.

So far, one way to make such remote WCF method call I can get is create a
local server-side page method in which you use server-side code to call the
remote WCF service. And your page's client-side script call this
server-side page_method via AJAX. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
References: <6D************ *************** *******@microso ft.com>
<4#************ **@TK2MSFTNGHUB 02.phx.gbl>
Subject: RE: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 02:46:05 -0700

I wrote it in Chinese, could you read Chinese in your tool?

"Steven Cheng [MSFT]" wrote:
Hi Billy,

The thread content is displayed as garbo code, have you verified that
all
the contents are posted via UTF8 or other unicode format? You can try
first
paste them into a notepad with unicode encoding and repost the content
again to see whether it works.

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
suggestions about how we can improve the support we provide to you.
Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

--------------------

From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
Subject: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 01:57:01 -0700


æË*†ä»¬à §Å½Â°Ã¥ “Â¨Ã©Â â€¡Ã¥Ë *°ä¸ ‚¬Ã¤Â¸ ªÃ©â€” Â®Ã©Â¢Ë Ã¯Â¼Å’ ©â‚¬
šè¿⠡wcfÃ¥Ë *›å ºçš⠀žwebservice ,à ©â‚¬â€ æ‹ windo
ws
serviceä½ œä¸ ºÃ¥Â®Â¿ ¤Â¸Â»Ã¯ ¼Œé⠀¡â€¡Ã Ӭjav a作 ¤Â¸ÂºÃ¥ ®¢Ã
¦Ë*·ç «¯è ƒç†Â¨Ã¦Ë* åŠŸï¼Šä½†æ˜¯à â€?æ³ •Ã?
½¿ç⠝¨asp.net ajaxÃ¨Â°Æ Ã§â€Â ¨Ã£â‚¬?
>
æË*†ä»¬à ¥Ââ€šÃ ¨â‚¬Æ’ ¤Âºâ€ http://msdn.microsoft.com/zh-cn/library/bb
410780.aspxç š„è µ„æ �
™ï¼ Œå¹ ¶Ã¤Â¸â€ Ã¤Â¸â€ ¹Ã¨Â½Â½ ¤Âºâ€ 相 应 çš„ sample
>
codeï¼Šä½†æ˜¯à ‘à Ž°è ¿â„¢Ã¤Â ºâ€ºsample åŸºà œ¬ä ¸Å Ã
©Æ’½é œ€à ¦åŠ“¨iisä ¸Å 部à §Â½Â²Ã¤ ¸â‚¬Ã¤ ¸Âªsvcæ €?
‡ä» ¶ï¼Šä½†æ˜¯Ã? ¹æ å½†å‰ ä¸šà ¥Å ¡éœ⠂¬Ã¦Â±â
€šÃ¯Â¼Å ’æË*⠘ä» æâ€?æ ³•é ƒ¨ç ½Â²iis抓åŠ¡å™ ¨ã€ ?
æ˜¯à ¦æŠ“‰windo ws service hostçš⠞wcf serviceä¸ Žasp.net
ajax占作 §Å¡â€ž ¨Â§Â£Ã¥ â€ Â³Ã¦â€ Â¹Ã¦Â¡Ë *? è°¢à °¢ã⠂¬?




Jul 31 '08 #5
OK, please close it as resolved, thank you!
"Steven Cheng [MSFT]" wrote:
Hi Billy,

I have performed some research on this. Here is some information I've got
so far:

As for the ASP.NET client script based AJAX call, it is limited by the web
page script model. For all the web pages in webbrowser, webbrowser will
restrict the script to access pages on remote server. For example, if your
page is from http://serverA , if your script try use some script
component to send webrequest to other server/application, it is not
allowed. And this also restrict the AJAX method call to remote
applications(we bservice or wcf). I've even tried call WCF on the same
machine(differe nt server application), it is now allowed.

So far, one way to make such remote WCF method call I can get is create a
local server-side page method in which you use server-side code to call the
remote WCF service. And your page's client-side script call this
server-side page_method via AJAX. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
References: <6D************ *************** *******@microso ft.com>
<4#************ **@TK2MSFTNGHUB 02.phx.gbl>
Subject: RE: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 02:46:05 -0700

I wrote it in Chinese, could you read Chinese in your tool?

"Steven Cheng [MSFT]" wrote:
Hi Billy,

The thread content is displayed as garbo code, have you verified that
all
the contents are posted via UTF8 or other unicode format? You can try
first
paste them into a notepad with unicode encoding and repost the content
again to see whether it works.

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
suggestions about how we can improve the support we provide to you.
Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

--------------------

From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
Subject: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 01:57:01 -0700


æË*†ä»¬à §Å½Â°Ã¥ “Â¨Ã©Â â€¡Ã¥Ë *°ä¸ ‚¬Ã¤Â¸ ªÃ©â€” Â®Ã©Â¢Ë Ã¯Â¼Å’ ©â‚¬
šè¿⠡wcfÃ¥Ë *›å ºçš⠀žwebservice ,à ©â‚¬â€ æ‹ windo
ws
serviceä½ œä¸ ºÃ¥Â®Â¿ ¤Â¸Â»Ã¯ ¼Œé⠀¡â€¡Ã Ӭjav a作 ¤Â¸ÂºÃ¥ ®¢Ã
¦Ë*·ç «¯è ƒç†Â¨Ã¦Ë* åŠŸï¼Šä½†æ˜¯à â€?æ³ •Ã?
½¿ç⠝¨asp.net ajaxÃ¨Â°Æ Ã§â€Â ¨Ã£â‚¬?
>
æË*†ä»¬à ¥Ââ€šÃ ¨â‚¬Æ’ ¤Âºâ€ http://msdn.microsoft.com/zh-cn/library/bb
410780.aspxç š„è µ„æ �
™ï¼ Œå¹ ¶Ã¤Â¸â€ Ã¤Â¸â€ ¹Ã¨Â½Â½ ¤Âºâ€ 相 应 çš„ sample
>
codeï¼Šä½†æ˜¯à ‘à Ž°è ¿â„¢Ã¤Â ºâ€ºsample åŸºà œ¬ä ¸Å Ã
©Æ’½é œ€à ¦åŠ“¨iisä ¸Å 部à §Â½Â²Ã¤ ¸â‚¬Ã¤ ¸Âªsvcæ €?
‡ä» ¶ï¼Šä½†æ˜¯Ã? ¹æ å½†å‰ ä¸šà ¥Å ¡éœ⠂¬Ã¦Â±â
€šÃ¯Â¼Å ’æË*⠘ä» æâ€?æ ³•é ƒ¨ç ½Â²iis抓åŠ¡å™ ¨ã€ ?
æ˜¯à ¦æŠ“‰windo ws service hostçš⠞wcf serviceä¸ Žasp.net
ajax占作 §Å¡â€ž ¨Â§Â£Ã¥ â€ Â³Ã¦â€ Â¹Ã¦Â¡Ë *? è°¢à °¢ã⠂¬?




Jul 31 '08 #6
Thanks or your reply.

Yes, this is a "cross-browser" script restriction which prevent script to
interact with remote site(domain).

Anyway, so far for your scenario, two possible solutions are available:

1. use AJAX call to invoke local server-side page method and let
server-side to call the WCF service

2. Move the WCF to the local site/application(at least need to have the
same main domain server name) with your web page application.

If there is anything else need help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
References: <6D************ *************** *******@microso ft.com>
<4#************ **@TK2MSFTNGHUB 02.phx.gbl>
<CE************ *************** *******@microso ft.com>
<GW************ **@TK2MSFTNGHUB 02.phx.gbl>
>Subject: RE: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 22:38:00 -0700
>
OK, please close it as resolved, thank you!
"Steven Cheng [MSFT]" wrote:
>Hi Billy,

I have performed some research on this. Here is some information I've
got
>so far:

As for the ASP.NET client script based AJAX call, it is limited by the
web
>page script model. For all the web pages in webbrowser, webbrowser will
restrict the script to access pages on remote server. For example, if
your
>page is from http://serverA , if your script try use some script
component to send webrequest to other server/application, it is not
allowed. And this also restrict the AJAX method call to remote
applications(w ebservice or wcf). I've even tried call WCF on the same
machine(differ ent server application), it is now allowed.

So far, one way to make such remote WCF method call I can get is create
a
>local server-side page method in which you use server-side code to call
the
>remote WCF service. And your page's client-side script call this
server-side page_method via AJAX. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
>suggestions about how we can improve the support we provide to you.
Please
>feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

============== =============== =============== ======
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
>ications.

============== =============== =============== ======
This posting is provided "AS IS" with no warranties, and confers no
rights.
>--------------------
>From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
References: <6D************ *************** *******@microso ft.com>
<4#*********** ***@TK2MSFTNGHU B02.phx.gbl>
>Subject: RE: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 02:46:05 -0700
>
I wrote it in Chinese, could you read Chinese in your tool?

"Steven Cheng [MSFT]" wrote:

Hi Billy,

The thread content is displayed as garbo code, have you verified that
all
>the contents are posted via UTF8 or other unicode format? You can try
first
>paste them into a notepad with unicode encoding and repost the
content
>again to see whether it works.

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
>suggestions about how we can improve the support we provide to you.
Please
>feel free to let my manager know what you think of the level of
service
>provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

--------------------

From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
Subject: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 01:57:01 -0700
æË*†˜Ã¤Â»Â¬ §Å½Â°Ã¥ œ¨é â€¡Ã¥Ë
*°ä¸ ‚¬Ã¤Â¸ ªÃ©â€” Â®Ã©Â¢Ë Ã¯Â¼Å’
©â‚?
>
šè¿⠡wcfÃ¥Ë *›å ºçš⠀žwebservice
¯Â¼Å’à €‰ æ‹© windo
>ws
serviceä œä¸ ºÃ¥Â®Â¿ ä¸»à ¼Œé
€¡â€¡Ã Ӭjav a作 ¤Â¸ÂºÃ¥ ®¢?
>
¦Ë*·ç «¯è ƒç†Â¨Ã¦Ë* å?Ÿ
¯Â¼Å’ä ½†æ˜¯à â?æ³ €¢?
½¿ç⠝¨asp.net
ajaxÃ¨Â°Æ Ã§â€Â ¨Ã£â‚?
>>
æË*†˜Ã¤Â»Â¬ ¥Ââ€š ¨â‚¬Æ’ äºâ€
http://msdn.microsoft.com/zh-cn/library/bb
>410780.aspxà š„à µ„à â?
>
™ï¼ Œå¹ ¶Ã¤Â¸â€ Ã¤Â¸â€ ¹Ã¨Â½Â½
¤Âºâ€ 相 应 çš„ sample
>>
code*’ä½â
æ˜¯à ‘à Ž°è ¿â„¢Ã¤Â ºâ€ºsample
¥Å¸ÂºÃ¦ œ¬ä ¸?Ã
>©Æ’½à œ€à ¨Â¦ÂÃ¥ “¨iisä ¸Å
部à §Â½Â²Ã¤ ¸â‚¬Ã¤ ¸Âªsvcæ ?
>
‡ä ¶ï¼Š’ä½â
是Ã? ¹æ å½†å‰ ä¸šÃ
Š¡éœ⠂¬Ã¦Â±?
>
€šÃ¯Â¼Å ’æË*⠘ä» æâ?æ ³â€¢Ã©
’¨ç½ ²iis抍å?¡ 器 ãâ‚?
>是à ¥ÂÂ¦Ã¦ “‰wind ows service
hostçš⠞wcf serviceä¸ Žasp.net
>>
ajax占作 §Å¡â€ž ¨Â§Â£Ã¥ â?³æâ
“¹æ ¡Ë*ï¼ Ÿè° è°¢à £â‚?
>>


Jul 31 '08 #7
Thanks or your reply.

Yes, this is a "cross-browser" script restriction which prevent script to
interact with remote site(domain).

Anyway, so far for your scenario, two possible solutions are available:

1. use AJAX call to invoke local server-side page method and let
server-side to call the WCF service

2. Move the WCF to the local site/application(at least need to have the
same main domain server name) with your web page application.

If there is anything else need help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
References: <6D************ *************** *******@microso ft.com>
<4#************ **@TK2MSFTNGHUB 02.phx.gbl>
<CE************ *************** *******@microso ft.com>
<GW************ **@TK2MSFTNGHUB 02.phx.gbl>
>Subject: RE: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 22:38:00 -0700
>
OK, please close it as resolved, thank you!
"Steven Cheng [MSFT]" wrote:
>Hi Billy,

I have performed some research on this. Here is some information I've
got
>so far:

As for the ASP.NET client script based AJAX call, it is limited by the
web
>page script model. For all the web pages in webbrowser, webbrowser will
restrict the script to access pages on remote server. For example, if
your
>page is from http://serverA , if your script try use some script
component to send webrequest to other server/application, it is not
allowed. And this also restrict the AJAX method call to remote
applications(w ebservice or wcf). I've even tried call WCF on the same
machine(differ ent server application), it is now allowed.

So far, one way to make such remote WCF method call I can get is create
a
>local server-side page method in which you use server-side code to call
the
>remote WCF service. And your page's client-side script call this
server-side page_method via AJAX. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
>suggestions about how we can improve the support we provide to you.
Please
>feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

============== =============== =============== ======
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
>ications.

============== =============== =============== ======
This posting is provided "AS IS" with no warranties, and confers no
rights.
>--------------------
>From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
References: <6D************ *************** *******@microso ft.com>
<4#*********** ***@TK2MSFTNGHU B02.phx.gbl>
>Subject: RE: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 02:46:05 -0700
>
I wrote it in Chinese, could you read Chinese in your tool?

"Steven Cheng [MSFT]" wrote:

Hi Billy,

The thread content is displayed as garbo code, have you verified that
all
>the contents are posted via UTF8 or other unicode format? You can try
first
>paste them into a notepad with unicode encoding and repost the
content
>again to see whether it works.

Sincerely,

Steven Cheng
Microsoft MSDN Online Support Lead
Delighting our customers is our #1 priority. We welcome your comments
and
>suggestions about how we can improve the support we provide to you.
Please
>feel free to let my manager know what you think of the level of
service
>provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

--------------------

From: =?Utf-8?B?QmlsbHkgWmh hbmc=?= <ht****@noemail .noemail>
Subject: Ajax calls web service in wcf(windows service)
Date: Wed, 30 Jul 2008 01:57:01 -0700
æË*†˜Ã¤Â»Â¬ §Å½Â°Ã¥ œ¨é â€¡Ã¥Ë
*°ä¸ ‚¬Ã¤Â¸ ªÃ©â€” Â®Ã©Â¢Ë Ã¯Â¼Å’
©â‚?
>
šè¿⠡wcfÃ¥Ë *›å ºçš⠀žwebservice
¯Â¼Å’à €‰ æ‹© windo
>ws
serviceä œä¸ ºÃ¥Â®Â¿ ä¸»à ¼Œé
€¡â€¡Ã Ӭjav a作 ¤Â¸ÂºÃ¥ ®¢?
>
¦Ë*·ç «¯è ƒç†Â¨Ã¦Ë* å?Ÿ
¯Â¼Å’ä ½†æ˜¯à â?æ³ €¢?
½¿ç⠝¨asp.net
ajaxÃ¨Â°Æ Ã§â€Â ¨Ã£â‚?
>>
æË*†˜Ã¤Â»Â¬ ¥Ââ€š ¨â‚¬Æ’ äºâ€
http://msdn.microsoft.com/zh-cn/library/bb
>410780.aspxà š„à µ„à â?
>
™ï¼ Œå¹ ¶Ã¤Â¸â€ Ã¤Â¸â€ ¹Ã¨Â½Â½
¤Âºâ€ 相 应 çš„ sample
>>
code*’ä½â
æ˜¯à ‘à Ž°è ¿â„¢Ã¤Â ºâ€ºsample
¥Å¸ÂºÃ¦ œ¬ä ¸?Ã
>©Æ’½à œ€à ¨Â¦ÂÃ¥ “¨iisä ¸Å
部à §Â½Â²Ã¤ ¸â‚¬Ã¤ ¸Âªsvcæ ?
>
‡ä ¶ï¼Š’ä½â
是Ã? ¹æ å½†å‰ ä¸šÃ
Š¡éœ⠂¬Ã¦Â±?
>
€šÃ¯Â¼Å ’æË*⠘ä» æâ?æ ³â€¢Ã©
’¨ç½ ²iis抍å?¡ 器 ãâ‚?
>是à ¥ÂÂ¦Ã¦ “‰wind ows service
hostçš⠞wcf serviceä¸ Žasp.net
>>
ajax占作 §Å¡â€ž ¨Â§Â£Ã¥ â?³æâ
“¹æ ¡Ë*ï¼ Ÿè° è°¢à £â‚?
>>


Jul 31 '08 #8

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

Similar topics

1
1399
by: ThunderMusic | last post by:
Hi, I'm currently stuck with a big problem. I must develop a Windows service and an application to configure it and display what is happening. The problem is not really on the service side, but on the application side. I explain: The service is composed of a kernel dynamicaly loading plug-ins modules and starts the process of each module. Until nous, it's not that hard. The hard part is when it comes to the application to configure...
0
309
by: tt | last post by:
My mod_python 3.1.4 installation works when Apache 2.0.54 is run in standalone mode (apache -k standalone) but refuses to operate when run as a service (apache -k restart). Logs yield the usual and well-known "make_obcallback: could not import mod_python.apache" error. I have tried PYTHONHOME, LoadFile python24.dll (2.4.2) with no result. I have read *all* threads about make_obcallback that google found. What's even weirder I had this...
7
3044
by: Ollie Riches | last post by:
I am trying to dynamically load an assembly that has a reference to 'Interop.WMEncoderLib.dll' which is a PIA to the windows media player DRM components. When I run the code from a console application it works perfectly fine, but when the assembly containing the reference is load from a windows service an exception is thrown with the following message: "File or assembly name Interop.WMEncoderLib, or one of its dependencies, was not...
3
2993
by: shodson | last post by:
I have a web service http://localhost/ServiceA/ProxyService.asmx calls http://localhost/ServiceB/Service.asmx And I get an error in ServiceB's method when it calls Invoke() it craps out and returns
5
2612
by: DarkPearl | last post by:
Bonjour tous, apres avoir crer un service windows avec py2exe, j'ai ce probleme quand je lance le service : voici ce que je trouve dans le journal d'evenement : The instance's SvcRun() method failed <Error getting traceback - traceback.print_tb() failed <class 'pywintypes.com_error'>: (-2147221020, 'Syntaxe incorrecte',
2
3085
by: MR | last post by:
I need to make a call to a (WCF) service from C++ the C++ app utilizes an unmanaged library that receives a callback when an event occurs. when the callback is called, I need to access a WCF service (written in C# so- it is managed). Is this possible to do from unmanaged C++? if so, can someone point me to a good reference that would explain how to do this? thanks m
4
5937
by: jake | last post by:
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.
0
1099
by: satish kumar | last post by:
Hello! We have a situation where in we're developing a WCF Intermediatery service, which would handle calls between Callers (could be asp.net wcf clients) and External Services (mostly WCF Services with endpoints). ASP.net clients <--Our WCF Service <--External Services Scenario: Our service is mainly there to ENCAPSULATE the low-level details of business-processing and making calls to external services and processing the return from...
1
2762
by: Nadeem Ashraf | last post by:
Hi, We are developing a web based application "UltraLearn.com" with a mix of junior/senior Microsoft technologies. That includes Microsoft Silverlight, ASP.Net Ajax and WCF/WF. Recently, we have hit the wall with some of tested/proven technologies. The problem statement follows: We are calling a WCF Service from our site pages to track user navigation. The service in turn makes call to a gateway/server (using HttpWebRequest,...
0
9271
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9838
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9708
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8709
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7242
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5302
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3805
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3354
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.