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. request error

request error

Scheduled Pinned Locked Moved WPF
csharpwcfmcpxmlhelp
8 Posts 2 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.
  • T Offline
    T Offline
    Tauseef A
    wrote on last edited by
    #1

    I see the following error while connecting to a wcf service through my silverlight application. An error occurred while trying to make a request to URI 'http://localhost:3046/Service1.svc'. 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.

    Tauseef A Khan MCP Dotnet framework 2.0.

    M 1 Reply Last reply
    0
    • T Tauseef A

      I see the following error while connecting to a wcf service through my silverlight application. An error occurred while trying to make a request to URI 'http://localhost:3046/Service1.svc'. 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.

      Tauseef A Khan MCP Dotnet framework 2.0.

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      How are you hosting the WCF app? How are you hosting the Silverlight app? If the Silverlight app isn't hosted at http://localhost:3046 then you'l have a cross domain issue. That means you'll need to provide a clientaccesspolicy.xml file at the root of the domain the WCF service is hosted at. Making a Service Available Across Domain Boundaries[^] If you're hosting the WCF service in WcfSvchost.exe or self hosting, you may need to serve up the clientaccesspolicy.xml yourself: Enabling cross-domain calls for Silverlight apps on self-hosted web services[^] Or you can host your WCF service in IIS[^] and just put the clientaccesspolicy.xml at the root of the host domain.

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      T 1 Reply Last reply
      0
      • M Mark Salsbery

        How are you hosting the WCF app? How are you hosting the Silverlight app? If the Silverlight app isn't hosted at http://localhost:3046 then you'l have a cross domain issue. That means you'll need to provide a clientaccesspolicy.xml file at the root of the domain the WCF service is hosted at. Making a Service Available Across Domain Boundaries[^] If you're hosting the WCF service in WcfSvchost.exe or self hosting, you may need to serve up the clientaccesspolicy.xml yourself: Enabling cross-domain calls for Silverlight apps on self-hosted web services[^] Or you can host your WCF service in IIS[^] and just put the clientaccesspolicy.xml at the root of the host domain.

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        T Offline
        T Offline
        Tauseef A
        wrote on last edited by
        #3

        wcf service is in the solution where silverlight application is. i m hosting silverlight app in a web application in the same solution.

        Tauseef A Khan MCP Dotnet framework 2.0.

        M 1 Reply Last reply
        0
        • T Tauseef A

          wcf service is in the solution where silverlight application is. i m hosting silverlight app in a web application in the same solution.

          Tauseef A Khan MCP Dotnet framework 2.0.

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          Tauseef A wrote:

          wcf service is in the solution where silverlight application is. i m hosting silverlight app in a web application in the same solution.

          The project/solution has no relevance here. I mean the web hosts...WcfSvcHost...IIS....Self Hosting?

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          T 1 Reply Last reply
          0
          • M Mark Salsbery

            Tauseef A wrote:

            wcf service is in the solution where silverlight application is. i m hosting silverlight app in a web application in the same solution.

            The project/solution has no relevance here. I mean the web hosts...WcfSvcHost...IIS....Self Hosting?

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            T Offline
            T Offline
            Tauseef A
            wrote on last edited by
            #5

            its wcfsvchost i think.

            Tauseef A Khan MCP Dotnet framework 2.0.

            M 1 Reply Last reply
            0
            • T Tauseef A

              its wcfsvchost i think.

              Tauseef A Khan MCP Dotnet framework 2.0.

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              Then you'll definitely want to study the information at the links I provided to understand the cross-domain issue and how to deal with it.

              Mark Salsbery Microsoft MVP - Visual C++ :java:

              T 1 Reply Last reply
              0
              • M Mark Salsbery

                Then you'll definitely want to study the information at the links I provided to understand the cross-domain issue and how to deal with it.

                Mark Salsbery Microsoft MVP - Visual C++ :java:

                T Offline
                T Offline
                Tauseef A
                wrote on last edited by
                #7

                thanks.

                Tauseef A Khan MCP Dotnet framework 2.0.

                M 1 Reply Last reply
                0
                • T Tauseef A

                  thanks.

                  Tauseef A Khan MCP Dotnet framework 2.0.

                  M Offline
                  M Offline
                  Mark Salsbery
                  wrote on last edited by
                  #8

                  The WcfSvcHost is for testing/debugging. You'll probably want to consider how it will work when the service is actually deployed. I find hosting on IIS the easiest and most flexible.

                  Mark Salsbery Microsoft MVP - Visual C++ :java:

                  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