wcf-security

Equivalent custom WCF binding for basicHttpBinding with TransportWithMessageCredential security mode

一世执手 提交于 2019-11-30 15:37:17
问题 I need to integrate my server with non-WCF client and suggested to change SOAP version in the headers. This can be done with <textMessageEncoding messageVersion="Soap11" /> element on a custom binding so i need to convert my current basicHttpBinding . How can i do that? <basicHttpBinding> <binding> <security mode="TransportWithMessageCredential"> <transport clientCredentialType="Windows"/> <message clientCredentialType="UserName" /> </security> </binding> </basicHttpBinding> 回答1: The custom

Equivalent custom WCF binding for basicHttpBinding with TransportWithMessageCredential security mode

旧时模样 提交于 2019-11-30 14:25:07
I need to integrate my server with non-WCF client and suggested to change SOAP version in the headers. This can be done with <textMessageEncoding messageVersion="Soap11" /> element on a custom binding so i need to convert my current basicHttpBinding . How can i do that? <basicHttpBinding> <binding> <security mode="TransportWithMessageCredential"> <transport clientCredentialType="Windows"/> <message clientCredentialType="UserName" /> </security> </binding> </basicHttpBinding> The custom binding definition is: <customBinding> <binding name="basicHttpEquivalent"> <security authenticationMode=

'MANAGE PRIVATE KEYS' option missing

扶醉桌前 提交于 2019-11-30 11:05:11
I'm developing WCF service with Transport Security hosted on IIS 7.5 under Windows 2008R2. I have a certificate, generated in IIS 7.5 which is stored in Local folder. When I use BasicHttpBinding or WSHttpBinding with Transport Security - everything works fine. But when I change it to NetTcp I get an exception : CryptographicException 'Keyset does not exist'. After a bit of googling I found out that the problem can be because my NETSERVICE IIS account doesn't have premission to the private key of my certificate. The solution could be to set the rights to accesss in MMC by right-clicking on my

Is it possible to determine a WCF binding configuration from the SOAP envelope?

杀马特。学长 韩版系。学妹 提交于 2019-11-29 15:25:40
I've generated a WCF client service proxy from a WSDL file, which calls a third-party java web service. Now I need to configure the binding and proxy to call a web method. However, I only have the below SOAP information, a username and password, and a client certificate. How can I work out what I need to do? Are there any "reverse this to configuration" apps, or websites that teach the skills required? I think I am after, "this part of the message, translates to this configuration". Can anyone help? For the same project, I asked this question , so if anyone knows what to ask the third party

How can I convert a private key file from Java into .net x509Certificate2

旧城冷巷雨未停 提交于 2019-11-29 12:27:52
I am writing a .NET client app that consumes a Java web service and need to sign sent requests (related to this other question ). I have been supplied with a private.key file (and a .X509 certificate) and a Java source example. The certificate looks like the public key of service, and the private.key is what I use to sign requests. In the Java source, I can see they convert the file to a byte array and pass it into the constructor of the PKCS8EncodedKeySpec class. A bit of googling suggests this file is a private key hash (though I may be wrong). Is there any way to use this in .Net or convert

How to enable HTTPS in WCF service

蓝咒 提交于 2019-11-29 11:58:57
I have hosted my service on IIS. Hosted service has applied SSL certificate and on browse of URL, it appears with HTTPS. But, when i do consume this URL into client application (ASP.NET WEB Application) then, it allows to add https//domain/service.svc but, on client configuration, it appears the URL as http and not https . when do manual change then, it gives error as follow: The provided URI scheme 'https' is invalid; expected 'http'. Below is the WCF service configuration (hosted on IIS): <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="customBehavior"> <serviceMetadata

How do I get the logged in user's window's credentials in a WPF application

坚强是说给别人听的谎言 提交于 2019-11-29 06:46:33
I have a little application I build that monitors tickets submitted. It basically just sits there in the corner and notifies when new tickets arrive. I need to get the persons username who is logged into the computer to pull their tickets. I tried searching, but I think I'm using the wrong terminology as I couldn't really find anything. You're looking for the Environment.UserName property . You may also be looking for the Environment.UserDomainName property . Try System.Security.Principal.WindowsIdentity.GetCurrent().Name 来源: https://stackoverflow.com/questions/2885637/how-do-i-get-the-logged

WCF how to pass token for authentication?

本秂侑毒 提交于 2019-11-28 22:55:40
问题 I have a WCF service which would like to support basicHttpBinding and webHttpBinding. When the client successfully login, server will generate a token for client to pass to server on all the request make later. Question is how the client can pass the token to server? I don't want to add an extra parameter on every web method to hold the token. 回答1: Typically, the best way to do something like this is passing such "meta-information" in a WCF header. You can easily create a message inspector to

Using Fiddler to sniff Visual Studio 2013 requests (proxy firewall)

夙愿已清 提交于 2019-11-28 15:47:44
I am having issues with Visual Studio 2013 and our corporate proxy (signin does not work, updates do not work, visual studio gallery does not work, nuget and git fail ). All of these are doing http or https requests. (e.g. http://visualstudiogallery.msdn.microsoft.com/ ). In VS2013 I just get spinning progress bars or messages about no network connection. No problem with the browser, (chrome, IE, firefox) since they all understand proxies (407 rejections and then responding with credentials). So I want to figure out why VS2013 does not work. But I cannot see any traffic when I tell fiddler2 to

Can I setup an IP filter for a WCF Service?

别等时光非礼了梦想. 提交于 2019-11-28 12:35:43
I'm modifying my WCF API to include a new service that should be exposed to internal IP addresses only. All of the services in my API are available in SOAP, POX and JSON. What I'm looking for is a behavior or something that allows me to implement a simple IP address filter, to process requests from internal IP's and deny everything else. I'd like it to work in configuration, because all the other services in the API should remain available to the Internet. I did some googling but can't find anything like this built into WCF. Am I missing something? Ok, I figured it out, and its kind of slick,