Posts

Showing posts from 2017

SMTP Configuration

Image
To install the SMTP service Verify that the user account that is performing this procedure is a member of the Administrators group on the front-end web server. Click Start , point to Administrative Tools , and then click Server Manager . In Server Manager, click Features . In Features Summary , click Add Features to open the Add Features Wizard. On the Select Features page, select SMTP Server . In the Add Features Wizard dialog box, click Add Required Roll Services , and then click Next . On the Confirm Installation Selections page, click Install . On the Installation Results page, ensure that the installation is complete, and then click Close . To Configure SMTP Server: 1.       Click Start , point to Administrative Tools , and then click Internet Information Services (IIS) 6.0 Manager . 2.       In IIS Manager, expand the server name that contains the SMTP ser...

Create Result source using Power Shell SP2013 Search service

Add-PSSnapin Microsoft.SharePoint.PowerShell $ssa = Get-SPEnterpriseSearchServiceApplication $fedman = New-Object Microsoft.Office.Server.Search.Administration.Query.FederationManager($ssa) $searchOwner = Get-SPEnterpriseSearchOwner -Level Ssa # define query $query = '{searchTerms} path:"http://hmecd000125v:8014/sites/MobileApp/Lists/Residential Property" (contentclass:STS_List)" (contentclass:STS_List) IsActive:True' $queryProperties = New-Object Microsoft.Office.Server.Search.Query.Rules.QueryTransformProperties # create result source $resultSource = $fedManager.CreateSource($searchOwner) $resultSource.Name = 'SampleResidential1' $resultSource.ProviderId = $fedManager.ListProviders()['Local SharePoint Provider'].Id $resultSource.CreateQueryTransform($queryProperties, $query) $resultSource.Commit() Delete All items in List write-host "This will delete data, type YES to continue" $retval = read-host if ($retval...
Sharepoint Powershell Basis To Enable SharePoint cmdlets in powerShell: Add-PSSnapin "MIcrosoft.SharePoint.PowerShell" 1. Sample SharePoint cmdlets Get-SPWebApplication => to displat all webapplication Get-Command -PSSnapin "Microsoft.SharePoint.PowerShell" | format-table name =>show all commands Get-SPSite "http://senthil-pc:8010/*" Get-SPWeb -site http://senthil-pc:8010/sites/site2 Get-SPSite "http://senthil-pc:8010/*" | Get-SPWeb|Select Title Get-SPUser -Web "http://senthil-pc:8010" Get-SPFeature -Limit ALL | Where-Object {$_.Scope -eq "http://senthil-pc:8010"} 2. Create a web application $name = "Web Application Created using Powershell" $port = 20000 $url = "http://senthil-pc" $appPoolName = "SP Default App Pool" $appPoolAccount = Get-SPManagedAccount "senthil-pc\Administrator" New-SPWebApplication -Name $name -Port $port -URL $url -Applicati...

Dependency Injection (DI)

Dependency Injection (DI) Introduction The dependency injection pattern one of the most popular design paradigms today. It is process of removing dependency of object which creates the independent business objects. It is very useful for Test Driven Development. Background This tip presents an overview of the dependency injection pattern, the different types of dependency injection, and the advantages and drawback of DI with c# source code examples. Scenario of Object Dependency Object dependency means one object needs another object to execute properly, in multitier application (Presentation Tier, Business Logic Tier and Service Tier), the very common scenario is; Presentation Tier dependent on Business Logic and Business Logic requires different services on the basis of end user selection. For instance for Insurance domain, different services could be like ClaimService , AdjudicationService , and PaymentService . If we need some property of Payment service th...

C# Basic

Image
Extension Method in C# Introduction Extension methods are a new feature in C# 3.0. An extension method enables us to add methods to existing types without creating a new derived type, recompiling, or modify the original types. We can say that it extends the functionality of an existing type in .NET. An extension method is a  static  method to the existing  static class. We call an extension method in the same general way; there is no difference in calling. Feature and Property of Extension Methods  The following list contains basic features and properties of extension methods: It is a  static  method. It must be located in a  static  class. It uses the " this " keyword as the first parameter with a type in .NET and this method will be called by a given type instance on the client side. It also shown by VS intellisense. When we press the dot (.) after a type instance, then it comes in VS intellisense. An extension method should be ...