wcf-security

WCF and Kerberos Authentication

江枫思渺然 提交于 2019-11-28 12:09:52
I have followed numerous msdn articles and the codeplex guidance but cannot get WCF to work with Kerberos authentication and delegation and would appreciate a little help. Setup I have the WCF service in an IIS website on a remote machine IIS 6.0 on Windows 2003 R2 - SP 2 The SPN for the machine has been added (http/myserver && http/myserver:8080) An AD account has been created for the IIS app pool The AD account has the setting, allow delegation (for Kerberos), set to true I am using Brian Booth's debug site on 8080 and the site passes all requirements for Kerberos delegation. The debug IIS

Identifying WCF Client ID

半世苍凉 提交于 2019-11-28 10:16:04
I have a WCF web service that exposes several business methods. I also have two clients - an asp.net GUI and a data migration application that both connect to the wcf backend to invoke various business transactions. I need my backend to be able to identify and distinguish between which wcf client has made a call to some variant logic. Is there a way that my WCF service is able to identify clients connected to it? Also is there a way to use a signed key to prevent a client from spoofing their identity? You can solve this via a custom header. You can add a custom header as part of the endpoint

How to create self-signed certificate programmatically for WCF service?

旧城冷巷雨未停 提交于 2019-11-28 09:56:22
I have a self-hosted WCF server running as a Windows service under the Local System account. I am trying to create a self-signed certificate programmatically in c# for use with a net.tcp endpoint using Message level security. I am using the following code which is very closely based on the accepted answer in How to create a self-signed certificate using C#? with some small changes trying to solve my problem. public static X509Certificate2 CreateSelfSignedCertificate(string subjectName, TimeSpan expirationLength) { // create DN for subject and issuer var dn = new CX500DistinguishedName(); dn

Can not call web service with basic authentication using WCF

≯℡__Kan透↙ 提交于 2019-11-28 07:36:48
I've been given a web service written in Java that I'm not able to make any changes to. It requires the user authenticate with basic authentication to access any of the methods. The suggested way to interact with this service in .NET is by using Visual Studio 2005 with WSE 3.0 installed. This is an issue, since the project is already using Visual Studio 2008 (targeting .NET 2.0). I could do it in VS2005, however I do not want to tie the project to VS2005 or do it by creating an assembly in VS2005 and including that in the VS2008 solution (which basically ties the project to 2005 anyway for any

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

ε祈祈猫儿з 提交于 2019-11-28 06:16: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

passing complex object to rest wcf

耗尽温柔 提交于 2019-11-28 06:05:00
问题 Passing custom object to REST WCF operation is giving me "bad request error". I have tried here with both uri path and query string type methods.Any help is greatly appreciated. service side code [ServiceContract] public interface IRestService { [OperationContract] [WebInvoke(UriTemplate = "getbook?tc={tc}",Method="POST",BodyStyle=WebMessageBodyStyle.Wrapped,RequestFormat=WebMessageFormat.Json)] string GetBook(myclass mc); } [DataContract] [KnownType(typeof(myclass))] public class myclass {

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

你离开我真会死。 提交于 2019-11-28 00:03:50
问题 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. 回答1: You're looking for the Environment.UserName property. You may also be looking for the Environment.UserDomainName property. 回答2: Try System.Security

What are the differences between security mode=“Transport” and security mode=“TransportCredentialOnly”

强颜欢笑 提交于 2019-11-27 17:08:57
问题 What are the differences between security mode="Transport" and security mode="TransportCredentialOnly" when I use it with BasicHttpBinding and setup ssl in ISS 7.0? 回答1: Check here: http://developers.de/blogs/damir_dobric/archive/2006/07/31/890.aspx and http://msdn.microsoft.com/en-us/library/ff648505.aspx Transport seems to require HTTPS to encrypt credentials and throws an exception if there is no SSL. TransportCredentialOnly will send the credentials in plain text and unencrypted and is

How to get the X509Certificate from a client request

会有一股神秘感。 提交于 2019-11-27 14:41:44
I have a web-service which I secured using certificates. Now, I want to identify the client by looking at the certificate thumbprint. This means that I have a list of thumbprints on my service somewhere that are linked to some user. Actually, my first question (a little off-topic) is: is this a good approach or should I still introduce some username password construction? Second question is: how can I get the certificate that the client used to connect to the web-service so I can read the thumbprint at the service side. I did read a lot about it (like this post: How do I get the

how to enable WCF Session with wsHttpBidning with Transport only Security

…衆ロ難τιáo~ 提交于 2019-11-27 14:12:46
I have a WCF Service currently deployed with basicHttpBindings and SSL enabled. But now i need to enable wcf sessions(not asp sessions) so i moved service to wsHttpBidnings but sessions are not enabled I have set [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession)] But when i set SessionMode=SessionMode.Required on service contract it says Contract requires Session, but Binding 'WSHttpBinding' doesn't support it or isn't configured properly to support it. following is the definition of WSHttpBinding <wsHttpBinding> <binding name="wsHttpBinding"> <readerQuotas