Skip to main content

Posts

Resolving the Croos-Domain Policy issue while accessing WCF Service in a Silverlight Application

W hile trying to access WCF service into my Silverlight application, i came accross "Cross-Domain" policy issue. As i'm new to WCF service, i didn't know that an access policy file is required. By default, Silverlight supports calls to Web services on the same domain or site of origin. Same domain means that calls must use the same sub domain, protocol, and port. This is for security reasons and prevents cross-domain forgery. You can enable Web services to be called by a Silverlight application in another domain by deploying a Web service that uses the correct cross-domain policy file at the root of the domain. You need to add this crossdomain.xml file to the root of IIS hosted service directory. Read more about Cross-Domain policy here .

SharePoint 2010 Sneak Peek Site is LIVE!

Recently Microsoft launched the SharePoint 2010 Sneak Peek site. This site includes some of the features that SharePoint 2010 will include in it's upcoming version. This was a wonderful project to work on with wonderful team members - me, kailash and jomit

About SharePoint Site Definitions

A SharePoint site definition consists of CAML elements that describe the different parts of the site and how they relate to each other. The topmost element is the 'template' element which is declared in the special file called WEBTEMP, which contains further template configuration elements. Each of the template configuration elements defined in WEBTEMP file references associated site definition configuration elements in the ONET.xml file. When talking about site definitions it is important to understand the difference between Site templates and Site definitions. When users create a new SharePoint site or site collection through user interface, they are actually using one of the available site templates as defined in the WEBTEMP.[name].xml file, where [name] is the visible template name. The site definiton configuration elements are defined in the configuration elements in the ONET.xml.

Using XPath to display only the current Year

Using XPath to display only the current Year 1. Right click your textbox and select properties. 2. For Data Types select Text (string). 3. Select the formula button next to the Value box in the Default Value section . 4. Select Insert Function. 5. Select substring-before (in the Text functions). 6. For the first field, put in the field with the date your want or the function today() for today's date. 7. After the comma, put in "-" 8. Your final formula should look like this: substring-before(today(), "-") The substring-before function takes all the characters in the first string (today() in our case) up to the first occurrence of the character in the second string (the hyphen, for us). Since today() returns a date formatted as: "2008-07-16", taking everything before the first hyphen returns the year.