How to create or enable a WCF service on an existing asp.net website

I already have a website that is in real time and hosted on ORCS Web, developed using the project type of the asp.net form. now I plan to develop a wcf service that will be stored in a new folder of my existing website. we will use the wcf service to upload the file from the client machine to our web server. the client can be any other .net-based web applications or .net-based network applications. I never work with wcf in a production environment. so I want to know if I can create this wcf service, which will be stored in a new folder of my website, or I need to host this wcf service separately.

if i can save the wcf service on my existing website and then how to deploy it? if I copy the DLL file of my site and svc on our web server after development and testing, then this will be enough or not to create a proxy server from the client side. actually any how i need to create a wcf service on my site. I cannot deploy the wcf service separately from my website. so tell me how to deploy and which files I need to copy to my web server, because for the first time I'm going to do it. thanks

+6
source share
1 answer

You can add the wcf service to your existing asp.net application. Open the solution editor with the right mouse button on the asp.net application project and select Add → New Item, and then select WCF Service.

VS will change your web.config by adding something similar to this, wcf server configuration:

<system.serviceModel> <behaviors> <serviceBehaviors> <behavior name=""> <serviceMetadata httpGetEnabled="true" /> <serviceDebug includeExceptionDetailInFaults="false" /> </behavior> </serviceBehaviors> </behaviors> <serviceHostingEnvironment multipleSiteBindingsEnabled="true" /> </system.serviceModel> 

And now for the deployment of the solution. Partial deployment is never recommended. Please read one of my posts on this subject. Which files to upload when changing a web page?

+5
source

All Articles