CoreWCF on IIS Hosting inside site folder not working
- 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
Assessment
This issue has not been assessed yet.