CoreWCF / CoreWCF/CoreWCF

CoreWCF on IIS Hosting inside site folder not working

Open
#1,093 3 comments 3 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.8k
Forks
320
PR merge metrics
No merged PRs in 30d

Description

I have a CoreWCF Service with about 12 endpoints working perfectly locally using HTTPS.

I deployed to production using IIS in a site **app.mydomain.com** inside a subfolder **corewcfservice**. The application pool set to **No Managed Code**. When trying to access the _https://app.mydomain.com/corewcfservice/util.svc_ it never resolved. I get 404 errors.

In my _program.cs_ I declare the endpoints as follows:

```
serviceBuilder.AddService();
serviceBuilder.AddServiceEndpoint(customBinding, "/Util.svc");
```

Then what I did was to create a new site **svc.mydomain.com** and publish my files into the root folder. By doing this it worked fine when I hit _https://svc.mydomain.com/util.svc_

By some extrange reason or maybe I don't know the right way to publish in a subfolder, CoreWCF doesn't allow to publish inside a subfolder. I even tried to recompile the project and declare the endpoints like this:

```
serviceBuilder.AddService();
serviceBuilder.AddServiceEndpoint(customBinding, "/corewcfservice/Util.svc");
```

I deployed to IIS in the **corewcfservice** subfolder and still doesn't work.

Any clue on how to publish and have the endpoints listen and resolve inside a subfolder?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.