Showing posts with label Silverlight. Show all posts
Showing posts with label Silverlight. Show all posts

Thursday, July 02, 2009

Silverlight 2.0 – Silverlight Apps calling asmx web services

A while back I worked on a Silverlight application that was hosted in SharePoint. The Silverlight application was to call a web service written by a third party vendor in .NET 2.0.

Problem
As what we all normally would do in a Silverlight app is to call this web service. However, I got the following error when my application tries to call the asmx web service:

“An error occurred while trying to make a request to URI 'http://localhost:1000/webservice.asmx'. 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. Please see the inner exception for more details.”

SLAccessError

Solution

After some research, I found a recipe to get it going again:

  1. Create a new file within the web service application (at the root of the requesting domain), called clientaccesspolicy.xml with the following contents:


    <?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>



  2. Create another file within the web service application(at the root of the requesting domain), called crossdomain.xml with the following contents:

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

After adding these policy files, my app started working. Hope this helps.

References

http://timheuer.com/blog/archive/2008/04/06/silverlight-cross-domain-policy-file-snippet-intellisense.aspx

http://timheuer.com/blog/archive/2008/06/10/silverlight-services-cross-domain-404-not-found.aspx

Sunday, February 22, 2009

Tuesday, September 02, 2008

Tech-Ed Australia 2008

If you are going to Tech-Ed in Sydney this week, you can catch a few very interesting SharePoint/Search sessions:

  • OFC315 - Why Findability Should Be an Organising Principle for Your SharePoint Server 2007 Deployment. Presented by Ivan Wilson (SharePoint Gurus) and Ben Curry (MindSharp)
  • OFC301 - Form Processes in Minutes, not Months. Presented by Ivan Wilson (SharePoint Gurus) and Ben Walters (SDM).
  • MVP307 – SharePoint Monitoring – How to measure the success of your SharePoint implementation. Presented by Ivan Wilson (SharePoint Gurus)
  • OFC302 Stop Searching... Find it! With Microsoft Enterprise Search. Presented by Gayan Peiris (Microsoft)
  • OFC405 Creating Solutions with the Business Data Catalog. Presented by Ishai Sagi (Unique World)

Also another interesting one with Silverlight and SharePoint:

  • OFC303 Enhance the SharePoint User Interface with Silverlight 2.0. Presented by William Cornwill and Craig Harrowfield

Saturday, March 08, 2008

Microsoft SharePoint 2007 - Silverlight Blueprint for SharePoint

I'd have to say this is pretty exciting stuff from Microsoft. Examples of implementation of SharePoint components using Silverlight! The most impressive blueprint is the social networking tool which sources its information from the User Profile that is ultimately imported from AD.

Impressive because, it surfaces the information in a very intuitive UI, and not only that, it also links back to the user's public "My Profile" page.

For more information, the Silverlight Blueprint for SharePoint site is:
http://www.ssblueprints.net/sharepoint/

Saturday, December 22, 2007

Microsoft CRM and Silverlight - "Adding client side business logic to CRM forms using Silverlight managed code"

Silverlight is an exciting technology with a very high degree of highlight and focus for web technology enthusiasts because it has the potential to bring to the web user an enhanced, lifted and interesting user experience.

Microsoft CRM, being a technology that is closely shaped by business processes, has also a very strong focus on usability. CRM technology is data and information based, and how well we utilise the information from these systems is, in my opinion, very closely tied with the effectiveness of usability.

Microsoft CRM is a very exciting and fun product to develop (technically and business wise) with because it offers the flexibility and power to adapt to a business's needs. Just imagine if we surface the information from CRM and create new applications to embed within the CRM application, the possibilities that I see are quiet "uniquely" cool and awesome!

I found the following post by Arash, which talks about developing a basic Silverlight 1.1 (Javascript and C# Managed code) application. This is the starting point for the imaginations to become a reality...

http://blog.arash.cc/post/Adding-client-side-business-logic-to-CRM-forms-using-Silverlight-managed-code.aspx