Tuesday 31 July 2012

Creating and using an XML based Sitemap in SharePoint

http://www.sharepointninja.com/Blog/Lists/Posts/Post.aspx?ID=56

http://meandmysharepoint.blogspot.com/2011/11/customising-sharepoint-global.html

The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly

Change site collection welcome page!

Example: http://mysharepointurl/default.aspx

The type 'xxx.Class' is defined in an assembly that is not referenced. You must add a reference to assembly 'xxx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ffa52fbb92e79dbd'

 

Web.Config

<assemblies>

<add assembly="xxx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ffa52fbb92e79dbd'" />

</assemblies>

How to delete a workspace in TFS Server

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC>

WORKSPACENAME= computer name,

USERNAME = UserName

tf workspace /delete WORKSPACENAME;USERNAME

Cannot find Autofac container

Global.asax

<%@ Assembly Name="Microsoft.SharePoint"%>
<%@ Assembly Name="Autofac.Integration.Web, Version=2.6.1.841, Culture=neutral, PublicKeyToken=17863af14b0044da"%>
<%@ Import Namespace="Autofac.Integration.Web"  %>
<%@ Application Language="C#" Inherits="AutofacContainerProvider.SHttpApplication, AssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=3c6f45e89aad3c3a" %>

Monday 30 July 2012

SharePoint Upgrade Check Status

stsadm.exe -o localupgradestatus

SharePoint Version Problems

You need to read.

http://www.sharepointdesignerstepbystep.com/blog/SitePages/SharePoint%20versions.aspx

Restore-SPSite : Your backup is from a different version of Microsoft SharePoi
t Foundation and cannot be restored to a server running the current version. T
e backup file should be restored to a server with version '4.1.11.0' or later.
At line:1 char:15
+ Restore-SPSite <<<<  -Identity http://yourserverurl -Path C:\deploy\
backup.bak
    + CategoryInfo          : InvalidData: (Microsoft.Share...dletRestoreSite:
   SPCmdletRestoreSite) [Restore-SPSite], SPException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletRestoreS
   ite

[x] item them still need upgrade or cannot be upgraded

psconfig -cmd upgrade -inplace b2b -force -wait

SharePoint 2010 Backup and Restore site

Backup-SPSite -Identity http://myserver -Path "c:\backup\file.bak"

Restore-SPSite -Identity http://myserver -Path "c:\backup\file.bak"

Sunday 22 July 2012

How to get the value hidden control of user control in .aspx page

 

In .ascx file(UserControl1)

<script type="text/javascript">
    $(function () {
        $('.address-radio').change(
            function () {
                $('#<%=AddressHidden.ClientID %>').val($(this).val())
                            }
        )
    })
</script>

<asp:HiddenField ID="AddressHidden" runat="server" />

In aspx page

HiddenField hidden = (HiddenField)UserControl1.FindControl("HiddenField1");
        if (hidden != null)
        {
            string value = hidden.Value.ToString();
        }

http://forums.asp.net/t/1369427.aspx