Routing problem with Windows Communication Foundation (WCF) service


I have containerized a Windows Communication Foundation (WCF) service with Docker and Traefik using Windows Containers. I am also using a container with whoami for testing.

However, no matter what I try, I am unable to access the WCF service using a URL.

If I browse to http://localhost/whoami, it works.

If I browse to the WCF service using the IP address (e.g., it works.

I thought that browsing to http://localhost/LBWWSDomain/LBWWSDomain.svc would work but instead I get a 404 error.http://localhost/LBWWSDomain.svc does not work either.

NOTE: I am running docker in a Windows 10 virtual machine. However, I guess this has no influence on this matter.

I've tried everything I could think of to no avail. I don't understand what I may be doing wrong. Any help would be appreciated.

Thank you.

My docker-compose.yml file:

version: '3.8'



    # The latest official supported Traefik docker image.

    image: traefik:v2.6.1-windowsservercore-1809


      # Exposes port 80 for incomming web requests

      - "80:80"

      # The Web UI port <> (enabled by --api.insecure=true)

      - "8080:8080"


      # So that Traefik can listen to the Docker events.

      - .:C:/etc/traefik

      - type: npipe

        source: \\.\pipe\docker_engine

        target: \\.\pipe\docker_engine


     # A container that exposes an API to show its IP address.

     image: stefanscherer/whoami:windows-amd64-2.0.2


       - "traefik.enable=true"

       - "traefik.http.routers.whoami.rule=Path(`/whoami`) || Path(`/whoami/`)"

       - "traefik.http.routers.whoami.entrypoints=web"

     # My WCF service.


    image: lbwwsdomain:1.0.0-windows


      - "traefik.enable=true"

      - "traefik.http.routers.lbwwsdomain.rule=Path(`/lbwwsdomain`) || Path(`/lbwwsdomain/`)"

      - "traefik.http.routers.lbwwsdomain.entrypoints=web"

My traefik.yml file:


  dashboard: true

  insecure: true



    exposedByDefault: false

    swarmMode: false

    endpoint: npipe:////./pipe/docker_engine


  level: INFO



    address: ":80"

Hi @blasferatu

Path is strict, it will ONLY match /lbwwsdomain or /lbwwsdomain/

You're most likely going to wan to use a PathPrefix rule.

1 Like

Hi @cakiwi,

Thank you for your reply.

I had already tried what you suggest to no avail, i.e. using traefik.http.routers.lbwwsdomain.rule=PathPrefix(`/lbwwsdomain`).

After several days and starting to doubt my sanity, I think I have found the problem.

If I type e.g. http://localhost/lbwwsdomain.svc all in lower case, it works. If I type the URL with mixed case (e.g. http://localhost/LBWWSDomain.svc), it does not work, I get a 404 error. I thought Traefik would treat these URLs as being the same. I didn't find any information about this in the documentation.

Now I have my services working using PathPrefix and lower case URLs.

I found information about this here: Case sensitive domain names breaks routing · Issue #562 · traefik/traefik · GitHub

It seems it has been fixed: Fix case sensitive host by emilevauge · Pull Request #733 · traefik/traefik · GitHub

Am I missing something?

Thank you.


URLs in general are case-sensitive (with the exception of machine names). There may be URLs, or parts of URLs, where case doesn't matter, but identifying these may not be easy. Users should always consider that URLs are case-sensitive.

Will be buried in an RFC somewhere.

1 Like

Thank you for your help, @cakiwi. I was not aware of this.

I am used to working with Microsoft's Internet Information Services where the casing of any part of the URL is irrelevant.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.