如何确定为什么 Web 服务引用被阻止添加到我的 VS2008 项目中?

发布于 2024-07-12 05:43:51 字数 468 浏览 8 评论 0原文

我有一个 VS2005 项目,其中包含几个 Web 服务引用。 该项目最近已升级到 VS2008,但现在 Web 引用出现问题...可能是因为它们可能没有正确升级。

当我选择“更新 Web 引用”时,出现以下错误:

“值不能为空。参数名称:discoveryError % mexError”,这非常有帮助。

然后,我删除了 Web 引用,打算重新添加它...

“添加 Web 引用”对话框出现,并成功加载有关与 Web 服务关联的每个方法的信息。

但是,我无法添加引用,因为执行此操作的按钮呈灰色显示,并且有一个标题为“在此 URL 找到的 Web 服务:”的文本框,其中包含文本“由于当前状态,操作无效”目的”。

现在最后,这让我想到了我的主要问题...那么如何添加此网络引用? 或者更好的是,我如何找出“对象的当前状态”的无效内容?

有人在VS2008中有过类似的经历吗?

I have a VS2005 project that contains a couple web service references. The project has recently been upgraded to VS2008 but now there is a problem with the web references...probably because they may not have been upgraded properly.

When I select Update Web Reference I get the following error:

"Value cannot be null. Parameter name: discoveryError % mexError" which is very helpful.

I've then deleted the web reference with the intent of re-adding it...

The Add Web Reference dialog comes up and successfully loads information about each of the methods associated with the web service.

However, I can't add the reference as the button to do so is grayed out and there is a text box titled "Web services found at this URL:" which contains the text "Operation is not valid due to the current state of the object".

Now finally, this brings me to my main question... How then do I add this web reference? Or better yet, how do I find out what is invalid about the "current state of the object"?

Has anyone had a similar experience in VS2008?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

ゞ记忆︶ㄣ 2024-07-19 05:43:51

我在VS2010上也遇到了同样的问题。 就我而言,问题出在代理服务器上。 我从外部 url 获取了 wsdl。 我的解决方案:在VS2010中设置代理。 编辑 devenv.exe.config 并在 下添加

<system.net>
        <defaultProxy enabled="true" useDefaultCredentials="true">
            <proxy bypassonlocal="True" proxyaddress="http://yourproxyserver:port"/>
        </defaultProxy>
</system.net>

如果代理来自 .pac 文件,则可以省略 标签:

   <system.net>
        <defaultProxy enabled="true" useDefaultCredentials="true">
        </defaultProxy>
   </system.net>

关于相关问题的旧帖子:
http://fhtino.blogspot.it/2006/11/ Visual-studio-2005-proxy-problem-in-add.html

I had the same issue on VS2010. In my case the problem was the proxy server. I got the wsdl from an external url. My solution: set the proxy in VS2010. Edit devenv.exe.config and add <defaultProxy> under <system.net>:

<system.net>
        <defaultProxy enabled="true" useDefaultCredentials="true">
            <proxy bypassonlocal="True" proxyaddress="http://yourproxyserver:port"/>
        </defaultProxy>
</system.net>

If the proxy comes from a .pac file, you can omit the <proxy> tag:

   <system.net>
        <defaultProxy enabled="true" useDefaultCredentials="true">
        </defaultProxy>
   </system.net>

An old post about a related issue:
http://fhtino.blogspot.it/2006/11/visual-studio-2005-proxy-problem-in-add.html

长安忆 2024-07-19 05:43:51

终于想通了。

我使用 WebService Studio 来让我更好地了解正在发生的事情。 它返回错误消息“请求失败,HTTP 状态 407:需要代理身份验证”...这让我知道我必须安装新的安全证书...旧的安全证书已过期。

我想这回答了有关如何查找有关 Web 服务无效内容的更多信息的问题。

Finally figured it out.

I used WebService Studio to give me a better idea of what was going on. It came back with the error message "The request failed with HTTP status 407: Proxy Authentication Required".... which let me know that I had to install the new security certificate...the old one had expired.

I guess that answers this question about how to find more about what is invalid about the web service.

你的背包 2024-07-19 05:43:51

我遇到了同样的错误:通过 Visual Studio 2008 的更新参考,

"Value cannot be null. Parameter name: discoveryError % mexError

我已经通过检查项目的文件夹 ACL 列表修复了它。
当然,我需要将 IUSR 添加到文件夹的安全性中......就是这样!

我为我工作,我也希望能帮助任何人......

I've gotten the same error: with update reference from Visual Studio 2008

"Value cannot be null. Parameter name: discoveryError % mexError

I've already fixed it checking the project's folder ACL list.
Definitely, I needed to add IUSR to the folder's security... and that's it!

I worked for me, and I hope to help anyone as well...

扛起拖把扫天下 2024-07-19 05:43:51

我不知道是什么导致了我这个错误。 我无法向服务添加 Web 引用,但可以添加服务引用。 不幸的是,我需要网络参考。

所以我所做的就是将 WSDL 下载到我的机器上。 当 VS 2012 要求提供参考 URL 时,我输入了计算机上 WSDL 文件的路径。 这为我创建了网络参考。

然后我进入 Reference.map 并将 WSDL 的位置从本地路径更改为 URL。 我还没有尝试过,但我认为它应该可以工作......至少我创建了我的网络参考。

I have no idea what was causing this error for me. I could not add a Web Reference to a service, but I could add a service reference. Unfortunately, I needed the Web Reference.

So what I did was download the WSDL to my machine. When VS 2012 asks for the reference URL, I entered the path on my machine to the WSDL file. That created the Web Reference for me.

Then I went into the reference.map and changed the location of the WSDL from the local path to the URL. I haven't tried it out yet, but I'm thinking it should work... At least I got my web reference created.

衣神在巴黎 2024-07-19 05:43:51

有人摆弄了我的 IIS。 该服务的匿名身份验证已禁用,重新启用后此错误消息就会消失。

Someone had fiddled with my IIS. Anonymous authentication was disabled for the service, once it was re-enabled this error message went away.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文