Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. Web Service Method Call Fails

Web Service Method Call Fails

Scheduled Pinned Locked Moved WPF
csharpwcf
35 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Pete OHanlon

    Wrap the code inside your MetricData method with a try/catch block and log the resulting exception using the .ToString() method. The method is just wrapped with a proxy for the asynchronous code, so the exception will be occurring in the context of the body of the method. I normally use log4net for tracking exceptions in my web services.

    "WPF has many lovers. It's a veritable porn star!" - Josh Smith

    As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

    My blog | My articles | MoXAML PowerToys | Onyx

    realJSOPR Offline
    realJSOPR Offline
    realJSOP
    wrote on last edited by
    #8

    The body is alreadt wrapped in a try/catch block, and it works fine locally. The only reason I could think of why it would fail remotely is that the appropriate version of .Net wouldn't be installed, but I checked that, and the server has 3.5... The first call (which fails) is simply returning a string that uses no .Net objects/methods to construct it.

    .45 ACP - because shooting twice is just silly
    -----
    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
    -----
    "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

    P 1 Reply Last reply
    0
    • realJSOPR realJSOP

      The body is alreadt wrapped in a try/catch block, and it works fine locally. The only reason I could think of why it would fail remotely is that the appropriate version of .Net wouldn't be installed, but I checked that, and the server has 3.5... The first call (which fails) is simply returning a string that uses no .Net objects/methods to construct it.

      .45 ACP - because shooting twice is just silly
      -----
      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #9

      But what do you get when you log the exception? It sounds like a permissions issue is at fault here, so let's try to get to the bottom of that.

      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

      My blog | My articles | MoXAML PowerToys | Onyx

      realJSOPR 1 Reply Last reply
      0
      • P Pete OHanlon

        But what do you get when you log the exception? It sounds like a permissions issue is at fault here, so let's try to get to the bottom of that.

        "WPF has many lovers. It's a veritable porn star!" - Josh Smith

        As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

        My blog | My articles | MoXAML PowerToys | Onyx

        realJSOPR Offline
        realJSOPR Offline
        realJSOP
        wrote on last edited by
        #10

        Permissions where - writing the log file? FWIW, I also tried turning on the WCF tracing, but i don't get a log file.

        .45 ACP - because shooting twice is just silly
        -----
        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

        P 1 Reply Last reply
        0
        • realJSOPR realJSOP

          When I call a method in a WCF web service from a silverlight app, I get this: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at FMDashboard2.FMDashSvc3Ref.GetMetricDataCompletedEventArgs.get_Result() at FMDashboard2.Objects.DataRetrieval.service_GetMetricDataCompleted(Object sender, GetMetricDataCompletedEventArgs e)
          Calling webService.OpenAsync() succeeds, but I can't call a method (which happens to be the one and only method in the service).

          .45 ACP - because shooting twice is just silly
          -----
          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
          -----
          "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

          D Offline
          D Offline
          dan sh
          wrote on last edited by
          #11

          This[^] looks similar to your problem. Check if it helps.

          realJSOPR 1 Reply Last reply
          0
          • D dan sh

            This[^] looks similar to your problem. Check if it helps.

            realJSOPR Offline
            realJSOPR Offline
            realJSOP
            wrote on last edited by
            #12

            Nope, didn't help...

            .45 ACP - because shooting twice is just silly
            -----
            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

            D 1 Reply Last reply
            0
            • realJSOPR realJSOP

              Nope, didn't help...

              .45 ACP - because shooting twice is just silly
              -----
              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
              -----
              "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

              D Offline
              D Offline
              dan sh
              wrote on last edited by
              #13

              From whatever I have read so far, there are two reasons apart from the one in the link I had posted which can cause this: 1. Out of date service reference. 2. Long messages in response. But most of the posts related to this have remained unanswered. Since I have never faced it, I am not sure. Just check if the references are fine and messages aren't larger than the default size. BTW, how about .Net source debugging, it might tell what exactly is wrong.

              realJSOPR 1 Reply Last reply
              0
              • D dan sh

                From whatever I have read so far, there are two reasons apart from the one in the link I had posted which can cause this: 1. Out of date service reference. 2. Long messages in response. But most of the posts related to this have remained unanswered. Since I have never faced it, I am not sure. Just check if the references are fine and messages aren't larger than the default size. BTW, how about .Net source debugging, it might tell what exactly is wrong.

                realJSOPR Offline
                realJSOPR Offline
                realJSOP
                wrote on last edited by
                #14

                I can double-check the reference thing, but: 0) The same app/service combination works on my dev box 1) I'm pretty positive that the DLL itself hasn't changed because I've only been monkeying with the web config to get it to even be browsable. ... but I'll double check anyway. The response I'm expecting (a string) is less that 150 characters. Even if it was larger, maxReceivedMessageSize="2147483647", and maxBufferSize="2147483647" I thiink it's a configuration problem. This is a https situation. I found one guy that said he moved to silverlight/dotNet 4, and all his problems magically went away. Unfortunately, that's not an option for me.

                .45 ACP - because shooting twice is just silly
                -----
                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                -----
                "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                D 1 Reply Last reply
                0
                • realJSOPR realJSOP

                  Permissions where - writing the log file? FWIW, I also tried turning on the WCF tracing, but i don't get a log file.

                  .45 ACP - because shooting twice is just silly
                  -----
                  "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                  -----
                  "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                  P Offline
                  P Offline
                  Pete OHanlon
                  wrote on last edited by
                  #15

                  I actually meant you'd need to write out a log file (using log4net). The permissions I was talking about was the permissions on the actual service itself.

                  "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                  As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                  My blog | My articles | MoXAML PowerToys | Onyx

                  realJSOPR 1 Reply Last reply
                  0
                  • realJSOPR realJSOP

                    I can double-check the reference thing, but: 0) The same app/service combination works on my dev box 1) I'm pretty positive that the DLL itself hasn't changed because I've only been monkeying with the web config to get it to even be browsable. ... but I'll double check anyway. The response I'm expecting (a string) is less that 150 characters. Even if it was larger, maxReceivedMessageSize="2147483647", and maxBufferSize="2147483647" I thiink it's a configuration problem. This is a https situation. I found one guy that said he moved to silverlight/dotNet 4, and all his problems magically went away. Unfortunately, that's not an option for me.

                    .45 ACP - because shooting twice is just silly
                    -----
                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                    -----
                    "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                    D Offline
                    D Offline
                    dan sh
                    wrote on last edited by
                    #16

                    John Simmons / outlaw programmer wrote:

                    I found one guy that said he moved to silverlight/dotNet 4, and all his problems magically went away. Unfortunately, that's not an option for me.

                    Yes. I read that too. Since I do not know anything about Silverlight, I cannot use your configuration to try and find what's wrong. I guess MS tech support is the last resort if nothing goes right.

                    realJSOPR 1 Reply Last reply
                    0
                    • P Pete OHanlon

                      I actually meant you'd need to write out a log file (using log4net). The permissions I was talking about was the permissions on the actual service itself.

                      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                      My blog | My articles | MoXAML PowerToys | Onyx

                      realJSOPR Offline
                      realJSOPR Offline
                      realJSOP
                      wrote on last edited by
                      #17

                      Well, I fingered out how to get the inner exception (and wrote a tip/trick about it :) ), and for your reading pleasure, here it is: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at FMDashboard2.FMDashSvc3Ref.GetMetricDataCompletedEventArgs.get_Result() at FMDashboard2.Objects.DataRetrieval.service_GetMetricDataCompleted(Object sender, GetMetricDataCompletedEventArgs e) ============ Inner exception: An error occurred while trying to make a request to URI 'https://myUrl/FMDash3.svc/secure'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result) at FMDashboard2.FMDashSvc3Ref.FMDash3Client.FMDash3ClientChannel.EndGetMetricData(IAsyncResult result) at FMDashboard2.FMDashSvc3Ref.FMDash3Client.FMDashboard2.FMDashSvc3Ref.FMDash3.EndGetMetricData(IAsyncResult result) at FMDashboard2.FMDashSvc3Ref.FMDash3Client.OnEndGetMetricData(IAsyncResult result) at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result) ============ Inner exception: at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state) at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result) ============ Inner exception: Security error. at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IA

                      P 1 Reply Last reply
                      0
                      • D dan sh

                        John Simmons / outlaw programmer wrote:

                        I found one guy that said he moved to silverlight/dotNet 4, and all his problems magically went away. Unfortunately, that's not an option for me.

                        Yes. I read that too. Since I do not know anything about Silverlight, I cannot use your configuration to try and find what's wrong. I guess MS tech support is the last resort if nothing goes right.

                        realJSOPR Offline
                        realJSOPR Offline
                        realJSOP
                        wrote on last edited by
                        #18

                        I managed to retrieve the inner exception, and posted it as a reply to Pete's last comment.

                        .45 ACP - because shooting twice is just silly
                        -----
                        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                        -----
                        "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                        1 Reply Last reply
                        0
                        • realJSOPR realJSOP

                          Well, I fingered out how to get the inner exception (and wrote a tip/trick about it :) ), and for your reading pleasure, here it is: An exception occurred during the operation, making the result invalid. Check InnerException for exception details. at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at FMDashboard2.FMDashSvc3Ref.GetMetricDataCompletedEventArgs.get_Result() at FMDashboard2.Objects.DataRetrieval.service_GetMetricDataCompleted(Object sender, GetMetricDataCompletedEventArgs e) ============ Inner exception: An error occurred while trying to make a request to URI 'https://myUrl/FMDash3.svc/secure'. This could be due to attempting to access a service in a cross-domain way without a proper cross-domain policy in place, or a policy that is unsuitable for SOAP services. You may need to contact the owner of the service to publish a cross-domain policy file and to ensure it allows SOAP-related HTTP headers to be sent. This error may also be caused by using internal types in the web service proxy without using the InternalsVisibleToAttribute attribute. Please see the inner exception for more details. at System.ServiceModel.AsyncResult.End[TAsyncResult](IAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result) at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result) at System.ServiceModel.ClientBase`1.ChannelBase`1.EndInvoke(String methodName, Object[] args, IAsyncResult result) at FMDashboard2.FMDashSvc3Ref.FMDash3Client.FMDash3ClientChannel.EndGetMetricData(IAsyncResult result) at FMDashboard2.FMDashSvc3Ref.FMDash3Client.FMDashboard2.FMDashSvc3Ref.FMDash3.EndGetMetricData(IAsyncResult result) at FMDashboard2.FMDashSvc3Ref.FMDash3Client.OnEndGetMetricData(IAsyncResult result) at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result) ============ Inner exception: at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state) at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.CompleteGetResponse(IAsyncResult result) ============ Inner exception: Security error. at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IA

                          P Offline
                          P Offline
                          Pete OHanlon
                          wrote on last edited by
                          #19

                          Are your clientaccesspolicy.xml or crossdomain.xml files visible? Have a read of this[^].

                          "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                          As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                          My blog | My articles | MoXAML PowerToys | Onyx

                          realJSOPR 1 Reply Last reply
                          0
                          • P Pete OHanlon

                            Are your clientaccesspolicy.xml or crossdomain.xml files visible? Have a read of this[^].

                            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                            As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                            My blog | My articles | MoXAML PowerToys | Onyx

                            realJSOPR Offline
                            realJSOPR Offline
                            realJSOP
                            wrote on last edited by
                            #20

                            Visible? I have a ClientAccessPolicy.xml file in my web services's folder:

                            <?xml version="1.0" encoding="utf-8" ?>
                            <access-policy>
                            <cross-domain-access>
                            <policy>
                            <allow-from http-request-headers="*">
                            <domain uri ="*" />
                            </allow-from>
                            <grant-to>
                            <resource path="/" include-subpaths="true"/>
                            </grant-to>
                            </policy>
                            </cross-domain-access>
                            </access-policy>

                            I also have a CrossDomain.xml, but I'm not really sure where to put it, so I have it in a few places.

                            <?xml version="1.0" encoding="utf-8" ?>
                            <cross-domain-policy>
                            <allow-http-request-headers-from domain="*" headers="*"/>
                            <strong>
                            <allow-http-request-headers-from domain="*" headers="SOAPAction" />
                            </strong>
                            <allow-https-request-headers-from domain="*" headers="*"/>
                            <strong>
                            <allow-https-request-headers-from domain="*" headers="SOAPAction" />
                            </strong>
                            </cross-domain-policy>

                            Where *should* I put it?

                            .45 ACP - because shooting twice is just silly
                            -----
                            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                            -----
                            "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                            P I 2 Replies Last reply
                            0
                            • realJSOPR realJSOP

                              Visible? I have a ClientAccessPolicy.xml file in my web services's folder:

                              <?xml version="1.0" encoding="utf-8" ?>
                              <access-policy>
                              <cross-domain-access>
                              <policy>
                              <allow-from http-request-headers="*">
                              <domain uri ="*" />
                              </allow-from>
                              <grant-to>
                              <resource path="/" include-subpaths="true"/>
                              </grant-to>
                              </policy>
                              </cross-domain-access>
                              </access-policy>

                              I also have a CrossDomain.xml, but I'm not really sure where to put it, so I have it in a few places.

                              <?xml version="1.0" encoding="utf-8" ?>
                              <cross-domain-policy>
                              <allow-http-request-headers-from domain="*" headers="*"/>
                              <strong>
                              <allow-http-request-headers-from domain="*" headers="SOAPAction" />
                              </strong>
                              <allow-https-request-headers-from domain="*" headers="*"/>
                              <strong>
                              <allow-https-request-headers-from domain="*" headers="SOAPAction" />
                              </strong>
                              </cross-domain-policy>

                              Where *should* I put it?

                              .45 ACP - because shooting twice is just silly
                              -----
                              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                              -----
                              "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                              P Offline
                              P Offline
                              Pete OHanlon
                              wrote on last edited by
                              #21

                              You only need the ClientAccessPolicy.xml file. I notice from the exception that you are using https - in the allow-from section, you need to add

                              <domain uri=”http://*” />

                              "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                              As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                              My blog | My articles | MoXAML PowerToys | Onyx

                              realJSOPR 1 Reply Last reply
                              0
                              • P Pete OHanlon

                                You only need the ClientAccessPolicy.xml file. I notice from the exception that you are using https - in the allow-from section, you need to add

                                <domain uri=”http://*” />

                                "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                                As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                                My blog | My articles | MoXAML PowerToys | Onyx

                                realJSOPR Offline
                                realJSOPR Offline
                                realJSOP
                                wrote on last edited by
                                #22

                                doesn't this accomplish the same thing: <domain uri=”*” />

                                .45 ACP - because shooting twice is just silly
                                -----
                                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                -----
                                "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                P 1 Reply Last reply
                                0
                                • realJSOPR realJSOP

                                  doesn't this accomplish the same thing: <domain uri=”*” />

                                  .45 ACP - because shooting twice is just silly
                                  -----
                                  "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                  -----
                                  "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                  P Offline
                                  P Offline
                                  Pete OHanlon
                                  wrote on last edited by
                                  #23

                                  No.

                                  "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                                  As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                                  My blog | My articles | MoXAML PowerToys | Onyx

                                  realJSOPR 1 Reply Last reply
                                  0
                                  • P Pete OHanlon

                                    No.

                                    "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                                    As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                                    My blog | My articles | MoXAML PowerToys | Onyx

                                    realJSOPR Offline
                                    realJSOPR Offline
                                    realJSOP
                                    wrote on last edited by
                                    #24

                                    Ok then, but wouldn't it be more correct to do this?

                                    <access-policy>
                                    <cross-domain-access>
                                    <policy>
                                    <allow-from http-request-headers="*">
                                    <domain uri ="http://*" />
                                    </allow-from>
                                    <grant-to>
                                    <resource path="/" include-subpaths="true"/>
                                    </grant-to>
                                    </policy>

                                         <policy>
                                             <allow-from https-request-headers="\*">
                                                 <domain uri ="https://\*" />
                                             </allow-from>
                                             <grant-to>
                                                 <resource path="/secure" include-subpaths="true"/>
                                             </grant-to>
                                         </policy>
                                    </cross-domain-access>
                                    

                                    </access-policy>

                                    .45 ACP - because shooting twice is just silly
                                    -----
                                    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                    -----
                                    "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                    P 1 Reply Last reply
                                    0
                                    • realJSOPR realJSOP

                                      Ok then, but wouldn't it be more correct to do this?

                                      <access-policy>
                                      <cross-domain-access>
                                      <policy>
                                      <allow-from http-request-headers="*">
                                      <domain uri ="http://*" />
                                      </allow-from>
                                      <grant-to>
                                      <resource path="/" include-subpaths="true"/>
                                      </grant-to>
                                      </policy>

                                           <policy>
                                               <allow-from https-request-headers="\*">
                                                   <domain uri ="https://\*" />
                                               </allow-from>
                                               <grant-to>
                                                   <resource path="/secure" include-subpaths="true"/>
                                               </grant-to>
                                           </policy>
                                      </cross-domain-access>
                                      

                                      </access-policy>

                                      .45 ACP - because shooting twice is just silly
                                      -----
                                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                      -----
                                      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                      P Offline
                                      P Offline
                                      Pete OHanlon
                                      wrote on last edited by
                                      #25

                                      If this is the way your site is set up, then yes. Alternatively, you could put both the https://* and http://* in the first allow-from if you don't have to worry about the secure path. The reason you have to add the https://* is because SL requires that you explicitly opt-in to secure services.

                                      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                                      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                                      My blog | My articles | MoXAML PowerToys | Onyx

                                      realJSOPR 1 Reply Last reply
                                      0
                                      • P Pete OHanlon

                                        If this is the way your site is set up, then yes. Alternatively, you could put both the https://* and http://* in the first allow-from if you don't have to worry about the secure path. The reason you have to add the https://* is because SL requires that you explicitly opt-in to secure services.

                                        "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                                        As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                                        My blog | My articles | MoXAML PowerToys | Onyx

                                        realJSOPR Offline
                                        realJSOPR Offline
                                        realJSOP
                                        wrote on last edited by
                                        #26

                                        Well, I went ahead and made that change, and it still gives me the same exception. :/

                                        .45 ACP - because shooting twice is just silly
                                        -----
                                        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                        -----
                                        "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                        P 1 Reply Last reply
                                        0
                                        • realJSOPR realJSOP

                                          Visible? I have a ClientAccessPolicy.xml file in my web services's folder:

                                          <?xml version="1.0" encoding="utf-8" ?>
                                          <access-policy>
                                          <cross-domain-access>
                                          <policy>
                                          <allow-from http-request-headers="*">
                                          <domain uri ="*" />
                                          </allow-from>
                                          <grant-to>
                                          <resource path="/" include-subpaths="true"/>
                                          </grant-to>
                                          </policy>
                                          </cross-domain-access>
                                          </access-policy>

                                          I also have a CrossDomain.xml, but I'm not really sure where to put it, so I have it in a few places.

                                          <?xml version="1.0" encoding="utf-8" ?>
                                          <cross-domain-policy>
                                          <allow-http-request-headers-from domain="*" headers="*"/>
                                          <strong>
                                          <allow-http-request-headers-from domain="*" headers="SOAPAction" />
                                          </strong>
                                          <allow-https-request-headers-from domain="*" headers="*"/>
                                          <strong>
                                          <allow-https-request-headers-from domain="*" headers="SOAPAction" />
                                          </strong>
                                          </cross-domain-policy>

                                          Where *should* I put it?

                                          .45 ACP - because shooting twice is just silly
                                          -----
                                          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                                          -----
                                          "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                                          I Offline
                                          I Offline
                                          Ian McCaul
                                          wrote on last edited by
                                          #27

                                          I thought the crossdomain xml files had to be at the root of the site?

                                          realJSOPR 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups