service-reference

There was an error downloading metadata from the address

孤街醉人 提交于 2020-01-10 01:35:07
问题 I am trying to add service reference. There was an error downloading metadata from the address this is the error which is being displayed again and again? Please help 回答1: There are atleast 4 possibilities: The metadata exchange mex endpoint is not defined metadata exchange is not enabled You are using the wrong address You are being blocked by some security setting Try the url in a browser to see that it returns a wsdl 回答2: You may also just need to build / rebuild the project. 回答3: It was

Project does not build after updating a service reference

家住魔仙堡 提交于 2020-01-02 12:09:51
问题 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")]

Consuming non-asmx SOAP 1.1 Web Service in C# with Header Security

半城伤御伤魂 提交于 2019-12-25 17:49:18
问题 First time poster so please take it a bit easy on me if I break any posting rules - I have read them and I think I'm right. I've been searching for a while before posting and can't seem to find a guide on what I am trying to do so I thought I would post here. I need to write a C# .NET 3.5 program to consume a web service developed in Java. I have practice consuming ASMX web services in .NET using Web References from my experience writing Dynamics CRM plugins and software but this has me

How to add a “service reference” in a asp.net website?

本秂侑毒 提交于 2019-12-24 09:29:23
问题 I just found out that I get the "Add Service Reference" context menu option in a class library project but not in a "Web Site" project. Now I am too far in this project and i need to use the Paypal Express Checkout option in my website. But when i add a web reference to the API, i do not get a reference.cs class. Is there another option to integrate the API. If yes, a code sample would be great help. 回答1: The following links could be useful: http://www.asp.net/web-forms/tutorials/aspnet-45

WCF Error - Reference.cs is blank (empty) [closed]

泪湿孤枕 提交于 2019-12-23 12:28:40
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I added the service reference in my project and it has created all required wsdl files. But when I looked at the reference.cs file, I found it blank. -Anil 回答1: you can rightclick in the service reference created and click the Configure service reference... option. in the DataType section UnCheck Reuse types in

WCF: Updating Service Reference gives duplicate config entries

穿精又带淫゛_ 提交于 2019-12-22 06:56:42
问题 I have a WPF application using service references to a WCF service. When doing updates on the service I need to update the service reference, so I right click it and hit "Update Service Reference". Doing this results in duplicate entries in the App.config file of the client project. It duplicates a binding under wsHttpBinding - adding an equal entry with postfix number in name: WSHttpBinding_ISomeService --> WSHttpBinding_ISomeService1 . And it duplicates the endpoint definition under binding

Suppress Xml warning for ServiceReference .cs file

隐身守侯 提交于 2019-12-22 04:59:15
问题 Working with MVC4 and VS2012 , I am using a Service Reference , which auto generates a Reference.cs file. When I build, I get dozens of warnings as errors that read 'Missing XML comment for publicly visible type or member...' I have found a similar answer here, which references a workaround found in this blog, which suggests adding the following fix into the CSProj file: <Target Name="XamlGeneratedCodeWarningRemoved" AfterTargets="XamlMarkupCompilePass1"> <Exec Command="for %%f in (@

Object hierarchy returned by WCF Service is different than expected

你说的曾经没有我的故事 提交于 2019-12-21 21:27:44
问题 My understanding may be wrong, but I thought once you applied the correct attributes the DataContractSerializer would render fully-qualified instances back to the caller. The code runs and the objects return. But oddly enough, once I look at the returned objects I noticed the namespacing disappeared and the object-hierarchy being exposed through the (web applications) service reference seems to become "flat" (somehow). Now, I expect this from a web-service…but not through WCF. Of course, my

Why is an XSD element of type s:date becoming a string when generating a Service Reference?

吃可爱长大的小学妹 提交于 2019-12-21 17:37:28
问题 I'm trying to create a new Service Reference from a WSDL and all of the properties I expect to be DateTime instead of string. For example, this xsd definition for Contact: <s:complexType name="Contact"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Address" type="tns:Address" /> <s:element minOccurs="0" maxOccurs="1" name="Email" type="s:string" /> ... <s:element minOccurs="1" maxOccurs="1" name="BirthDate" type="s:date" /> </s:sequence> The type of BirthDate is s:date, but the

What exceptions may a generated service reference throw?

北战南征 提交于 2019-12-21 04:03:38
问题 I have added a web service in Visual Studio 2010 using the "Add Service Reference...". This generates some code in a file called Reference.cs . Now, if I call one of the methods I wan't to know what exceptions the method may throw. Presumably it can throw network related exceptions such as SocketException or IOException ? Regular methods in .NET can be checked on msdn or inside the source code to reveal what exceptions may be thrown, like for example File.Open. Here it's clear what exceptions