I pretty much have to write one more page, and an RSS feed, for BluRayFriend to be ready to be tossed out into the world. I hate writing pages, so I’ve been procrastinating forever.
The latest procrastination has been to properly implement the wcf services. All of the services and contracts are written. But, I was using the service as local references via a stupid static factory. I created a windows service to host the Wcf services as named pipe services, and created proxies to the services. Now, everything uses the proxies. The windows service can be run as a console app for convenience. That’s how I’m running it for now.
This worked just fine in development mode. But, as soon as I switched to IIS, I fully expected it to fail with an ACCESS DENIED error, assuming that the identity of the web site app pool wouldn’t have access to it. Instead, I got an unexpected error:
“The pipe endpoint ‘net.pipe://localhost/blurayfriend/product’ could not be found on your local machine.”
Could not be found?! Why not? It’s there. I corrected the identity incase that was it, but it wasn’t.
I banged my head against the desk a few times, then tried running the services as an administrator. That worked, but it was only a troubleshooting step. I can’t run like that permanently.
This is all new information for me. It has a link that I will read to try to educate myself on it. In short, IIS is running as Session 0, and the console host is Session 1. Session 0 can’t see pipes created in Session 1. Interesting. According to the article, if I ran it as a windows service rather than a console app, then I won’t have the problem.
I’m going to roll back the identity so that I get the access denied error, then correct it as subtly as possible… anything to avoid writing that page!