BrianLeBlanc
BrianLeBlanc

Reputation: 13

Best Practice for Adding WCF Web Service to Existing Web site

I have searched quite a bit for coverage of this topic and can’t find very much on it.

If I have a website (intranet to my company) MySite.company.com/ And I want to implement a web service associated with that website {GetProductDetails.svc}

Can I make the URL (endpoint) for accessing the services something like: MySite.company.com/Services/GetProductDetails.svc I want to keep the base address the same and not have to direct users of the service to some other address.

I have been told it would need to be something like this (basically a separate web site): MySite.company.com:1858/GetProductDetails.svc

Or should I create a separate site like this: MySiteServices.company.com/GetProductDetails.svc

Upvotes: 0

Views: 219

Answers (1)

Christian Phillips
Christian Phillips

Reputation: 18759

If your service is within a service folder in your existing website, then the url MySite.company.com/Services/GetProductDetails.svc will work. Depending on the .NET version you're using, you will need to specify the service bindings in the web.config of the current website.

If you are only exposing Product Details, and this is over HTTP to other applications, you could also use a Web API, Learn Web API.

Upvotes: 2

Related Questions