Tuesday 30 October 2012

The operation could not be completed in MS-InfoPath


If the error: “Microsoft InfoPath. The operation could not be completed” arises, it would actually mean that you haven’t created a top level site collection.
First go to your Admin Site then follow the steps below.
On Site Collections, click on the Create site collections link.
Then from the drop down list, Select the web application where you wanted to create the site collection.
Give the title and the description then select “/” from the URL drop down list.
Then choose a template for your site and enter the primary site collection Administrator and OK.

Friday 26 October 2012

Server Error in ‘/’ Application


In SharePoint 2010 we would go into IIS, find our virtual directory and change the CallStack from false to true and the customErrors mode from On to Off.

Go to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\web.config and set Customerrors mode="Off".

If still error will arrise then do the following:

Go to C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\ADMIN\web.config

From customErrors section set the value to off.

Sunday 21 October 2012

How to Import Export a SharePoint Subsites

1. Navigate to Central Admin
2. From the Central Admin screen – select ‘Backup and Restore’











3. Form here click ‘Export a site or list’ from the Granular Backup links:





4. Select the relevant Site collection from the drop down






5. Once you’ve selected the Site collection, site and list select a file location (note the .cmp file extension and the fact that it needs to be a network location)
6. Select the version number: 





7. You’re now good to go and can hit ‘start Export’
8. Once you’ve started the Export, you’ll get a screen notifying you about the status









9. Once done you’ll notice 2 files:
          i)   The actual file
          ii)   A log file which is handy in case things don’t go so well.
10. SharePoint 2010′s Central Admin doesn’t have a UI to facilitate the importing of this so you’ll have to use PowerShell .
11. Open the PowerShell  in Administrative mode nad type the below command.
Import-SPWeb -Identity http://win-8qo9cqdq6hn:13000 -Path c:\Backupsharepoint\Customer11000.cmp -includesecurity –force
12. Upon navigating back to your SharePoint list you should notice it on the root /homepage of your site which is where it was imported to.


Using stsadm
Open the Command Prompt on the SharePoint server as an administrator.

C:\>stsadm -o export -url  http://siteurl/site1 -filename c:/site1.cmp -includeusersecurity

C:\>stsadm -o import -url http://newsiteurl/site1 -filename c:/site1.cmp -includeusersecurity

Survey in sharepoint 2010


1. Open your site collection.
2. Go to Site Actions ->Click on All site content option.
3. Then click on create option on the top.
















4. Select survey from the options and give some name and click on create.












5. A new page will open in which you will enter a question or questions for the survey.



















6. Type the required question in the question box.
7. Choose how the answer will show. A number of options are there. Choose the required one.
8. If you want that user have to response to that question then select “Yes” on “Require a response to this question”.
9. If you want that the users will enter different values without any similarity with each other then Choose “Yes” on “Enforce Unique values”.
10. Enter the options you want to show for the question.
11. Choose the option how you want to show the options i.e. in drop down or  in radio button etc.














12. If you want to add another question in the survey then click on “Next Question” button otherwise choose “Finish” button.
13. Survey option will show in LHS navigation pane.

Facebook Integration in asp.net

Thursday 18 October 2012

How to embed and Integrate Youtube Videos in SharePoint 2010 Web Part


1.   Go to YouTube.com and get to the page where your desired video resides. Right click on the video and choose "copy embed html".
2.   Create a Web Part Page or modify an existing page thats going to display the video content and add a Content editor webpart into it.
3.   Modify the content editor webpart and paste the embed html code by clicking "Source Editor".
4.   Click Ok, and publish the page.

Friday 12 October 2012

Add to Bookmark Link using JS


<script language="javascript" type="text/javascript">
function addBookmark()
{
    bookmarkurl = document.URL;
    bookmarktitle = document.title;
    if (document.all)  //Check the condition for IE
        window.external.AddFavorite(bookmarkurl, bookmarktitle)
    else if (window.sidebar) // Check the condition for Mozilla
   {
       window.sidebar.addPanel(bookmarktitle, bookmarkurl, "");
   }
}
</script>

<a href="javascript:addBookmark();">Bookmark this page!</a>

