locked
Issue after publishing RRS feed

  • Question

  • When I test my silverlight application on the pc that hosts the website I have no issues whatsoever, however when I try to access it from another machine within the same network I get a simple error:

    An exception occurred during the operation, making the result invalid. Check InnerExcpetion for exception details.

    There is nothing else to the message and it appears to be when I try and access information from a service.  The service is set to look at http://localhost:8081, is this the issue?

    Tuesday, September 28, 2010 11:43 AM

Answers

All replies

  • Appears to happen on this line:

    void UserLoaded(object sender, GetLoginCustomSettingsCompletedEventArgs e)
            {
                MessageBox.Show("Goes wrong on next line");
                Dictionary<string, string> dic = e.Result;
    }


    The code above is getting information from WCF service where an OperationContract returns Dictionary<string,string>

    Tuesday, September 28, 2010 11:53 AM
  • My service is at http://localhost:8081 and works on the machine it's hosted on, is it because of this address why it doesn't work i..e from an external machine the address of the service wouldn't be localhost??

    Wednesday, September 29, 2010 3:06 PM
  • Hi good day. Try changing the 'localhost' value in the web.config file, to match with your web service host machine. Hope that helps.

    Wednesday, September 29, 2010 3:11 PM
  • the setting does not appear to be in my web.config file only visible within the 'Configure Service Reference' screen in silverlight app in VS 2010.

    Wednesday, September 29, 2010 3:44 PM
  • Someone please Help!!!

    Wednesday, September 29, 2010 4:02 PM
  • There is nothing else to the message and it appears to be when I try and access information from a service.  The service is set to look at http://localhost:8081, is this the issue?

    Yes, that would be an issue.

    What URL did you use to access your Page from another machine? You can't be using http://localhost:8081/YourPage, you are goint to use http://MachineName:8081/YourPage, right?

    Make sure to change the Service URL to a relative URL in your ClientConfig file such as "./YourService.svc".



    Wednesday, September 29, 2010 4:04 PM
  • So if I change my ServiceReference.ClientConfig to:

    <configuration>
        <system.serviceModel>
            <bindings>
                <customBinding>
                    <binding name="CustomBinding_svcSessions">
                        <binaryMessageEncoding />
                        <httpTransport maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" />
                    </binding>
                </customBinding>
            </bindings>
            <client>
                <endpoint address="./svcSessions.svc" binding="customBinding"
                    bindingConfiguration="CustomBinding_svcSessions" contract="svcSession.svcSessions"
                    name="CustomBinding_svcSessions" />
            </client>
        </system.serviceModel>
    </configuration>

    Then it would use relevant address and should work I assume? Yes your correct I would use machinename instead.  I will give this a try now and see if it works.

    Wednesday, September 29, 2010 4:28 PM
  • Sorry, the RelativeURL should be "../svcSessions.svc".

    http://forums.silverlight.net/forums/p/198417/465033.aspx

    Wednesday, September 29, 2010 4:33 PM
  • Hi, that sorted it thanks you've really saved me from bashing my head against a wall :)

    As a note I had to Clear my Internet Browsing History before it worked on the other machine, I don't really want the file to not be cached on the client machine as this will speed it up but is there a simple way to make sure it updates it if it's newer?

    Wednesday, September 29, 2010 4:57 PM
  • As a note I had to Clear my Internet Browsing History before it worked on the other machine, I don't really want the file to not be cached on the client machine as this will speed it up but is there a simple way to make sure it updates it if it's newer?


    Did you try to close the browser?  Usually when I close the browser and re-open it, it download the new xap if I have one.

    Wednesday, September 29, 2010 5:04 PM
  • I didn't no, I will do that next time thanks.

    Wednesday, September 29, 2010 5:10 PM