问题描述
我正在编写使用我的wcf服务的Windows 8应用程序(在Visiual Studio 2012上)。当我在家里尝试时它很好用,所以它可以连接到wcf。但是当我在我的办公室尝试时,它无法连接到wcf并返回错误:
$
远程服务器返回错误:(417)期望失败。
我认为它是由办公室网络中的防火墙造成的......用Google搜索过多,尝试了很多,但问题仍然在这里。
Hi,
I'm writing windows 8 app.(on Visiual Studio 2012) which uses my wcf service. It works well when i try at my home, so it can connect to the wcf. But when i tried at my office, it cannot connect to wcf and returns error :
The remote server returned an error: (417) Expectation Failed.
I think its causing by firewall in the office network.. Googled too much, tried a lot of however the problem still here.
这些是我在发布问题之前尝试过的;
These are which i tried before posting question;
System.Net.ServicePointManager.Expect100Continue = false;
不起作用,因为.Net Framework 4.5 for Win8 app没有ServicePointManager类,但msdn说.Net 4.5上有ServicePointManager .. http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.expect100continue.aspx
Doesn't work because .Net Framework 4.5 for Win8 app has not ServicePointManager Class but msdn says there is ServicePointManager on .Net 4.5.. http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.expect100continue.aspx
---------------------------
---------------------------
<system.net>
<settings>
<servicePointManager expect100Continue="false" />
</settings>
</system.net>
无法尝试在web.config或app.config上写这个,因为win8 app已经不是这些文件..
Cannot try this to write on web.config or app.config because win8 app has not these files..
------------------------
------------------------
有些人(http://www.jlpaonline.com/?p=176)将上面的代码写入了VS 2012的devenv.exe.config文件。我尝试了但没有改变。
some people(http://www.jlpaonline.com/?p=176) wrote above code to devenv.exe.config file of VS 2012. I tried it but nothing changed.
推荐答案
我会说这个 - 这是一个真正的问题。
我发现与Expect100Continue完全相同的提示 - 但是如何在Windows 8应用程序中更改它?
I'll second this - it's a real problem here.
I found exactly the same hints with Expect100Continue - but how to change this in a Windows 8 App?
我认为这将阻碍更多应用程序的工作: - /
I think this will hinder a lot more apps from working :-/
任何提示?
James
这篇关于远程服务器返回错误:(417)期望失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!