Hi @Golomazdina Natalya ,
I think you can create a try block that will catch any exceptions thrown while the service is running.
Make sure baseaddr is correct.
For metadata about using the code publishing service, you can refer to the tutorial.
https://learn.microsoft.com/en-us/dotnet/framework/wcf/feature-details/how-to-publish-metadata-for-a-service-using-code
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.