I have created my first self-hosted WCF service. I hosted it in a C# console app but it throws an error:
System.ServiceModel.AddressAccessDeniedException
If you ran into this error while starting the service on Windows Service, you can check the account on your process installer.
[RunInstaller(true)]
public class ProjectInstaller : Installer
{
private ServiceProcessInstaller process;
private ServiceInstaller service;
public ProjectInstaller()
{
process = new ServiceProcessInstaller();
process.Account = ServiceAccount.LocalSystem;
service = new ServiceInstaller();
service.ServiceName = "WCFWindowsServiceSample";
Installers.Add(process);
Installers.Add(service);
}
}