service-reference

Web Reference works, but A Service Reference complains about Soap version

风格不统一 提交于 2019-12-12 00:08:37
问题 I have to connect to a legacy web service. In visual studio, if I do a Add Service Reference, then enter the url of the WSDL file on server. My service shows up, and I write the code against it. But when I run the code I get this error: System.ServiceModel.CommunicationException: The envelope version of the incoming message (Soap12 (http://www.w3.org/2003/05/soap-envelope)) does not match that of the encoder (Soap11 (http://schemas.xmlsoap.org/soap/envelope/)). Make sure the binding is

How to Add Web Reference for UWP in VS 2015?

我怕爱的太早我们不能终老 提交于 2019-12-11 10:06:01
问题 I am trying to migrate my code from normal wpf application to Universal Windows Platform. Previously I have used VS 2012 for Developing my WPF application And its working fine. Now I want to use the same application for mobile also.I found UWP as a solution for it. Now I am using vs 2015 . But here in vs 2015 I am unable to find Web Reference Option I am able to see only Service Reference. Actually My situation is I am Dynamically taking Ip Address and port number from User Based on the

“Add Service Reference…” to xsd

假装没事ソ 提交于 2019-12-11 06:59:06
问题 I can create a service reference in Visual Studio 2010 to an xsd. That reference downloads all the linked xsd files. However, I have 2 problems I'd like to see if there are solutions: The URL for each xsd actually ends in .gx (e.g., http://mycompany.com/Schema1.gx). When Visual Studio imports the files, it renames them to .xsd, but in the xsd:import node, it keeps the original reference name with .gx, so my reference, once it's in Visual Studio is "not found or invalid" for some of the xsd

Where do I set the CookieContainer on a Service Reference?

落爺英雄遲暮 提交于 2019-12-08 14:48:47
问题 When adding WebService Reference to an ASMX Service on a .NET 2.0 project for example, var objService = new NameSpace.groupservices(); there exists, objService.CookieContainer = new System.Net.CookieContainer(); When adding ServiceReference to an ASMX Service on a .NET 4.0 project for example, var objService = new NameSpace.groupservicesSoapClient(); there isn't any CookieContainer property for objService A similar question was asked here with no positive solution. Could someone please guide

When to use WCF ChannelFactory over service reference [duplicate]

我只是一个虾纸丫 提交于 2019-12-08 02:56:31
问题 This question already has answers here : WCF ChannelFactory vs generating proxy (6 answers) Closed 2 years ago . I'm going through WCF tutorials and find that these tuts point me to make a mex endpoint available to allow for implicitly adding service references to clients. I guess this allows VS to create proxy classes when consuming the resultant WSDL file? The codebase I'm trying to get comfortable on, however, does not use implicit service references. Instead clients have access to a

VS2010 Add Service Reference missing (Unable to add Service Reference)

◇◆丶佛笑我妖孽 提交于 2019-12-07 02:26:09
问题 I have an issue that seems to be identical to this question. I am unable to add a service reference to any project in Visual Studio. I went so far as to format the entire computer, re-install Windows (Windows 7 Ultimate), and VS2010 Professional. Twice. This is a work computer that I inherited and I find it odd that, even after formatting the drive and reinstalling everything, I cannot add a service reference to any project on this computer. I am 100% certain that .NET 3.5 is being targeted

Service reference - why reuse types in referenced assemblies

回眸只為那壹抹淺笑 提交于 2019-12-06 20:25:37
问题 I'm following instructions to add a service reference to my project and, by default, the "reuse types in referenced assemblies" is ticked. If I leave it ticked, I get ambiguous warnings on controls like Label, which I have to declare fully now. If I untick it, the warnings go away. My questions are: Why would I want to reuse types? What does that mean exactly? What are the problems if I don't use it? 回答1: I know I'm answering like two years late, but... 1- To avoid having two classes with the

Project does not build after updating a service reference

ぃ、小莉子 提交于 2019-12-06 07:58:20
I get the following error building my project after updating a service reference: does not contain a definition for 'DefaultResolveType' The error is thrown on the auto-generated Reference.cs, but the DefaultResolveType method should be in the generated class as it is called from the 'this' keyword. The data service hasn't changed and the client code hasn't changed since the last successful build. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")] protected global::System.Type ResolveTypeFromName(string typeName) { global::System.Type resolvedType

error downloading $metadata from webservice

早过忘川 提交于 2019-12-06 04:55:54
问题 I am trying to add web reference when adding web reference url in windows application it shows error like this. how do i solve it? There was an error downloading 'http://www.example.com/BackEndWebService/LoginWebService.asmx/$metadata'. The request failed with the error message: $metadata Web Service method name is not valid. 回答1: I had the same issue the other day when tried to update the web reference and managed to fix it by adding ?WSDL at the end. That should work. 来源: https:/

VS 2010 Error “Object reference not set to an instance of an object” when adding Service Reference for WCF Service

跟風遠走 提交于 2019-12-05 22:45:46
问题 I have a VS2010 (RTM) solution which contains: WCF Service project Console WCF client project Class project for DataContracts and members Class project for some simple classes I successfully added a service reference in the console client project and ran the client. I then did a long dev cycle repeatedly modifying the service then updating console service reference. I then changed the namespace and assembly names for the projects as well as the .cs using references and app.config. I of course