CodeCopy

October 13, 2009

WCF selfhosting helper

Filed under: c#,wpf — sterndorff @ 16:28
Tags: ,

A simple wrapper for hosting wcf services that works with both service references and web references.

WcfServiceHelper.Instance.StartService<MyService, IMyService>(new ServerConf());

More can be done in terms of configuration and a StopService method is missing. That is left for the reader (or untill I need it in my app).

(more…)

Selfhosting WCF on win2008

Filed under: c#,wcf — sterndorff @ 13:41
Tags: ,

If you host a WCF service as a non-administrator user on Windows 2008 (and Vista) you may get this error even if you are member of the admin groups:

HTTP could not register URL http://+:8000/. Your process does not have access rights to this namespace (see http://go.microsoft.com/fwlink/?LinkId=70353 for details)

Solution: Log in as administrator and fire:

netsh http add urlacl url=http://+:8000/ user=DOMAIN\UserName

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.