service-reference

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

泪湿孤枕 提交于 2019-12-19 05:11:10
问题 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

WCF common types not reused

為{幸葍}努か 提交于 2019-12-17 23:27:40
问题 Hint: This questions has many duplicates, but none of the solutions works for me. What I have is a web service and a client, both having references to a shared assembly "DataModel". I'm creating the service proxy using the "Add service reference..." dialog and select "Reuse types in all referenced assemblies", but still it creates new types instead of reusing mine. It used to work, but now suddenly it's not reusing types anymore Referencing the shared assembly before adding the service

Version-control: svcmap, disco, xsd, wsdl, svcinfo and datasource files

谁都会走 提交于 2019-12-17 16:12:48
问题 We have a webservice named, let's say Foo. So there is a Foo.svc file and a code behind Foo.svc.cs. We add a silverlight project and wish to use the Foo.svc services so we add a Service Reference and call it's namespace FooBar. This creates the following files : Reference.cs Reference.svcmap Foo.xsd Foo.disco configuration.svcinfo Foo.wsdl Also various *.datasource files. Over time we update the Foo.svc and add more Web Services (methods and interfaces) and the number of files in the FooBar

What are the WCF Service Reference .datasource files?

僤鯓⒐⒋嵵緔 提交于 2019-12-17 10:47:22
问题 What are the .datasource files that are automatically generated by "Create Service Reference" in Visual Studio? The comment in the file is this: This file is automatically generated by Visual Studio .Net. It is used to store generic object data source configuration information. Renaming the file extension or editing the content of this file may cause the file to be unrecognizable by the program. However, it sounds like these files are optional, so I'm wondering what they are used for. I'm

Add Service Reference in .NET Core in Visual Studio for Mac

岁酱吖の 提交于 2019-12-14 02:07:45
问题 As far as I know, in Windows I was able to add a service reference in a .NET Core project in Visual Studio 2017 by installing the Visual Studio WCF Connected Service, but I wasn't able to find that same extension in Visual Studio for Mac. Is there any other way of adding a service reference in Mac? 回答1: In Visual Studio for Mac "Community" 7.8.3 (build 2), right-click on the project name in the Solution Explorer. Then select Add -> Add Web Reference. I had the choice between WFC and .NET 2.0

Blazor WebAPI to Client deserialization exception (PocoJsonSerializerStrategy)

為{幸葍}努か 提交于 2019-12-13 23:55:59
问题 I am able to generate a proxy (using VS 2017) via the Microsoft OData Connector Service Nuget. This generates the proxy just fine. However, when i try to send a entity over the wire to the client side, i get a deserialization exception. Is there any technical issues using service reference/proxy generated entities/data-models? Below is the exception i was able to capture when the payload is retrieved from my Web API to the client. System.Reflection.TargetParameterCountException: Number of

Why is the <system.serviceModel> section missing from app.config?

烈酒焚心 提交于 2019-12-13 03:23:40
问题 I'm trying to consume a WCF service. I added a Service Reference, and now I'm trying to call it: BusStopServiceBinding.BusStopPortTypeClient client = new BusStopServiceBinding.BusStopPortTypeClient(); However, I'm getting this error: Could not find default endpoint element that references contract 'BusStopServiceBinding.BusStopPortType' in the ServiceModel client configuration section. This might be because no configuration file was found for your application, or because no endpoint element

Remotely-Called Process Failing to Update Database

可紊 提交于 2019-12-12 05:09:47
问题 I'm currently working with a process that imports a CSV file into our database, then produces and zips an output flat file that details the entries added that hadn't existed before or were changed. At the moment, if the process is run in Visual Studio or from the .exe file, everything goes off without a hitch, and we are provided the files and can verify the changes to the database. If, however, the process is called through Autosys (our workload automation tool), we're given the output file

Add Service Reference to WCF Service within Same Project

自闭症网瘾萝莉.ら 提交于 2019-12-12 04:24:15
问题 Is it an acceptable programming practice to add a Service Reference to a Project where the Service being referenced is defined within the same VS Project? (Service and Service Reference are in the same Project) example: MyWebAppProj -Services --MyService -Service References --MyServiceServiceReference.MyServiceClient -Default.aspx.cs uses MyServiceServiceReference.MyServiceClient The rational behind this is that a Silverlight App may be added to the Project. If it is, we would have to expose

Unable to generate a proxy for a self-hosted service with “Add Service Reference”

别等时光非礼了梦想. 提交于 2019-12-12 02:27:35
问题 I created a basic calculator service called MiniCalc that only has two operations. Add and Mul, and hosted it in a Console Application. using(ServiceHost host = new ServiceHost(typeof(MiniCalcService.Service), new Uri("http://localhost:8091/MiniCalcService"))) { host.AddServiceEndpoint(typeof(MiniCalcService.IService), new BasicHttpBinding(), "Service"); host.Open(); Console.Write("Press ENTER key to terminate the MiniCalcHost . . . "); } Then I created a console application to consume the