Wednesday 10 October 2012

Cannot be deployed as part of a sandboxed solution error.


I was getting below error while activating the wsp file.

This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'bfff2747-9497-4cd7-8c7a-af8f5c7d8ad9' failed validation, file manifest.xml, line 3, character 61: The 'ResetWebServer' attribute is not declared.

Solution : Go to Central Administration  -> System settings -> select the option "Manage farm solutions".
In that page you can deploy your solution.

Friday 5 October 2012

How to add a Google Map to a SharePoint Server 2010 page


1.   Open Google Maps page.
2.   In the Text Box, enter the address you want to display.
3.   Click on the Link button above the map on the right.
4.   Click on the Customize and preview embedded map link located on the bottom.
5.   A second Google Maps window will now open. This window will provide you with some options for customizing the map view.
6.   Select the appropriate or custom map size you wish to display on your Web page.
7.   Copy the HTML map link code contained in Section 3 at the bottom of the page.

1.   Open your SharePoint collection.
2.   Select the page in your site where you will be placing the map.
3.   From the Site Actions drop down menu, select Edit Page.
4.   Place the cursor in the page where you want to add a Content Editor Web Part.
5.   In  the ribbon, click on the Insert tab -> Click the Web Part.
6.   Click the Media and Content category, and then click Content Editor.
7.   Click Add.
8.   In the Content Editor Web Part, click Click here to add new content.
9.   In the Format Text tab of the ribbon, click HTML, and then click Edit HTML Source.
10.  In the HTML Source window, paste the code for the embeddable map, and then click OK.
11.  On the Page tab on the ribbon, click Save & Close.

Wednesday 3 October 2012

SharePoint 2010 site templates not showing in create site page, How to get them?

1.            I have created a simple publishing site in SharePoint 2010 server and below is the screen which looks like by default.

      2.            And I like to create a blog site inside it. And I go to Site Actions and selected Create a site and below is the screen I saw.











     3.     But,  here I am not able to see all site templates available in the system. By default it is showing only two. So, How to create a blog site now? How to get all the site templates back?
     4.     It just simple and follow this. Go to Site settings and move to the section "look and feel" as shown in below screen







     5.    If you see, there is a link named "Page layouts and site templates". That is what we needed. Just click on that link.
     6.    Now, below is the screen you see, which has the complete list of site templates and page layouts available in the system.
    7.    If you see the above screen, there are only two templates selected by default. This is the reason why we see only two templates available on the create site page. So, add how many templates you want from the left side. You can do the same with page layouts too. Select all page layouts you needed and save it.

Monday 1 October 2012

Backup/Restore a sharepoint site collection

1. Verify that the user account performing this procedure is a member of the Farm Administrators group. Additionally, verify that the Windows SharePoint Services Timer V4 service has Full Control permissions on the backup folder.

2. In Central Administration, on the Home page, in the Backup and Restore section, click Perform a site collection backup.

3. On the Site collection backup page, select the site collection from the Site Collection list.

4. Type the local path of the backup file in the Filename box.

5. Click Start Backup.

6. You can view the general status of all backup jobs at the top of the Granular Backup Job Status page in the Readiness section. You can view the status for the current backup job in the lower part of the page in the Site Collection Backup section. The status page updates every 30 seconds automatically. You can manually update the status details by clicking Refresh. Backup and recovery are Timer service jobs. Therefore, it may take several seconds for the backup to start.

7. If you receive any errors, you can review them in the Failure Message column of the Granular Backup Job Status page.

8. Next create a new web application (don't create site collection in it).

9. Open Sharepoint 2010 managenment shell in administrator mode. Go to start -> All progrmas -> Microsoft sharepoint 2010 products -> Sharepoint 2010 Management Shell. Right click on it and open as an administrator.

10. Restore-SPSite -Identity "http://localhost:30" -Path "c:\backup\backup30.bak" -force

11. Run the site collection.


Using Powershell

backup-spsite -identity http://contosoweb -path \\server\backupshare\backupfile.bak

restore-spsite -identity http://contosoweb -path \\server\backupshare\backupfile.bak