I have created a reference to an IIS hosted WCF service in my ASP.NET website project on my local workstation through the "Add Service Reference" option in Visual Studio 2008. I was able to execute the service from my local workstation.
我通过Visual Studio 2008中的“添加服务引用”选项在我的本地工作站上的ASP.NET网站项目中创建了对IIS托管的WCF服务的引用。我能够从本地工作站执行该服务。
When I move the ASP.NET web site using the "Copy Web Site" feature in Visual Studio 2008 to the development server and browse to the page consuming the service, I get the following error:
当我使用Visual Studio 2008中的“复制网站”功能将ASP.NET网站移动到开发服务器并浏览到使用该服务的页面时,出现以下错误:
Reference.svcmap: Specified argument was out of the range of valid values.
Reference.svcmap:指定的参数超出了有效值的范围。
Has anyone experienced this same error and know how to resolve it?
有没有人遇到过同样的错误,知道如何解决它?
EDIT: My development server is Win2k3 with IIS 6
编辑:我的开发服务器是带有IIS 6的Win2k3
3 个解决方案
#1
1
The problem may be due to a mismatch with the solution/project folder structure and the IIS web site folder structure. I ran into similar problems a good while ago and ended up changing how I deploy web services. Here and here are some discussions of similar problems to yours, they ended up not using the Add Service generated client and rolled their own client. Also, I can vouch for using the "Publish web site" method for deploying my services. Here is a good article on web service deployment models.
问题可能是由于与解决方案/项目文件夹结构和IIS网站文件夹结构不匹配。我很久以前遇到过类似的问题,最终改变了我部署Web服务的方式。这里和这里是对你的类似问题的一些讨论,他们最终没有使用添加服务生成的客户端并推出他们自己的客户端。另外,我可以保证使用“发布网站”方法来部署我的服务。这是一篇关于Web服务部署模型的好文章。
#2
1
@Sixto Saez: I was able to use the following resource similar to the one you provided to generate a proxy class using the ServiceModel Metadata Utility Tool (svcutil.exe).
@Sixto Saez:我能够使用类似于您提供的资源,使用ServiceModel元数据实用工具(svcutil.exe)生成代理类。
Here is the exact command line:
这是确切的命令行:
svcutil /t:code http://<service_url> /out:<file_name>.cs /config:<file_name>.config
Here is the reference I found that suggested using the method.
这是我发现建议使用该方法的参考。
Also, I was able to consume the service by creating a reference using the Visual Studio 2008 "Add Web Reference" command. It generates code based on .NET Framework 2.0 Web Services technology.
此外,我能够通过使用Visual Studio 2008“添加Web引用”命令创建引用来使用该服务。它基于.NET Framework 2.0 Web服务技术生成代码。
#3
0
Unforunately, the WCF service web site and I can not use the svcutil solution (Unless you know of a way how...). Do you deploy you service or your web site with the service reference using Visual Studio 2008 publish web site feature?
不幸的是,WCF服务网站和我不能使用svcutil解决方案(除非你知道如何...)。使用Visual Studio 2008发布网站功能,您是使用服务引用部署服务或网站吗?
#1
1
The problem may be due to a mismatch with the solution/project folder structure and the IIS web site folder structure. I ran into similar problems a good while ago and ended up changing how I deploy web services. Here and here are some discussions of similar problems to yours, they ended up not using the Add Service generated client and rolled their own client. Also, I can vouch for using the "Publish web site" method for deploying my services. Here is a good article on web service deployment models.
问题可能是由于与解决方案/项目文件夹结构和IIS网站文件夹结构不匹配。我很久以前遇到过类似的问题,最终改变了我部署Web服务的方式。这里和这里是对你的类似问题的一些讨论,他们最终没有使用添加服务生成的客户端并推出他们自己的客户端。另外,我可以保证使用“发布网站”方法来部署我的服务。这是一篇关于Web服务部署模型的好文章。
#2
1
@Sixto Saez: I was able to use the following resource similar to the one you provided to generate a proxy class using the ServiceModel Metadata Utility Tool (svcutil.exe).
@Sixto Saez:我能够使用类似于您提供的资源,使用ServiceModel元数据实用工具(svcutil.exe)生成代理类。
Here is the exact command line:
这是确切的命令行:
svcutil /t:code http://<service_url> /out:<file_name>.cs /config:<file_name>.config
Here is the reference I found that suggested using the method.
这是我发现建议使用该方法的参考。
Also, I was able to consume the service by creating a reference using the Visual Studio 2008 "Add Web Reference" command. It generates code based on .NET Framework 2.0 Web Services technology.
此外,我能够通过使用Visual Studio 2008“添加Web引用”命令创建引用来使用该服务。它基于.NET Framework 2.0 Web服务技术生成代码。
#3
0
Unforunately, the WCF service web site and I can not use the svcutil solution (Unless you know of a way how...). Do you deploy you service or your web site with the service reference using Visual Studio 2008 publish web site feature?
不幸的是,WCF服务网站和我不能使用svcutil解决方案(除非你知道如何...)。使用Visual Studio 2008发布网站功能,您是使用服务引用部署服务或网站吗?