wcf

Cross Process (and machine) Synchronization (Semaphores)

南笙酒味 提交于 2020-07-09 06:07:28
问题 Background: My WCF application has to call a service that does not have any concurrency checking in it. It is a service created by a third party and getting them to add concurrency checking may not be possible. I can ensure that the only way to call the third party service is via my WCF application. So I am considering putting concurrency checking in my code. To do this, I will use an identifier that uniquely describes the data being modified. The idea is that if one call to the service is

Should DTO and Entity both have input validations

穿精又带淫゛_ 提交于 2020-07-04 08:48:26
问题 I have a WCF layer and my Domain Model is behind this WCF layer. I am using Nhibernate as an ORM tool and all my business logic/ Data Access etc will be behind this WCF layer. I am exposing DTO to my clients. I have below questions 1) Should i create DTOs? is there any harm in exposing entities directly to wcf clients as my entities would also have business logic methods also in doing so i would have to corrupt my entitiy object with WCF attributes which i think is not good? 2) If i expose

Should DTO and Entity both have input validations

徘徊边缘 提交于 2020-07-04 08:46:47
问题 I have a WCF layer and my Domain Model is behind this WCF layer. I am using Nhibernate as an ORM tool and all my business logic/ Data Access etc will be behind this WCF layer. I am exposing DTO to my clients. I have below questions 1) Should i create DTOs? is there any harm in exposing entities directly to wcf clients as my entities would also have business logic methods also in doing so i would have to corrupt my entitiy object with WCF attributes which i think is not good? 2) If i expose

getting System.NullReferenceException: 'Object reference not set to an instance of an object.' when calling a service

a 夏天 提交于 2020-06-29 04:59:04
问题 I am using .net core and consumed a WCF service. When I pass Api key in header and call a service , it throws NullReferenceException error. Below is the function I am using to call a service public async void CallService(string reqdata, string partner) { BasicHttpBinding basicHttpBinding = null; EndpointAddress endpointAddress = null; ChannelFactory<IRequestChannel> factory = null; QuoteEngineService.MarketingSoftwareClient service = new QuoteEngineService.MarketingSoftwareClient(); try {

WCF Message Formatter not formatting Fault Message

佐手、 提交于 2020-06-29 03:40:17
问题 I have a WCF Service where I am changing the prefix of a positive response, however on a fault response only part of the message is being changed. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <s:Fault xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <faultcode>s:Client</faultcode> <faultstring xml:lang="en-GB">Unable to satisfy web service

How to add net.tcp protocol support for IIS Express used by Visual Studio?

人走茶凉 提交于 2020-06-27 07:29:58
问题 I'm using the default configuration of Visual Studio to host my wcf service in a development scenario. I want to add a net.tcp endpoint, but I always get an error. 回答1: According to this FAQ, this functionality is not available in IIS Express: Here's the extract of the relevant question from the FAQ: Q: Does IIS Express support non-HTTP protocols such as net.tcp or MSMQ? A: No. IIS Express only supports HTTP and HTTPS as its protocol. For TCP bindings, you might have to create your own

Isolated Named Pipes in Terminal Server Sessions

天大地大妈咪最大 提交于 2020-06-27 07:18:24
问题 If my application starts, I check first if there is already an instance of the app and if yes, I give focus to the running instance and terminate the newly created process. I make this with a named pipe that is registered through WCF. That works fine so far. Now my app will also be used in a terminal server environment. Is it right that named pipes are system wide, so that I must change the startup logic to not give focus to instances of other users (what certainly not will work but break my

Wix installer: Verify that you have sufficient privileges to start system services

别来无恙 提交于 2020-06-25 10:25:22
问题 I'm using Wix installer. When I run installer I get this error: I'm logged as administrator. I also tried create anotherone user. So I tried: 1| I add my user "Administrator" to place "Log on as a service" 2| I checked my Net.Tcp Port Sharing Service if is running 3| I get my SID 4| I added to SMSvcHost.exe.config section with my SID. Check "My administrator sid" <system.serviceModel.activation> <net.tcp listenBacklog="10" maxPendingConnections="100" maxPendingAccepts="2" receiveTimeout="00

Wix installer: Verify that you have sufficient privileges to start system services

前提是你 提交于 2020-06-25 10:24:39
问题 I'm using Wix installer. When I run installer I get this error: I'm logged as administrator. I also tried create anotherone user. So I tried: 1| I add my user "Administrator" to place "Log on as a service" 2| I checked my Net.Tcp Port Sharing Service if is running 3| I get my SID 4| I added to SMSvcHost.exe.config section with my SID. Check "My administrator sid" <system.serviceModel.activation> <net.tcp listenBacklog="10" maxPendingConnections="100" maxPendingAccepts="2" receiveTimeout="00

How to configure WCF client for WS-Security (UsernameToken + Encrypted body SOAP (no signature))

百般思念 提交于 2020-06-17 02:18:09
问题 I need to configure my WCF client for consuming a JAX service with WS-Security UsernameToken + Timestamp + Encryption BODY Soap message with certificate. For the request I need a SOAP message as below: <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"> <xenc:EncryptedKey Id="EK-8653216552B106D28F13688042014758" xmlns:xenc=