How to Get ONET.XML for The Current Site – site definition XML

Sometime during your development, you need to know the current site definition XML file which known as ONET.XML

It is very easy:

Just write in your browser the following URL


Press enter and play with file.

You can copy it and modify it to create your own site definition.



Error after Upgrading From SharePoint 2010 to SharePoint 2013 Preview

I followed the following steps to upgrad my SharePoint 2010 web application to SharePoint 2013 Preview:

  1. Backup SharePoint 2010 Content DB
  2. Restore it on SharePoint 2013 Preview SQL server 2012
  3. Run the command Mount-SPContentDatabase from PowerShell
  4. Browse my web application
  5. I found the following error

The context has expired and can no longer be used. (Exception from HRESULT: 0x80090317)



After that everything workfine.

Calling Web Service from InfoPath 2010 with Parameters

In this post I will explain how to call a web service from InfoPath 2010 and how to pass a parameters to this web services and get the result.

I support that we have an existing web services which accept two parameters (int x,int y) and return integer as Sum of x and y.

Below is a screen shot after executing the web service

Now, In InfoPath, let’s start it.

Design your form as below:

Click on Manage Data Connection…

Click Add

Now set a sample values for both X and Y

Here is after I set a test values for X=1 and Y=4

Click Next

Now we define our web service in the form, after that we need to set the parameters and call it.

Click on the button and show its rules as below screen.

Add an Action

Set the values from your fields

Go to your web service connection and select X to set its value from textbox

Do same steps again for Y

Now, add a new action “Query for data

Select your connection and click OK

Now, drag and drop the SumResult field on your form

We finished now, just click F5 to run the form and call the web service.

After your fill the form (x and y) and click the button, you will receive the below warning where you can ignore it

Thanks for reading and sorry for long post 😉