вторник, 6 ноября 2012 г.
Убираем руссификацию Visual Studio 2010
После установки каких-то пакетов Vusial Sudio 2010 стала наполовину (худшую :-) русской. Чтобы убрать это безобразие необходимо открыть директорию C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE и переименовать директорию 1049 в что-нибудь (для радикалов, можно удалить).
вторник, 31 июля 2012 г.
Как отключить аутентификацию сообщений MVC
http://www.gotdotnet.ru/forums/15/141125/
На сервере
На сервере
<bindings> <wsHttpBinding> <binding name="CustomAuthentication"> <security mode="None"> <message clientCredentialType="None"/> </security> </binding> </wsHttpBinding> </bindings>
<services> <service behaviorConfiguration="ServiceBehavior" name="Service"> <endpoint address="" binding="wsHttpBinding" bindingConfiguration="CustomAuthentication" contract="IService">
на клиенте
<security mode="None">
воскресенье, 25 марта 2012 г.
Механизм рейтинга в SharePoint 2010
Обзор возможностей механизма рейтингов:
http://weblogs.asp.net/bsimser/archive/2009/10/19/sharepoint-2010-what-s-new-ratings-spc09.aspx
Настройка страницы поиска:
http://blogs.technet.com/b/speschka/archive/2009/10/28/using-the-new-sharepoint-2010-ratings-feature-in-search.aspx
Использование компонента AverageRatingFieldControl
http://codename-srini.blogspot.com/2010/04/how-to-use-rating-control-in-sharepoint.html
http://weblogs.asp.net/bsimser/archive/2009/10/19/sharepoint-2010-what-s-new-ratings-spc09.aspx
Настройка страницы поиска:
http://blogs.technet.com/b/speschka/archive/2009/10/28/using-the-new-sharepoint-2010-ratings-feature-in-search.aspx
Использование компонента AverageRatingFieldControl
http://codename-srini.blogspot.com/2010/04/how-to-use-rating-control-in-sharepoint.html
понедельник, 9 января 2012 г.
Проверка исходящей почты SharePoint 2010 PowerShell
$site = New-Object Microsoft.SharePoint.SpSite("http://yoursite/") $web = $site.OpenWeb("RelativePathOf/TestSite/") $sent = [Microsoft.Sharepoint.Utilities.SpUtility]::SendEmail($web,0,0,"yourTestMail@yourdomain.com", "Test mail subject","test mail body") $sent
http://abstractspaces.wordpress.com/2010/08/13/check-sharepoint-mail-settings-using-powershell/
среда, 28 декабря 2011 г.
Creating custom PortalSiteMapProvider for SharePoint Portal 2010
This provider ables to remove navigation from Cities list and add items from Members list.
CustomNavigationDataProvide.cs
namespace SiteGroup.WebControls
{
public class CustomNavigationDataProvider : PortalSiteMapProvider
{
public override System.Web.SiteMapNodeCollection GetChildNodes(System.Web.SiteMapNode node)
{
PortalSiteMapNode portalNode = (PortalSiteMapNode)node;
SPQuery query = new SPQuery() { Query = "" };
{
public class CustomNavigationDataProvider : PortalSiteMapProvider
{
public override System.Web.SiteMapNodeCollection GetChildNodes(System.Web.SiteMapNode node)
{
PortalSiteMapNode portalNode = (PortalSiteMapNode)node;
SPQuery query = new SPQuery() { Query = "" };
// Remove nodes wich include in "Cities" list
SiteMapNodeCollection nodeCities = this.GetCachedListItemsByQuery(
portalNode.WebNode, "Cities", query, SPContext.Current.Web);
foreach (SiteMapNode nodeCity in nodeCities)
{
for (int nNodeIndex = coll.Count - 1; nNodeIndex >= 0; nNodeIndex--)
{
if (coll[nNodeIndex].Title == nodeCity.Title)
{
coll.RemoveAt(nNodeIndex);
}
}
}
// Add nodes to Members node
if (node.Title == "Members")
{
// PortalSiteMapNode portalNode = (PortalSiteMapNode)node;
//SPQuery query = new SPQuery() { Query = "" };
SiteMapNodeCollection listItemNodes = this.GetCachedListItemsByQuery(
portalNode.WebNode, "Members", query, SPContext.Current.Web);
coll = new SiteMapNodeCollection(listItemNodes.Count);
SPWeb web = SPContext.Current.Site.RootWeb;
Guid guidBank = web.Lists["Members"].ID;
foreach (PortalListItemSiteMapNode nodeList in listItemNodes)
{
PortalSiteMapNode nodeNew = new PortalSiteMapNode(
portalNode.WebNode,
string.Format("{0}_add", nodeList.Key),
Microsoft.SharePoint.Publishing.NodeTypes.ListItem,
nodeList.Url,
nodeList.Title,
nodeList.Description);
coll.Add(nodeNew);
}
return coll;
}
return coll;
}
}
} SiteMapNodeCollection nodeCities = this.GetCachedListItemsByQuery(
portalNode.WebNode, "Cities", query, SPContext.Current.Web);
foreach (SiteMapNode nodeCity in nodeCities)
{
for (int nNodeIndex = coll.Count - 1; nNodeIndex >= 0; nNodeIndex--)
{
if (coll[nNodeIndex].Title == nodeCity.Title)
{
coll.RemoveAt(nNodeIndex);
}
}
}
// Add nodes to Members node
if (node.Title == "Members")
{
// PortalSiteMapNode portalNode = (PortalSiteMapNode)node;
//SPQuery query = new SPQuery() { Query = "" };
SiteMapNodeCollection listItemNodes = this.GetCachedListItemsByQuery(
portalNode.WebNode, "Members", query, SPContext.Current.Web);
coll = new SiteMapNodeCollection(listItemNodes.Count);
SPWeb web = SPContext.Current.Site.RootWeb;
Guid guidBank = web.Lists["Members"].ID;
foreach (PortalListItemSiteMapNode nodeList in listItemNodes)
{
PortalSiteMapNode nodeNew = new PortalSiteMapNode(
portalNode.WebNode,
string.Format("{0}_add", nodeList.Key),
Microsoft.SharePoint.Publishing.NodeTypes.ListItem,
nodeList.Url,
nodeList.Title,
nodeList.Description);
coll.Add(nodeNew);
}
return coll;
}
return coll;
}
}
Creating Navigation module
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Control
Id="TopNavigationDataSource"
Sequence="40"
ControlClass="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapDataSourceSwitch"
ControlAssembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<Property Name="ID">topSiteMap</Property>
<Property Name="SiteMapProvider">CustomNavigationDataProvider</Property>
<Property Name="EnableViewState">false</Property>
<Property Name="StartFromCurrentNode">true</Property>
<Property Name="ShowStartingNode">true</Property>
<Property Name="TreatStartingNodeAsCurrent">true</Property>
<Property Name="TrimNonCurrentTypes">Heading</Property>
</Control>
</Elements>
<Control
Id="TopNavigationDataSource"
Sequence="40"
ControlClass="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapDataSourceSwitch"
ControlAssembly="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">
<Property Name="ID">topSiteMap</Property>
<Property Name="SiteMapProvider">CustomNavigationDataProvider</Property>
<Property Name="EnableViewState">false</Property>
<Property Name="StartFromCurrentNode">true</Property>
<Property Name="ShowStartingNode">true</Property>
<Property Name="TreatStartingNodeAsCurrent">true</Property>
<Property Name="TrimNonCurrentTypes">Heading</Property>
</Control>
</Elements>
web.config registration
<actions>
<add path="configuration/system.web/siteMap/providers">
<add name="LifeGlobalNavSiteMapProvider" description="" type="SiteGroup.WebControls.CustomNavigationDataProvider, SiteGroup, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ce31f39e24cadf59" NavigationType="Combined" EncodeOutput="true" />
</add>
</actions>
You need to activate feature with Navigation module.
пятница, 23 декабря 2011 г.
Как получить информацию о Feature SharePoint 2010
Get-SPFeature -Identity "ADV.Life_List instances" | Format-List
Пример
Get-SPFeature -Identity "SearchWebParts" | Format-List
PS C:\Users\Administrator.SP> Get-SPFeature -Identity "SearchWebParts" | Format-List Name : FeatureDefinition/eaf6a128-0482-4f71-9a2f-b1c650680e77 Id : eaf6a128-0482-4f71-9a2f-b1c650680e77 DisplayName : SearchWebParts SolutionId : 00000000-0000-0000-0000-000000000000 ReceiverAssembly : ReceiverClass : UIVersion : UpgradeReceiverAssembly : UpgradeReceiverClass : Properties : {} Version : 12.0.0.0 Scope : Site AutoActivateInCentralAdmin : False ActivateOnDefault : True RootDirectory : C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Template\FeaturesSearchWebParts Hidden : False ActivationDependencies : {} AlwaysForceInstall : False RequireResources : False DefaultResourceFile : Microsoft.Office.Server.Search TypeName : Microsoft.SharePoint.Administration.SPFeatureDefinition Status : Online Parent : SPFarm Name=SharePoint_Config Farm : SPFarm Name=SharePoint_Config UpgradedPersistedProperties : {}
среда, 7 декабря 2011 г.
Как убрать задержку при открытии выпадающего меню SharePoint
При открытии динамического подменю SharePoint 2010 на базе AspMenu возникает задержка при перемещении на другой пункт меню. Чтобы исправить это, достаточно добавить следующий стиль.
li.hover-off>ul
{
display:none;
}
см. также http://blog.voltje.be/?p=208
Подписаться на:
Сообщения (Atom)