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. policy issue

policy issue

Scheduled Pinned Locked Moved WPF
csharphelpwcfxmlasp-net
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

    hi guys i am hosting my wcf service in IIS5 ,but it gives me an error like An error occurred while trying to make a request to URI 'http://tauseef-pc/wcfhost/Service.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. my wcf service is hosted on iis in a seperate asp.net project   and my policy file is <?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> any help please ...................

    Tauseef A Khan MCP Dotnet framework 2.0.

    M 1 Reply Last reply
    0
    • T Tauseef A

      hi guys i am hosting my wcf service in IIS5 ,but it gives me an error like An error occurred while trying to make a request to URI 'http://tauseef-pc/wcfhost/Service.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. my wcf service is hosted on iis in a seperate asp.net project   and my policy file is <?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> any help please ...................

      Tauseef A Khan MCP Dotnet framework 2.0.

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

      Make sure the policy file is named "clientaccesspolicy.xml". Make sure the file is located in the folder of the domain's root (the physical folder "http://tauseef-pc" maps to). What happens when you navigate to http://tauseef-pc/wcfhost/Service.svc in a browser?

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

      T 1 Reply Last reply
      0
      • M Mark Salsbery

        Make sure the policy file is named "clientaccesspolicy.xml". Make sure the file is located in the folder of the domain's root (the physical folder "http://tauseef-pc" maps to). What happens when you navigate to http://tauseef-pc/wcfhost/Service.svc in a browser?

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

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

        oh i got it, actually i put it on the root of application so it was getting error . now when i have changed its location to domain root i am getting another error while debugging it. "The remote server returned an error: NotFound." any help please........

        Tauseef A Khan MCP Dotnet framework 2.0.

        M 1 Reply Last reply
        0
        • T Tauseef A

          oh i got it, actually i put it on the root of application so it was getting error . now when i have changed its location to domain root i am getting another error while debugging it. "The remote server returned an error: NotFound." any help please........

          Tauseef A Khan MCP Dotnet framework 2.0.

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

          I would first try to navigate to http://tauseef-pc/wcfhost/Service.svc in a browser. If that doesn't work - what's in the web application's web.config file? If it does work, then maybe just the client side service reference configuration needs adjusting.

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

          T 2 Replies Last reply
          0
          • M Mark Salsbery

            I would first try to navigate to http://tauseef-pc/wcfhost/Service.svc in a browser. If that doesn't work - what's in the web application's web.config file? If it does work, then maybe just the client side service reference configuration needs adjusting.

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

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

            ok , things are working now, but with a little change, the problem is in my method which returns array of type Employee, i came to know i tested it with another method which just returns a string and its working and the same error still there upon the call of GetEmployeeDataMethod() which returns an array of type employee. any help please ? public Silverlight_UI.Service.Employee[] EndGetData(System.IAsyncResult result) { object[] _args = new object[0]; //error on this line Silverlight_UI.Service.Employee[] _result = ((Silverlight_UI.Service.Employee[])(base.EndInvoke("GetData", _args, result))); return _result; } //my service code public Employee[] GetData() { using (AdventureWorksDataContext dataContext = new AdventureWorksDataContext()) { DataLoadOptions dlo = new DataLoadOptions(); dlo.LoadWith(m => m.EmployeeAddresses); dlo.LoadWith(m => m.Contact); dlo.LoadWith(m => m.Address); dataContext.LoadOptions = dlo; var list = from emp in dataContext.Employees select emp; return list.Take(10).ToArray(); } } it just give me error when i call any method which calls my locadatabase ,i have created a user for apnet , but i dont know what to do? regards.

            Tauseef A Khan MCP Dotnet framework 2.0.

            1 Reply Last reply
            0
            • M Mark Salsbery

              I would first try to navigate to http://tauseef-pc/wcfhost/Service.svc in a browser. If that doesn't work - what's in the web application's web.config file? If it does work, then maybe just the client side service reference configuration needs adjusting.

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

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

              okh, i got it but still thanks. actually i debug it through flidder and got that there was user permission issue about aspnet user. i chnaged this user to public and dopwner and now its working. can you please explain a bit about ?

              Tauseef A Khan MCP Dotnet framework 2.0.

              M 1 Reply Last reply
              0
              • T Tauseef A

                okh, i got it but still thanks. actually i debug it through flidder and got that there was user permission issue about aspnet user. i chnaged this user to public and dopwner and now its working. can you please explain a bit about ?

                Tauseef A Khan MCP Dotnet framework 2.0.

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

                Tauseef A wrote:

                can you please explain a bit about ?

                Every process runs as a user identity - that's how the OS knows what rights/priviliges a process has. If your database is using Windows authentication then it is using the user identity of the process calling it. That identity, therefore, needs the correct permissions for any database tasks it intends to perform.

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

                T 1 Reply Last reply
                0
                • M Mark Salsbery

                  Tauseef A wrote:

                  can you please explain a bit about ?

                  Every process runs as a user identity - that's how the OS knows what rights/priviliges a process has. If your database is using Windows authentication then it is using the user identity of the process calling it. That identity, therefore, needs the correct permissions for any database tasks it intends to perform.

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

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

                  thanks.

                  Tauseef A Khan MCP Dotnet framework 2.0.

                  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