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:
msd...@microsoft.com.
--------------------
>From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <hti...@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/bb410780.aspx的资�–
�,并且下载了相应的sample
>code,但是发现这些sample基本上都需要在iis上部署一个svc�–
�件,但是根据当前业务需求,我们无法部署iis服务器�€?
是否有windows service host的wcf service与asp.net
ajax协作的解决方案?谢谢�€?
>
"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:
> msd...@microsoft.com.
>
> --------------------
>
> >From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <hti...@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/bb410780.aspx的资æ–
> ™ï¼Œå¹¶ä¸”下载了相应的sample
> >codeï¼Œä½†æ˜¯å ‘çŽ°è¿™äº›sampleåŸºæœ¬ä¸Šéƒ½éœ€è¦ åœ¨iis上部署一个svcæ–
> ‡ä»¶ï¼Œä½†æ˜¯æ ¹æ ®å½“å‰ ä¸šåŠ¡éœ€æ±‚ï¼Œæˆ‘ä»¬æ— æ³•éƒ¨ç½²iisæœ åŠ¡å™¨ã€?
> æ˜¯å ¦æœ‰windows service hostçš„wcf service与asp.net
> ajaxå 作的解决方案?谢谢ã€?
>
> >
>
>
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(webservice or wcf). I've even tried call WCF on the same
machine(different 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:
msd...@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <hti...@noemail.noemail>
>References: <6DFF6104-4C5E-488D...@microsoft.com>
<4#QHphi8I...@TK2MSFTNGHUB02.phx.gbl>
>Subject: RE: Ajax calls web service in wcf(windows service)
>Date: Wed, 30 Jul 2008 02:46:05 -0700
>service作为宿主,采用java作为客Ã
�ˆ·ç«¯è°ƒç”¨æˆ 功,但是æ�€?法Ã?
> ½¿ç”¨asp.net ajax调用ã€?
>>
æˆ‘ä»¬å ‚è€ƒäº†http://msdn.microsoft.com/zh-cn/library/bb
410780.aspx的资�?
> ™ï¼Œå¹¶ä¸”下载了相应的sample
>>
>codeï¼Œä½†æ˜¯å ‘çŽ°è¿™äº›sample基本上Ã
�ƒ½éœ€è¦ 在iis上部署一个svcæ�€?
>
‡ä»¶ï¼Œä½†æ˜¯Ã?¹æ ®å½“å‰ ä¸šåŠ¡éœ€æ±â
��,我们æ�€?法部署iisæœ åŠ¡å™¨ã€?
But actually I could call the web service in other IIS site by using Ajax.
Do I misunderstand you?
"Steven Cheng [MSFT]" wrote:
> >我们现在頇到一个问题,é€
> šè¿‡wcf创建的webservice,选择windo
> >> ws
> >>
> >service作为宿主,采熨java作为客Ã
> ¦Ë†Â·Ã§Â«Â¯Ã¨Â°Æ’熨戠功,但是æâ€?法Ã?
> > ½¿ç†¨asp.net ajax调熨ã€?
> >>
> 我们堂考了http://msdn.microsoft.com/zh-cn/library/bb
> 410780.aspx的资æ�
> > ™ï¼Œå¹¶ä¸†ä¸‹è½½äº†ç›¸åº†çš„sample
> >>
> >code,但是堑现这些sample基本上Ã
> ©Æ’½éœ€è¦ åœ¨iis上部署一个svcæâ€?
> >
> ‡ä»¶ï¼Œä½†æ˜¯Ã?¹æ ®å½“剠业务需æ±â
> €šÃ¯Â¼Å’我们æâ€?法部署iis朠务器ã€?
> >> 是堦有windows service host的wcf service与asp.net
> >> ajax堠作的解决方案?谢谢�
> >>
> >> >
> >>
> >>
> >
>
>
"Steven Cheng [MSFT]" wrote:
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:
msd...@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <hti...@noemail.noemail>
>References: <6DFF6104-4C5E-488D...@microsoft.com>
<4#QHphi8I...@TK2MSFTNGHUB02.phx.gbl>
<CE156F5B-963C-4C53...@microsoft.com>
<GW9MRCs8...@TK2MSFTNGHUB02.phx.gbl>
>Subject: RE: Ajax calls web service in wcf(windows service)
>Date: Wed, 30 Jul 2008 22:38:00 -0700
>我们现在頇åËâ
��°ä¸€ä¸ªé—®é¢˜ï¼ŒÃ
©â‚Â?
>
šè¿‡wcf创建的webserviceÃ
�¯Â¼Å’选择windo
>> >> ws
>> >>
>>
>service作为宿主,éâ
€¡â€¡Ã§â€ ¨java作为客Ã?
>
¦Ë†Â·Ã§Â«Â¯Ã¨Â°Æ’熨戠åÃ?ŸÃ
¯Â¼Å’但是æâ�‚?法Ã?
>> > ½¿ç†¨asp.net
ajax调熨ãâ‚Â?
>> >>
>> 我们堂考äºâ€
http://msdn.microsoft.com/zh-cn/library/bb
>> 410780.aspx的资�
>> >
™ï¼Œå¹¶ä¸†ä¸‹è½½Ã
¤Âºâ€ 相庆的sample
>> >>
>> >code,ä½â€
是堑现这些sampleÃ
�¥Å¸ÂºÃ¦Å“¬ä¸Ã?Ã
>> ©Æ’½éœ€è¦ åœ¨iisä¸Å
部署一个svc�
>> >
>> ‡ä»¶ï¼Œä½â€
是Ã?¹æ ®å½“剠业ÃÂ
�Š¡éœ€æ±�
>
€šÃ¯Â¼Å’我们æâ�‚?法éÆ
’¨ç½²iis朠åÃ?¡å™¨ãâ‚Â?
>> >> 是堦有windows service
host的wcf service与asp.net
>> >>
ajax堠作的解åâ�‚?³æââ
��“¹æ¡ˆï¼Ÿè°¢è°¢ãâ‚Â?
>> >>
>> >> >
>> >>
>> >>
>> >
>>
>>
>
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:
msd...@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: =?Utf-8?B?QmlsbHkgWmhhbmc=?= <hti...@noemail.noemail>
>References: <6DFF6104-4C5E-488D...@microsoft.com>
<4#QHphi8I...@TK2MSFTNGHUB02.phx.gbl>
<CE156F5B-963C-4C53...@microsoft.com>
<GW9MRCs8...@TK2MSFTNGHUB02.phx.gbl>
>Subject: RE: Ajax calls web service in wcf(windows service)
>Date: Wed, 30 Jul 2008 22:38:00 -0700
>我们现在頇åËâ
��°ä¸€ä¸ªé—®é¢˜ï¼ŒÃ
©â‚Â?
>
šè¿‡wcf创建的webserviceÃ
�¯Â¼Å’选择windo
>> >> ws
>> >>
>>
>service作为宿主,éâ
€¡â€¡Ã§â€ ¨java作为客Ã?
>
¦Ë†Â·Ã§Â«Â¯Ã¨Â°Æ’熨戠åÃ?ŸÃ
¯Â¼Å’但是æâ�‚?法Ã?
>> > ½¿ç†¨asp.net
ajax调熨ãâ‚Â?
>> >>
>> 我们堂考äºâ€
http://msdn.microsoft.com/zh-cn/library/bb
>> 410780.aspx的资�
>> >
™ï¼Œå¹¶ä¸†ä¸‹è½½Ã
¤Âºâ€ 相庆的sample
>> >>
>> >code,ä½â€
是堑现这些sampleÃ
�¥Å¸ÂºÃ¦Å“¬ä¸Ã?Ã
>> ©Æ’½éœ€è¦ åœ¨iisä¸Å
部署一个svc�
>> >
>> ‡ä»¶ï¼Œä½â€
是Ã?¹æ ®å½“剠业ÃÂ
�Š¡éœ€æ±�
>
€šÃ¯Â¼Å’我们æâ�‚?法éÆ
’¨ç½²iis朠åÃ?¡å™¨ãâ‚Â?
>> >> 是堦有windows service
host的wcf service与asp.net
>> >>
ajax堠作的解åâ�‚?³æââ
��“¹æ¡ˆï¼Ÿè°¢è°¢ãâ‚Â?
>> >>
>> >> >
>> >>
>> >>
>> >
>>
>>
>