Error 503 with WCF service
Asked Answered
C

1

8

I've got a self-hosted WCF service listening on port 80. When I attempt to connect to it, I get a 503 Service Unavailable.

My WCF process is running, IIS is running. My URL ACLs are correct. Control never reaches my WCF process.

WCF tracing shows nothing more than:

Listen at 'http://localhost/Foo/Bar/'.

Nothing is shown in Failed Request Tracing, which is turned on correctly -- other tracing appears. The 503 Service Unavailable message is resolutely plain, implying that it's coming from kernel mode, rather than user mode.

I've turned on HTTP.SYS tracing, which shows that the namespace is reserved correctly:

Attempted to add URL (http://localhost:80/Foo/Bar/) to URL
group (0xFD0000014000002E). Status: 0x0.

But later, in the same trace, I see:

Request (request ID 0xF600000580000006) rejected
due to reason: UrlGroupLookupFailed.

I've tried iisreset a couple of times, but it doesn't help. I've also rebooted the PC; same problem.

What is going wrong? What else can I do to further debug this problem?

Updates

If I rename the URL (changing "Foo" to "Fizz", for example), then it works. Looks like corrupted configuration somewhere.

I have other services hosted in the same process that are bound to https://localhost/Foo/Bar/, and they appear to be working correctly.

It's not just WCF

I've had the same problem with a self-hosted Nancy service, and one of the commenters, below, reports the same thing with a self-hosted ServiceStack service.

Chiang answered 3/2, 2012 at 11:38 Comment(5)
Can you post your WCF service config? Also are you able to browse to the service from IE after you have your service running. If possible your code on how you are self hosting the serviceBanish
I can't easily -- right now -- post much more. The WCF service config is unchanged since it last worked on this PC. Same with the code. It also works on other PCs. If I browse to it from IE, I get the same 503 Service Unavailable.Chiang
Can you try to delete your asp.net Temp files and then try at times these files dont get deleted and cause such issues.Banish
No they don't. This is nothing to do with ASP.NET. But I did it anyway. No change.Chiang
Hmmm. Left it over the weekend (no reboots); working fine this morning.Chiang
C
12

Had the problem again. Poked around with URL ACLs. There were a couple of URL ACLs that could be considered to be ambiguous.

I had http://+:80/Foo/, http://+:80/Foo/Bar/ and http://localhost:80/Foo/Bar/. I deleted all except the 'localhost' one, and it started working.

Whether it was because of the ambiguity, or because deleting the extras caused something to be reset, I don't know...

Chiang answered 12/4, 2012 at 14:54 Comment(2)
I had the same problem with a self-hosted ServiceStack service. I used netsh http show urlacl to list the URL reservations, and then used netsh http delete urlacl to delete the ambiguous URLs leaving only the localhost one.Longerich
And I've just had the same problem with a self-hosted Nancy service.Chiang

© 2022 - 2024 — McMap. All rights reserved.