service-reference

WCF: Updating Service Reference gives duplicate config entries

不想你离开。 提交于 2019-12-05 09:55:58
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 such that there is one endpoint for each wsHttpBinding . This too is a pure duplicate except of the

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

十年热恋 提交于 2019-12-05 08:00:51
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 in my project's settings and even created an empty project to try it out. Same results. I am not sure

Best way to manage multiple Service References in .NET

白昼怎懂夜的黑 提交于 2019-12-05 03:33:20
问题 I have a C# ASP.NET project with 15 WCF/ASMX Service References. Each service is deployed to three different servers; test , staging and live . Often we need to change the URLs of these service references to different servers, to be able to debug using the correct service with the correct implementation and data. When managing these Service References I'm having a hard time keeping the URL in sync. When creating a Service Reference FooService it stores the URL in three seperate files:

Service reference - why reuse types in referenced assemblies

拟墨画扇 提交于 2019-12-05 02:41:29
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? I know I'm answering like two years late, but... 1- To avoid having two classes with the same name, types, etc. 2- It means that, if you control both the server code and client code and define the

Update service reference not working

ぐ巨炮叔叔 提交于 2019-12-05 00:07:14
I'm using Visual Studio 2008 and have a WCF client working against a WCF service. They are both located in the same Visual Studio solution. After I've made a change in my WCF contract, I want to update the service reference on the client so that changes made to the contract is also made in the proxy. My problem is that the proxy code is not re-generated. When I select to update the service reference, the following happens: A dialog with the title "Updating service reference 'name-of-reference'" is shown. This dialog has a progress bar. The progressbar moves and the status text in the dialog is

Object hierarchy returned by WCF Service is different than expected

牧云@^-^@ 提交于 2019-12-04 17:18:12
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 understanding of what WCF can do may be wrong. ...please keep in mind I'm still experimenting with all

error downloading $metadata from webservice

本小妞迷上赌 提交于 2019-12-04 12:56:06
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. 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://stackoverflow.com/questions/36276946/error-downloading-metadata-from-webservice

Alternative to service reference

十年热恋 提交于 2019-12-04 10:55:36
I am trying to assist one project team to streamline their work by fixing some of the pain points. One of the pain points they have in their code is that, they are using WCF service via service references (proxy) [i.e. "Add Service Reference" in Visua Studio 2008. This creates a lot of problem including deployment overhead, Souce Control get latest related problems of updating proxy etc. In order to handle these and other related issues with service reference, I am looking for a good alternative to service references. I have already seen ChannelFactory and I am leaning towards that most. That

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

会有一股神秘感。 提交于 2019-12-04 10:51:41
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 generated type (in Reference.cs) is a string. internal partial class Contact : object,

Windows Phone ReverseGeocoding to get Address from Lat and Long

依然范特西╮ 提交于 2019-12-04 02:32:04
问题 i am using the following service reference to get location details from latitude and longnitude http://dev.virtualearth.net/webservices/v1/geocodeservice/geocodeservice.svc i added the above URL to my Service reference class and try to get the location details by calling the below method public void reverse() { string Results = ""; try { // Set a Bing Maps key before making a request string key = "Bing Maps Key"; ReverseGeocodeRequest reverseGeocodeRequest = new ReverseGeocodeRequest(); //