wcf-security

How to make X.509 certificate?

无人久伴 提交于 2019-12-04 16:47:50
I am trying to make a X.509 certificate. I am using makecert.exe to make this. I use this command to make my X.509 certificate makecert.exe -sr LocalMachine -ss My -a sha1 -n CN=MyServerCert -sky exchange –pe But i don`t know there X.509 certificate is storeing. I need to use this X.509 certificate in my c# code. The code is : host.Credentials.ServiceCertificate.Certificate = new X509Certificate2("MyServerCert.p12", "password"); But i don`t know what is password and it throw this exception "The system cannot find the file specified." I always use the SelfCert tool from PluralSight. You can

WCF - There was no endpoint listening at net.tcp://…/Querier.svc that could accept the message

筅森魡賤 提交于 2019-12-04 06:21:45
WCF - There was no endpoint listening at net.tcp://myserver:9000/SearchQueryService/Querier.svc that could accept the message. I have the net.tcp protocol enabled on the IIS application Windows firewall is off The net.tcp binding is set to port 9000 for the entire IIS application. My web.config is very standard: <system.serviceModel> <diagnostics> <messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="false" logMessagesAtTransportLevel="true" /> </diagnostics> <services> <service behaviorConfiguration="SearchQueryServiceBehavior" name="Search.Querier.WCF.Querier"> <endpoint

WCF No connection could be made because the target machine actively refused

岁酱吖の 提交于 2019-12-04 05:31:40
I just implemented a simple WCF server using net.tcp . First, I use 127.0.0.1 as server address and client able to connect the WCF service. Everything is Ok. But when I try to use the internal IP 192.x.x.x I get an error: No connection could be made because the target machine actively refused it Any idea what may cause this? Best Wishes PS: I disabled auth on WCF. Even turn off firewall all...Not worked... Do you use 192.x.x.x on both client and server? I remember seeing an issue a while back in which for TCP the client and server names needed to match (something related to one of the message

Need help with manipulating SOAP header in my WCF client before sending request

徘徊边缘 提交于 2019-12-04 04:29:17
问题 I have a unique requirement where I need to send a highly customized soap header in a request to a external vendor. The only way my WCF client can interact with their web service is using a combination of Username token and message signing the entire envelope(see vendor provided soap header below). <soapenv:Envelope xmlns:bsvc="urn:com.workday/bsvc" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01

load balancing WCF with wsHttpBinding and Message Security with client credentials type windows

空扰寡人 提交于 2019-12-04 04:10:37
We have got a normal WCF service which has a binding that looks like this: <wsHttpBinding> <binding name="ServiceBinding" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxReceivedMessageSize="20971520" messageEncoding="Mtom" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false"> <security mode="Message"> <message clientCredentialType="Windows" negotiateServiceCredential="true" establishSecurityContext="false" /> </security> </binding> </wsHttpBinding> this service sits in 2 servers

How to inject an object into a WCF validator class

旧城冷巷雨未停 提交于 2019-12-04 02:53:04
Following up on using dependency injection for WCF services , is there any way of using DI for WCF validators , so that one could do this: public class DIValidator : UserNamePasswordValidator { private readonly IService service; [Inject] public DIValidator(IService service) { this.service = service; } public override void Validate(string userName, string password) { service.Login(userName, password); } } EDIT - I tried to apply Dzmitry's advice to my custom behaviour extension, since my validator is defined in app.config. Sadly I get a MethodMissingException, since wcf wants my validator to

Open Source Alternatives to WCF [closed]

送分小仙女□ 提交于 2019-12-04 01:46:39
Could you tell me the open source alternatives to WCF?? I'm a newbie and just started using WCF. I wanted to know about the alternatives that are open source too. Also, what makes them better options/not so good compared to WCF. Thanks, Thothathri There are open source projects for REST services - for example Open Rasta Perhaps you will also find some open source projects for basic SOAP services but I doubt that there is an open source project implementing all WS-* related stuff implemented in WCF. WS-* protocols are mostly implemented only in API from big companies - MS, IBM, Oracle, SAP, etc

netTCP binding Soap Security Negotiation Failed

北城以北 提交于 2019-12-04 00:36:34
I am writing a WCF service requires impersonate and session. It is ok when I tried to call it on my local machine, but on the remote machine it always failed with such error: Security Support Provider Interface (SSPI) authentication failed. The server may not be running in an account with identity 'host/hostname'. If the server is running in a service account (Network Service for example), specify the account's ServicePrincipalName as the identity in the EndpointAddress for the server. If the server is running in a user account, specify the account's UserPrincipalName as the identity in the

WCF authentication on IIS7 shared hosting

删除回忆录丶 提交于 2019-12-03 21:04:53
After several days of tests I find the only way I can create a WCF web service with authentication is to put a certificate in localmachine/trustedpeople cert store. The host will not do this for me. Do you know any way to enable WCF authentication without putting a cert in that store? Is there any other way to get WCF security working on shared hosting? I have worked with a sample on codeproject that puts certs in app_data, but I haven't been able to get that to work. I did some very simple test on my local IIS. I have very simple service with single method. To expose the service I use this

What's the difference between retrieving WindowsPrincipal from WindowsIdentity and Thread.CurrentPrincipal?

别等时光非礼了梦想. 提交于 2019-12-03 15:52:29
问题 I am trying to work out why attribute based security isn't working as I'd expect in WCF and I suspect it might have something to do with the following: AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal); var identity = new WindowsIdentity("ksarfo"); var principal = new WindowsPrincipal(identity); Console.WriteLine("\nChecking whether current user [" + identity.Name + "] is member of [" + groupName + "]"); Console.WriteLine(principal.IsInRole(groupName)); // returns