What SPN do I need to set for a net.tcp service?
Asked Answered
S

2

6

I have a wcf application hosted in a windows service running a local windows account. Do I need to set an SPN for this account? If so, what's the protocol the SPN needs to be set under? I know how to do this for services over HTTP, but have never done it for net.tcp.

Swashbuckler answered 2/9, 2008 at 3:41 Comment(0)
V
3

By default (i.e. out of the box) net.tcp services are unsecured and don't perform any authentication at all. So you won't need (and in fact can't) set a service principal name.

If you need to authenticate, then check the net.tcp security modes on MSDN. The best way to understand the different combinations is to experiment!

Valenti answered 2/9, 2008 at 20:12 Comment(2)
Hey, chaps, why the downvotes? Pur-lease comment at the very least so we can all learn.Valenti
I have no idea - it helped me. Here's a +1 to cheer you up :)Utile
H
6

Change the service account to an AD account and register the SPN's as shown. Use your own service name e.g. fooservice

setspn -A fooservice/servermachinename domain\serviceAccountName
setspn -A fooservice/servermachinename.fullyqualifieddomainname domain\serviceAccountName

In the client config set:

<identity>
    <serviceprincipalname value="fooservice/servermachinename" />
</identity>
Hua answered 16/9, 2008 at 10:29 Comment(0)
V
3

By default (i.e. out of the box) net.tcp services are unsecured and don't perform any authentication at all. So you won't need (and in fact can't) set a service principal name.

If you need to authenticate, then check the net.tcp security modes on MSDN. The best way to understand the different combinations is to experiment!

Valenti answered 2/9, 2008 at 20:12 Comment(2)
Hey, chaps, why the downvotes? Pur-lease comment at the very least so we can all learn.Valenti
I have no idea - it helped me. Here's a +1 to cheer you up :)Utile

© 2022 - 2024 — McMap. All rights reserved.