I have a Silverlight 4.0 (ASP.Net 4.0) application on our website for our customers once they authenticate. The program loads fine but can’t talk to the WCF service created. Internally everything works great.
The Silverlight application is hosted on IIS 7.5 with an internal IP of 10.1.1.8 with teh firewall redirecting the real world application to the internal ip address. This part works fine. The WCF service is on IP 10.1.1.10 and is the same virtual machine just with different IP addresses. The database server can be pinged without a problem as well.
http://www.ntbuddy.com/images/stackoverflow/SilverlightWcf1.png
- The internal user (10.1.15.1) can use the site just fine
- The external user can access the site without any problems except when they try the Silverlight application
- When the program is accessed it calls the Wcf program at 10.1.1.10. Being the internal user can see the Wcf they work fine. The external users can’t.
- If I call the same routine from a ASP.Net webpage the webpage would return the result without a problem.
The Service Reference in the Service References is “http://10.1.1.10/ServiceReference/Common.svc” for the routine below.
Below is the simplest of routines where I request from the Wcf a number back for an auto-number routine.
Works only for internal users (Silverlight)
private void BtnAutoNumberClick(object sender, RoutedEventArgs e)
{
AutoNumber("AUTO");
}
private void AutoNumber(string autoNumber)
{
var objResult = new CommonClient();
objResult.GetAutoNumberCompleted += new EventHandler<GetAutoNumberCompletedEventArgs>(LoadResultsAutoNumber);
objResult.GetAutoNumberAsync(autoNumber, 4, autoNumber);
}
void LoadResultsAutoNumber(object sender, GetAutoNumberCompletedEventArgs e)
{
txtOrderNumber.Text = string.Format("{0}", e.Result.AutoNumber);
}
What do I need to change in my Silverlight application to make it work for the external user as well as the internal user? I want to avoid making the Wcf service being exposed but will if that’s what is required.
ip addresses that start with 10 are internal addresses, you will not be able to access this address from outside the firewall.
http://en.wikipedia.org/wiki/IP_address
If you look at the table marked “IANA-reserved private IPv4 network ranges”
You need to expose your service using an external ip address.