I have a simple Silverlight application that consists of a DataGrid and a web application, along with using a WCF Service to get the data. Everything works great when running it from the Visual Studio DevServer. Also when running from the deployed IIS application, meaning when I use "http://localhost/SomeApp.aspx" it renders the data perfectly.
But, if I try to use my IP Address instead of "localhost" it gives me the following error:
Microsoft JScript runtime error:
Unhandled Error in Silverlight Application An exception occurred during the operation, making the result invalid.Check InnerException for exception details.
at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary()
at SilverlightApps.PortalService.GetLOBsCompletedEventArgs.get_Result()
at SilverlightApps.MainPage.service_GetLOBsCompleted(Object sender, GetLOBsCompletedEventArgs e)
at SilverlightApps.PortalService.DentalPortalServiceClient.OnGetLOBsCompleted(Object state)
Here is my ServiceReferences.ClientConfig:
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_IPortalService" maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://myComputerName:8000/PortalServices.PortalService.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IPortalService"
contract="PortalService.IPortalService" name="BasicHttpBinding_IPortalService" />
</client>
</system.serviceModel>
And here is my web.config from the services application that is deployed on IIS:
<configuration>
<connectionStrings>
<add name="Portal" connectionString="PortalDev"/>
</connectionStrings>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<services>
<service name="PortalServices.PortalService">
<endpoint address="" binding="basicHttpBinding" contract="PortalServices.IPortalService">
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8473/PortalServices/PortalService/" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
And my environment is: Windows 7, IIS 7, and Visual Studio 2010.
If anyone could help me with understanding where I may be going wrong here I would greatly appreciate it. I'm curious if it's an authentications issue or what. But like I said before. It works fine when I call the IIS deployed app using "http://localhost/SomePage.aspx" but crashes when I use "http://192.168.1.22/SomePage.aspx". Thanks for the help.