Click here to Skip to main content
15,913,854 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
If you are hosting a WCF service in a .Net Windows Service where are the webpages hosted if you want remote machines to access the WCF service? The web pages are used to load a Silverlight app (xap file). Remote access rules out using the visual studio development web server. Can you use IIS to still provide remote access without having IIS host the WCF service? If you can use IIS to host the webpages, how do you go about publishing the WCF service?
Posted
Updated 10-Jan-12 9:05am
v2
Comments
Sergey Alexandrovich Kryukov 10-Jan-12 14:29pm    
What Web page? Is your Windows Service a self-made HTTP server? What's the role of IIS?
--SA
dnstaylor 10-Jan-12 14:37pm    
SASorry I did not provide enough detail here. The web pages you are asking about are the ones used to load my Silverlight app (xap file). Yes, the Windows Service is a self-made HTTP server. I had not planned on using the IIS except the I have not found any way to gain access to the WCF service for the Silverlight app from a remote PC.

1 solution

You are certainly using a messed up architecture here. A Windows service and a wcf service are not and should not ever be run as one. If you have functionality that requires the solution to have a windows service, then run that portion of the solution as a windows service solution. Your Silverlight appliation should quite simply hosted from IIS. If there is data that is required by both, store that data in a shared database resource of some kind.
 
Share this answer
 
Comments
dnstaylor 10-Jan-12 15:39pm    
Marcus,

This is probably my fault for not explaining what I am doing very well. My understanding is that hosting a WCF service in a Windows Service is a standard hosting option. I have tested this solution with a Silverlight client app using a Visual Studio Development Website. Now I would like to access the test web pages (currently in the VS Development Website) from a remote PC web browser. Is that not a reasonable thing to do?
dst
fjdiewornncalwe 10-Jan-12 17:38pm    
You're still mixing disciplines. Yes, a WCF service can be hosted in a managed windows service http://msdn.microsoft.com/en-us/library/ms733069.aspx, but a WCF service is not a web site where web pages should be hosted. Web pages should be hosted in IIS.
dnstaylor 11-Jan-12 10:15am    
Marcus,
I understand your point. Thanks for your help.
fjdiewornncalwe 11-Jan-12 11:08am    
Always welcome. Cheers.

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