wcf-binding

Get setting from C# App.config file

白昼怎懂夜的黑 提交于 2019-12-11 08:22:04
问题 I have an app.config file. It's from a sample given to me for an API I have to use... I want to get a setting from the file so that I can use the settings from there and not have to duplicate efforts. How can I get the words "FindMe", "LocalMachine" and "My" in this app.config file (to drive pulling a certificate from the given information)? <?xml version="1.0" encoding="utf-8"?> <configuration> <startup>...</startup> <system.serviceModel> <bindings>...</bindings> <client>...</client>

Visual Studio “Add Service Reference” - not gets all service settings

半城伤御伤魂 提交于 2019-12-11 07:45:24
问题 my purpose is to ensure that - when someone clicks on "Add Service Reference" in his own Visual Studio, and he adds references to my WCF service - he receives not the default settings, but the settings of the service. In particular, there is a property of the "binding" class that interests me: useDefaultWebProxy, I need it setted to "false". I tried this, but with no results: In the Web.config file of the service: <system.serviceModel> <bindings> <basicHttpBinding> <binding name="NewBinding0"

WCF with tcp.net binding testing with JMeter

无人久伴 提交于 2019-12-11 06:12:10
问题 I have a problem that in JMeter I can setup server / port, but my application is hosting on IIS 7.5 and WCF service is a "Application" under specific web site. So the service endpoint is http://localhost:8002/Some.Aplication/Some.Application.svc WCF application is supporting tcp.net binding also and I should use it(tcp.net). Ho can I set up JMeter for sending specific packet over tcp to this endpoint ? Thanks. 回答1: You need to use TCP Sampler, and probably write a custom TCPClient class for

WCF TCP Binding

我们两清 提交于 2019-12-11 04:21:30
问题 how to implement the TCP binding in WCF ??? If I select TCP as binding then it ask for Address for the endpoint...and default given is net.tcp:// What should be the endpoint and base address here ? how can I specify that ??? Please give me step by step info as I am new to WCF Binding world... Thanks in advance... 回答1: See this question, I believe it contains both an answer to your question and pointers to more references. WCF Service netTCPbinding 来源: https://stackoverflow.com/questions

Error While trying to upload video >50MB using WCF Service

柔情痞子 提交于 2019-12-11 04:13:50
问题 I am recving the exception while i try to upload a file of size grater than 50MB using the WCF service. Following is my Config File: I have used "BASIC HTTP BINDING" <?xml version="1.0"?> <!-- Note: As an alternative to hand editing this file you can use the web admin tool to configure settings for your application. Use the Website->Asp.Net Configuration option in Visual Studio. A full list of settings and comments can be found in machine.config.comments usually located in \Windows\Microsoft

Azure Service Bus Relay - 502 Bad Gateway after Service Restart

↘锁芯ラ 提交于 2019-12-11 03:09:51
问题 We are using the Azure Service Bus Relay for connecting our on-premise WCF services to our Azure-hosted Web Role. When we upgrade our on-premise WCF services, we always get a 502 Bad Gateway response from our first few requests through the Azure Service Bus, after the service bus host has re-established itself with the relay ( we don't get the "No service is hosted at the specified address." since the service is hosted properly). After a given timeout period - it seems the error disappears

wsHTTPBinding over HTTPS causes Error 400 'Bad Request'

冷暖自知 提交于 2019-12-11 03:09:49
问题 I've been trying to create a simple service to allow messages to be logged onto a remote server via WCF, which all worked fine until I published the service to the live environment, which uses HTTPS. After some searching, I found that I needed to change my ServiceConfig to account for the different protocol. I used a combination of these two articles: How to configure WCF services to work through HTTPS without HTTP binding? WCF Bindings needed for HTTPS Having made the recommended changes to

Getting IIS gzip compression to work with Silverlight WCF service on .NET 4.0

前提是你 提交于 2019-12-11 01:45:23
问题 I have a Silverlight project getting data from an IIS 7.0 server via WCF web services. The data returned is usually large, so compression seemed like a good option. However, for the life of me, I can't get it to work. Here's what I tried so far Enabled compression (dynamic and static) for all mime types ( / ). Verified that it works (a hit on an aspx page returns gzipped data as per fiddler) Did a whole lot of digging around on WCF and compression. I read something along the lines of WCF 4.5

How to add a service reference to a WCF client for a web service requiring client authentication certificate

荒凉一梦 提交于 2019-12-10 19:11:00
问题 Caution, WCF noobie alert I need to create a WCF client to query a non-WCF web service. The web service is not a WCF service. Additionally, the web service requires a client authentication certificate. Now, I have the certificate, and can create a non-WCF client that works perfectly; I was able to 'Add Web Reference' and a certificate dialog box opened up to allow me to select the appropriate certificate, then went on to create the web reference. Trying to create a WCF client via 'Add Service

MaxReceivedMessageSize in WCF Hosted Service in console application

烈酒焚心 提交于 2019-12-10 17:50:00
问题 I have a hosted WCF service in my console application as follow: static void Main(string[] args) { Uri baseAddress = new Uri("http://localhost:8080/Test"); // Create the ServiceHost. using (ServiceHost host = new ServiceHost(typeof(TestService), baseAddress)) { // Enable metadata publishing. ServiceMetadataBehavior smb = new ServiceMetadataBehavior(); smb.HttpGetEnabled = true; smb.MetadataExporter.PolicyVersion = PolicyVersion.Policy15; host.Description.Behaviors.Add(smb); host.Open();