service-reference

Refreshing service references updates the app.config

旧时模样 提交于 2019-12-04 01:46:50
问题 Every time I make changes to my WS and update the reference in Visual Studio, VS overwrites my app.config with additional unnecessary information. So when I start my client afterwards, I get this error: An error was discovered processing the header The changes that the code generator made was to remove this line from every binding (note I'm using customBinding/httpsTransport): <security authenticationMode="UserNameOverTransport" includeTimestamp="false"> <secureConversationBootstrap/> <

There was an error downloading metadata from the address

守給你的承諾、 提交于 2019-12-03 12:54:55
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 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 You may also just need to build / rebuild the project. It was happening the same to me and I found that I've had forgotten to add the "Service Contract" and the "Operation Contract"

What exceptions may a generated service reference throw?

我的梦境 提交于 2019-12-03 12:05:18
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 I should catch and rethrow to show error messages at a later stage. For those generated methods, how

System.Net.WebException: The request was aborted: the request was cancelled

一笑奈何 提交于 2019-12-03 09:02:42
问题 I have a WCF service that has been giving me this error under load conditions (and I can't seem to recreate the error otherwise). We've been trying to find a way around it for about a week now with no such luck.. The error I see has two parts to it, System.ServiceModel.CommunicationException: An error: (The request was aborted: the request was cancelled.) occurred while transmitting data over the http channel. and: System.Net.WebException: The request was aborted: the request was cancelled. I

Unable to add a service reference to Dynamics 365 crm in visual studio 2012

喜你入骨 提交于 2019-12-02 18:46:39
问题 I am trying to add service reference to Dynamics 365 CRM using the following API https://[Organization].api.crm8.dynamics.com/api/data/v8.2/ but each time I am getting this window that asks me for credentials.... I tried using the credentials that I use to login to the crm...but they donot work...can someone tell me which credential I should use?.. 回答1: Why exactly are you trying to add a reference to the CRM web services? Assuming you want to access CRM from server side code, what you need

Add Header to the Simple Web Service Request

耗尽温柔 提交于 2019-12-01 11:27:47
I have a Console application, I add a Web reference simply by write click and use "Add Service Reference", then my .Config file changed to: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="FServiceSoapBinding" /> </basicHttpBinding> </bindings> <client> <endpoint address="http://ServiceAdd/FService" binding="basicHttpBinding" bindingConfiguration="FServiceSoapBinding" contract="MyReference.MService_" name="FServicePort" /> </client> </system.serviceModel> </configuration> So, every thing is fine and it seems I can use

Add Header to the Simple Web Service Request

让人想犯罪 __ 提交于 2019-12-01 08:25:36
问题 I have a Console application, I add a Web reference simply by write click and use "Add Service Reference", then my .Config file changed to: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="FServiceSoapBinding" /> </basicHttpBinding> </bindings> <client> <endpoint address="http://ServiceAdd/FService" binding="basicHttpBinding" bindingConfiguration="FServiceSoapBinding" contract="MyReference.MService_" name="FServicePort"

VS2010 Updating Service Reference *crazy* Slow (like 5 minutes)

て烟熏妆下的殇ゞ 提交于 2019-12-01 05:11:05
our team is starting to dread updating the service references in our solution because it's a 5+ minute investment. Everything is localhost inside Visual Studio's web server. My question is - how can I debug what this problem is? It works fine once it is over, but the long delay is crazy. If I had a clue where to look, perhaps I could resolve this. With VS2012, I ran into the same issue: it took me almost 10 minutes just to update one service reference. I just managed to fix this by re-adding the service in the following way: Delete the service reference. Right-click "Service References" and

Including a service reference from a class library

寵の児 提交于 2019-12-01 02:46:18
I have a C# class library and a startup project (a console app). The class library includes a service reference to a web service. When I try to run the project, I get an InvalidOperationException because the startup project isn't reading the class library's app.config, and it's ignoring the service reference. To get it working, I'm forced to add the same service reference to the startup project. Is there any way I can avoid this? Can I make the startup project recognize the class library's service reference and app.config without having to copy it to the startup project? I've tried adding a

Error adding service reference: Type is a recursive collection data contract which is not supported

我怕爱的太早我们不能终老 提交于 2019-12-01 02:36:08
I tried to add a service reference to a WCF service that resides in the same solution from an ASP.NET MVC 4 project but failed. I got a error saying: Custom tool error: Failed to generate code for the service reference 'XXX'. Please check other error and warning messages for details. The root warning is: Warning 9 Custom tool warning: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: Type 'Newtonsoft.Json.Linq.JToken' is a recursive collection data contract