WCF service as a replacement for ASPX service

I hope you can help me.

I was interested in creating an n-tier web application, the UI-WCF Service-Entity Framework Data Layer, so my datalayer does not have direct access from the web application.

I created my data layer, WCF service and web application in my projects contained in one solution, and I can add a link to the service (WCF service) in the web application.

It all works great, and I understand how it all works. However, I am confused about how I will deploy this in a production environment? Currently, the web application has a service link to the WCF service, which in a test environment automatically opens within its own domain / port (for example, localhost: 58307), and then my web application in its own domain / port when the solution starts. In the web application, web.config then contains a new section for <system.serviceModel>with:

<client>
    <endpoint address="http://localhost:58307/EstkService.svc" binding="wsHttpBinding"
            bindingConfiguration="WSHttpBinding_IEstk" contract="EstkService.IEstk"
            name="WSHttpBinding_IEstk">
    <identity>
         <dns value="localhost" />
    </identity>
    </endpoint>
</client>

How do I create a WCF service, but referring to it from the same domain as the web application? So, when I publish a project, I do not need to create a virtual directory that hosts the WCF service?

My reasoning is that I work in a shared hosting environment, so I cannot create the WCF service as a standalone application in IIS.

, !

0

All Articles