Skip to main content
Home Forums General Silverlight Hosting and Streaming Application unable to find a web service when hosted remotely on IIS7
6 replies. Latest Post by davidezordan on June 10, 2009.
(0)
Neil5544
Member
0 points
4 Posts
06-06-2009 4:04 PM |
Hi I am unable to move my Silverlight application from my development environment to the web site host. I am switching the <endpoint address> before uploading the app. I have followed very closely the steps laid out at http://msdn.microsoft.com/en-us/library/cc197964(VS.95).aspx but with no luck. The application works correctly locally but when moved to my web site host there is an error. Here is a picture of the VS8 solution environment: http://www.labelease.com/SilverLightQuestion/DevEnv.png The error: The Silverlight application renders but the service, Service1, cannot be found. The result code returned and viewed in Fiddler is 500. The service when it works returns an int of value 2. Development environment: VStudio 2008 SP1 Silverlight 2.0 host: DiscountASP.net IIS 7 Fiddler Note: These MIME extensions have been added to IIS 7 at DiscountAsp.net .xap application/x-silverlight-app .xaml application/xaml+xml .xbap application/x-ms-xbap // This is the Service. using System.ServiceModel;
Hi
I am unable to move my Silverlight application from my development environment to the web site host. I am switching the <endpoint address> before uploading the app. I have followed very closely the steps laid out at http://msdn.microsoft.com/en-us/library/cc197964(VS.95).aspx but with no luck.
The application works correctly locally but when moved to my web site host there is an error.
Here is a picture of the VS8 solution environment: http://www.labelease.com/SilverLightQuestion/DevEnv.png
The error:
The Silverlight application renders but the service, Service1, cannot be found. The result code returned and viewed in Fiddler is 500. The service when it works returns an int of value 2.
Development environment:
VStudio 2008 SP1
Silverlight 2.0
host: DiscountASP.net IIS 7
Fiddler
Note: These MIME extensions have been added to IIS 7 at DiscountAsp.net
.xap application/x-silverlight-app
.xaml application/xaml+xml
.xbap application/x-ms-xbap
// This is the Service.
using
{
[
}
// This is the client.
InitializeComponent();
proxy.GetThisCompleted +=
(proxy_GetThisCompleted);
proxy.GetThisAsync();
// This is the ServiceRerences.ClientConfig configured for DiscountAsp.net hosting
<
</
<!-- This is used for remote operation:
// Here is Page.xaml
If anybody can point what I'm missing it is greatly appreciated.
Thanks ... Neil
davidezo...
Contributor
5690 points
875 Posts
06-08-2009 7:54 AM |
Hi,
DiscountAsp.net is a shared hosting environment, you have to use a ServiceHostFactory. Read these threads/articles for more details:
http://silverlight.net/forums/p/65972/161839.aspx#161839
http://forum.discountasp.net/showthread.php?t=7719
06-09-2009 12:33 PM |
Still no luck.
<%
And added this class, a HostFactory.
Absolutely no luck/change.
I'm stuck!
Neil
06-09-2009 4:41 PM |
Try to follow the steps described here: http://msdn.microsoft.com/en-us/library/cc197938(VS.95).aspx
06-10-2009 10:21 AM |
Tried that a week ago. Fails on step 1. Can't find the service or service is not running.
Thanks... Neil
06-10-2009 11:30 AM |
Well, I finally figured it out. Thanks Davide for the direction toward the ServiceHostFactory. MSDN link is here: http://msdn.microsoft.com/en-us/library/aa702697.aspx
The error I encountered implementing the ServiceHostFactory is detailed below:
This is the correct line of code that appears in Service.sc
I had entered this which was incorrect:
A very good example of deploying an app to DiscountASP.net can be found at:
http://www.codeproject.com/KB/silverlight/SilverlightWcfDatabase.aspx
06-10-2009 1:37 PM |
Hi Neil5544,
thanks for the link, I'll add it to my favorites!