Accessing a named pipe endpoint in a windows service from IE using a COM enabled .NET client dll
I have a WCF service hosted in a windows service. This WCF service is only going to be used on the local machine so I have chosen named pipes for endpoint. However when I try to connect to WCF service from the client instantiated by JavaScript in IE, endpoint is not found.
However if I stop the windows service and run the executable (it can detect whether environment is开发者_如何学C user interactive or not) then client can connect from IE as well.
BTW, I have tried setting security to None in binding configurations.
So far:
IE is running JavaScript in a lower integrity level than named pipe is created, which is normal since service has system integrity level. Question now is lowering the integrity level of created named pipe.
Answer:
I will leave this question to remind myself how stupid I am. Answer is hidden inside the question. As the executable detects that environment is user interactive, it runs all registered services in the executable. When you start a service manually, well, you start a service.
When I a similar problem I fixed it by doing as Christian details in Dealing with OS privilege 'issues' in WCF Named Pipes scenarios
精彩评论