wcf

How to read/parse soap header request in WCF service created in .Net Core 3.1

旧时模样 提交于 2021-02-16 15:09:46
问题 I have created a poc WCF service and i am able to call that service using SOAP UI or Postman. But for some project work, i need to parse the below soap security header SOAP Header <soapenv:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:UsernameToken wsu:Id="UsernameToken-5351BA8068B753C930158868612679914"><wsse:Username>test

WCF Named Pipe in Windows Service using App.Config

守給你的承諾、 提交于 2021-02-16 14:27:11
问题 I am frustrated. Okay, here is the error. There was no endpoint listening at net.pipe://localhost/MyIpcAppToService that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. I finally got the App.Config file working, at least no complaints. Current App.Config <?xml version="1.0" encoding="utf-8"?> <configuration> <!-- When deploying the service library project, the content of the config file must be added to

Adding WSDL service reference to VS fail because generated xsd file contains illegal character for TFS

不打扰是莪最后的温柔 提交于 2021-02-15 07:57:41
问题 I have a solution that is on TFS. I'm trying to add a WSDL as service reference to it. The WSDL's URL looks like this: ".../ws/soap;auth=..." When adding the reference, VS will generate all the required xsd files and the xsd files name would use the URL as its name. When generating it, TFS will try to automatically add the files, and at this point it will detect that I have a .xsd files with illegal character ";" as its name and then the whole service reference generation just failed and

Adding WSDL service reference to VS fail because generated xsd file contains illegal character for TFS

自闭症网瘾萝莉.ら 提交于 2021-02-15 07:54:10
问题 I have a solution that is on TFS. I'm trying to add a WSDL as service reference to it. The WSDL's URL looks like this: ".../ws/soap;auth=..." When adding the reference, VS will generate all the required xsd files and the xsd files name would use the URL as its name. When generating it, TFS will try to automatically add the files, and at this point it will detect that I have a .xsd files with illegal character ";" as its name and then the whole service reference generation just failed and

WCF Versioning : Update Attribute Namespaces and Support Previous Namespaces

谁都会走 提交于 2021-02-11 18:15:01
问题 I have three WCF services (.svc) which generate .wsdl references for SOAP messages. Given that part of the namespace needs to change for all ServiceContract, OperationContract, DataContract attributes, for example [DataContract(Namespace = "http://old.com.au/types/")] to [DataContract(Namespace = "http://new.com.au/types/")] How is it that I can still support clients which have the old service reference (without them needing to update, because maybe they wont have time to update immediately)

WCF Versioning : Update Attribute Namespaces and Support Previous Namespaces

痴心易碎 提交于 2021-02-11 18:13:56
问题 I have three WCF services (.svc) which generate .wsdl references for SOAP messages. Given that part of the namespace needs to change for all ServiceContract, OperationContract, DataContract attributes, for example [DataContract(Namespace = "http://old.com.au/types/")] to [DataContract(Namespace = "http://new.com.au/types/")] How is it that I can still support clients which have the old service reference (without them needing to update, because maybe they wont have time to update immediately)

CORS error when using fetch with Content-Type [duplicate]

匆匆过客 提交于 2021-02-11 15:40:54
问题 This question already has answers here : How to add cross domain support to WCF service (4 answers) Closed 7 months ago . i'm trying to send a POST request to a REST web service from a different domain in FireFox. i'm using the JavaScript "fetch" function for this. i'm hosting the REST web service in IIS. it works fine before i add a "Content-Type" header in JavaScript. CORS errors in the FireFox console note that if i enable XHR in the console, then i can see that using fetch with the

How to add user/pass authentication in WCF

走远了吗. 提交于 2021-02-11 15:40:25
问题 I want to add some security to my WCF application service. I figured out how to add username/password authentication: <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="MyBehavior"> <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> <serviceCredentials> <userNameAuthentication userNamePasswordValidationMode="Custom" customUserNamePasswordValidatorType="Changer.Service.Validation.ServiceAuthenticator,

Use both Certificate and UserName for client authentication in WCF with basicHttpsBinding for passing reverse proxy authentication

随声附和 提交于 2021-02-11 14:58:11
问题 I'm trying to connect to a Web Service, which is located in rather non-standard environment. Before IIS server with a Web Service I have a reverse proxy server, which requires a client certificate to authenticate the connection. After that the Web Service itself requires additional UserName authentication. Moreover Web Service uses basicHttpsBinding with streamed transfer mode, as sending of quite large binary files is required (up to 1GB). The problem is that I can't get it working on the

WCF Sending object from MessageInspector to operation method

允我心安 提交于 2021-02-11 14:39:47
问题 I'm working with a very complicated and nested web service. The messages don't always deserialize properly at the operation and the vendor has suggested I use MessageInspectors to correctly get the data. This has been working correctly for some time but I'm starting to see issues because in the MessageInspector I'm setting a static XElement variable in the class as a work-around for not being able to pass the XElement object to the instance of the class that gets started for this call. I'm