Click here to Skip to main content
15,891,904 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I created an asp.net web application and wcf service application. WCF service is serving data to the asp.net web application.
I have only one server IP, is it possible to host wcf service and asp.net web application on the same server with the same ip.
Please respond with some guidence.
Thanks in advance..
Posted

1 solution

Yes this is indeed possible.

Firstly is the wcf in a seperate application / project / solution?

If hosted inside the web app, this is very easy to accomplish as the site and service all get fed from the same place. If a separate application / service you will need to configure a separate website on your IIS box (assuming you are using HTTP based wcf).

Once you have set this up you can distinguish between the two sites using host headers. Host headers are used to recognize requests and re-direct them based on name to the same ip. IIS re-directs the request to the correct site based on the request header.

Host headers
http://technet.microsoft.com/en-us/library/cc753195(v=ws.10).aspx[^]

WCF IIS
http://www.youtube.com/watch?v=mX8quq7MoeI[^]
A Beginner's Tutorial on How to Host a WCF Service (IIS Hosting and Self Hosting)[^]
 
Share this answer
 
Comments
s#@!k 21-Jan-14 7:58am    
Thank you so much for your response..
under one solution i added wcf application project and i added asp.net project also.I added service reference to the asp.net application from the wcf project.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900