Advertisement

07.03.2008 at 07:07AM PDT, ID: 23536887 | Points: 500
[x]
Attachment Details

Can't access local URI

Asked by brettr in Silverlight, C# Programming Language, .NET Framework 3.x versions

I've created the duplex (polling) service outlined here http://msdn.microsoft.com/en-us/library/cc645027(VS.95).aspx and the client outlined here http://msdn.microsoft.com/en-us/library/cc645028(VS.95).aspx.   I get an exception in the client's Page.xaml.cs file when calling the service.  The exception occurs in the method below.

The exception occurs here

channel.EndSend(result);

It reads

e = {System.ServiceModel.CommunicationException: An error occurred while trying to make a request to URI 'http://localhost:56103/Service1.svc'. This could be due to a cross domain configuration error. Please see the inner exception for more details. ---> System...


InnerException = {System.Security.SecurityException ---> System.Security.SecurityException: Security error.
   at MS.Internal.InternalWebRequest.Send()
   at System.Net.BrowserHttpWebRequest.BeginGetResponseImplementation()
   at System.Net.BrowserHttpWebRequest.Internal...

Is there something related to Silverlight's security that I need to configure for this to work?
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
void CompleteOnSend(IAsyncResult result)
        {
            try
            {
                IDuplexSessionChannel channel = (IDuplexSessionChannel)result.AsyncState;
 
                channel.EndSend(result);
 
                // The message is now sent. Notify the user.
 
                uiThread.Post(WriteText, "Client says: Sent order of " + order + Environment.NewLine);
                uiThread.Post(WriteText, "Service will call back with updates" + Environment.NewLine);
            }
            catch (Exception e)
            {
            }
 
        }
[+][-]07.08.2008 at 06:40AM PDT, ID: 21953673

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 07:26AM PDT, ID: 21954123

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.08.2008 at 09:07AM PDT, ID: 21955198

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.19.2008 at 04:38AM PDT, ID: 22258797

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628