Search This Blog

Wednesday, May 6, 2015

What is difference between WCF Vs ASMX Web Services

WCF Services provides all the capabilities of .Net Web Services and further extend it. Simple and basic difference is that ASMX web service is designed to send and receive messages using SOAP over HTTP only. While WCF service can exchange messages using any format (SOAP is default) over any transport protocol (HTTP, TCP/IP, MSMQ, NamedPipes etc.).


ASMX Webservices is simple but limited in many ways as compared to WCF Service.



§  ASMX web services can be hosted only in IIS whileWCF service has all the following hosting options:
§  IIS
§  WAS (Windows Process Activation Services)
§  Console Application
§  Windows NT Services
§  WCF provided Host
§  ASMX web services support is limited to HTTP while WCF supports HTTP, TCP, MSMQ, NamedPipes.
§  ASMX Security is limited. Normally authentication and authorization is done using IIS and ASP.NET security configuration and transport layer security. For message layer security, WSE can be used.
WCF provides a consistent security programming model for any protocol and it supports many of the same capabilities as IIS and WS-* security protocols, additionally, it provides support for claim-based authorization that provides finer-grained control over resources than role-based security. WCF security is consistent regardless of the host that is used to implement WCF service.
§  Another major difference is that ASMX web services uses XmlSerializer for serialization while WCF usesDataContractSerializer which is far better in performance than XmlSerializer.
Key Issues with XmlSerializer in serializing .NET types to xml are:
§  Only public fields or properties of the .NET types can be translated to Xml.
§  Only the classes that implement IEnumerable can be translated.
§  Classes that implement IDictionary, such as Hashtable cannot be serialized.

Reference: http://www.topwcftutorials.net/2012/06/wcf-vs-asmx-web-services.html

SharePoint 2013 Software Links

SharePoint 2013 Software Links!!

Windows Server 2012    : http://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2012
SharePoint Server 2013  : https://technet.microsoft.com/en-in/evalcenter/hh973397.aspx
SQL Server 2012 SP1    : http://www.microsoft.com/en-in/download/details.aspx?id=35575  (Click on Download and select  SQLServer2012SP1-FullSlipstream-ENU-x64.iso )
SharePoint Designer 2013   : http://www.microsoft.com/en-in/download/details.aspx?id=35491


Monday, April 13, 2015

5 Questions You Must Ask Yourself at the End of Each Day

Most of us are so tired by the time we get to bed that we fail to reflect upon the day that has passed us by. The benefits of a little self-introspection cannot be over-stated. Whether it is knowing how far behind you are from achieving your goals to simply being aware of your everyday life, taking time for yourself can benefit you in manifold ways. Start doing this exercise from today and ask yourself these questions every night to see the difference.

1. What did I do today?

Our lives are such a busy mess that trying to filter productive work from wasted time becomes an important point to ponder upon at the end of each day. Unless you know how exactly you spent your time today you will continue to work haphazardly through your days, eventually getting frustrated and adding stress to your life. Ask yourself what you did and you should be able to see your day flow in chronological order for you to make sense of it.

2. What did I learn today?

Unless you learnt something that you didn't know, consider your day wasted. There is so much to learn and know about in our lives that you should have at least one Eureka moment every day. If you don't have them regularly subscribe to informative videos on YouTube or read a helpful Wikipedia page or just catch up on your professional field to see what the latest news on the sector is. Knowledge will set you free and take you ahead in life.

3. What made me laugh?

If you had a few moments of laughter in your day today, then savour them once again by thinking about them. Try to figure how you can have such moments each day. Unless you can laugh at something or someone's jokes, your day will seem dull and boring. Ensure that you spend a few minutes laughing even if it means watching your favourite 'FRIENDS' episode one more time!

4. What was I grateful for?

Find happiness in little things. Be grateful for the cab driver who did not crib about you not having change. Be grateful for your commute allowing you to reach work on time. Be grateful for your partner's call reminding you how much they love you. There is more to be grateful for than to crib about in our lives. Being grateful will in turn lead you to have better relationships and less stress in life

5. Did I move closer to my goal?

First things first. If you don't have a goal in life then think hard about it and write it down. Think big like owning your house in South Mumbai or travelling the world. Now, every night, before you go to sleep, ask yourself honestly if you did anything to move closer to your dream. This is the best question you can ask yourself to stay motivated and work relentlessly towards your goals.

Wednesday, April 1, 2015

New Childran's Money Back Policy 2015 - LIC

LIC’s New Children Money Back – Plan Table No. 832 (Launched on 4th March 2015)
LIC’s New Children’s Money Back Plan is a non-linked, with-profit, regular premium payment money back plan specially designed to meet various financial needs of children through Survival Benefits. It provides for the risk cover on the life of child during the policy term and number of survival benefits on surviving to the end of the specified duration’s.
Basic Features of New Children’s Money Back Plan (Table No 832)
  • Minimum Age at Entry: 0 Years (Last Birthday)
  • Maximum Age at Entry: 12 Years (Last Birthday)
  • Proposer’s age :
    • Minimum – 18 years
    • Maximum – 55 years
  • Min Sum Assured : 1 Lac
  • Max Sum Assured : No limit
  • Sum Assured Rebate:
    • upto 1.90 L = Nil
    • 2 to 4.90 L = Rs 2/-
    • 5 L & above = Rs 3/-
  • Mode : All modes
  • Mode rebate :
    • YLY- 2%
    • HLY- 1%
  • Policy Term : 25 minus age i.e. 25 – Age
    • eg. Child’s age is 4 years then Policy term will be 25-4=21 Years
  • Premium Term : 18 minus age
    • eg. Child’s age is 4 years then Premium term will be 18-4=14 Years
  • PWB available (Premium Waiver Benefit Rider)
  • Maturity for below Child Age
    • At 18 = 20% of SA
    • At 20 = 20% of SA
    • At 22 = 20% of SA
    • At 25 = 40% of SA + Bonus+ Final Additional Bonus
  • Date of commencement of risk under the planIn case the age at entry of the Life Assured is less than 8 years, the risk under this plan will commence either one day before the completion of 2 years from the date commencement of policy or one day before the policy anniversary coinciding with or immediately following the completion of 8 years of age, whichever is earlier. For those aged 8 years or more, risk will commence immediately.
  • Surrender ValueThe policy can be surrendered at any time during the policy term provided premiums have been paid for full three years.
  • LoanLoan facility is available under this plan after the payment of premiums for at least three full years and after obtaining the declaration from the proposer to the effect that loan is raised for the benefit of the minor life assured.
  • Suicide ClauseThis policy shall be void
  • 1. If the Life Assured (whether sane or insane) commits suicide at any time within 12 months from the date of commencement of risk, the Corporation will not entertain any claim under this policy except for 80% of the premiums paid excluding any taxes and extra premium, if any, provided the policy is in force. This clause shall not be applicable in case age at entry of the Life Assured is below 8 years.
  • 2. If the Life Assured (whether sane or insane) commits suicide within 12 months from date of revival, an amount which is higher of 80% of the premiums paid till the date of death (excluding any taxes and extra premium, if any,) or the surrender value shall be payable. The Corporation will not entertain any other claim under this policy. This clause shall not be applicable:
    1. in case the age of the Life Assured is below 8 years at the time of revival; or
    2. for a policy lapsed without acquiring paid-up value and nothing shall be payable under such policies.
  •  

Tuesday, March 31, 2015

Sukanya Samriddhi Account Calculator Sheet

Yearly lump sum Investment– 1.5 Lac (Starting of year)
Rate of Interest – 9.2%
Note: Government of India announced ROI 9.2% for 2015-16 Financial Year
Investment Period – 14 years
Maturity Amount – 80 Lac
Assumption: – Sukanya Samriddhi Account is opened on birth of girl child. Age -1 Year.

View Calculations from below link.

Monday, March 30, 2015

New SharePoint 2016 Update Model



SP 2016 Preview would be out soon, Pl go through the below article for SP 2016 improvements for SharePoint Administrators and New SharePoint 2016 Update Model

Thursday, March 26, 2015

SharePoint 2010 14 hive Template Directory



SharePoint 2010 14 hive Template Directory
TEMPLATE folder is one of the very most important folder in SharePoint, Template folder resides templates, pages, masterpages etc... We will check the breakdown structure of directory and what each folder is meant for in SharePoint. Understanding this folder structure is important to get clear picture on, how and where SharePoint will house our deployed items.
TEMPLATE Directory
TEMPLATE directory path
[root directory]:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE
SharePoint 2010 TEMPLATE directory image as below

1033
This sub-directory contains templates for various documents, XML files, and workflows.
This number corresponds to the language localization for English.
If SharePoint is installed with other languages being primary, the number will be different.
Refer 
http://technet.microsoft.com/en-us/library/ff463597.aspx for other language pack numbers
Admin
The ADMIN sub-directory contains ASP.NET server pages that correspond to administrative
tasks. Most of them will be accessed through the Central Administration site.
CONTROLTEMPLATES
This is one of the common sub-directory used by many. This contains ASP.NET user controls that are utilized by SharePoint. Also while SharePoint customization, folders will be deployed to house the project related files.
For example: If we create any visual web parts the user controls will be deployed as folders in this sub-directory.
DocumentTemplates
The only thing stored in this directory is the standard ASP.NET server page for wikis.
FEATURES
The FEATURES sub-directory contains 250+ folders, which represent the core features of SharePoint 2010. Each of these folders contain a Feature.xml file, which identifies to SharePoint 2010 several characteristics such as the identity, scope, resources and manifest location of the feature. SharePoint customization deployed as features will be deployed to this sub-directory.
GLOBAL
This sub-directory houses the standard ASP.NET master pages that deploy with SharePoint
2010, such as the v4, default, and minimal master pages. Also here are global templates for site definitions, views, and schema for list templates.
IDENTITYMODEL
This sub-directory contains default login pages for the different types of authentication
models, such as Forms, Windows, Trust, Login and Card.
IMAGES
This sub-directory houses all of the standard images for the SharePoint product.
If you have images deployed as part of customized solutions, by default they will
be deployed as sub-folders of this sub-directory.
LAYOUTS
The LAYOUTS folder is the folder that contains a large portion of the ASP.NET server
pages that are used in the SharePoint product.
You can reference this directory from within a SharePoint site by using a format similar to the following: http://mysite/_layouts/viewlsts.aspx
Pages
Only three ASP.NET server pages are stored in this folder, named form, viewpage,
and webfldr.
Scenarios
This sub-directory contains wizard-style pages, used in some of the different services
with greater complexity, such as BCS, Profile Service Application, and joining the
farm with a particular web server.
Site Templates
This sub-directory contains the site templates for the different built-in SharePoint
2010 web templates.
SQL
This sub-directory contains SQL table creation scripts for tables associated with
various types of SharePoint 2010 databases. Many of the services database creation
scripts are here, such as the UsageDB, the Diagnostics DB, and Configuration DBs.
Also stored here are upgrade scripts to upgrade from a SharePoint 2007 solution
to a SharePoint 2010 solution.
THEMES
This sub-directory houses the 23 built-in themes or looks that are installed with
SharePoint 2010.
XML
The XML sub-directory contains XML schema and document files related to various
configurations in SharePoint.
Conclusion
Hope this post gave good information on SharePoint 2010 file system TEMPLATE Folder.

Add Fields To SharePoint List with PowerShell in SharePoint 2010 (Part2)



This blog includes how to create lookup fields, checkbox field, person or group field and hyperlink field. With this coverage the most common and frequent tasks related to SharePoint 2010 list with PowerShell will be now easier.
 Adding lookup field
$errorlabel=$falsetry
 {
 $TestSiteUrl = "http://XXXXXXXX:XXXX/sites/XXXX"
 $NewWebobj = Get-SPWeb -identity $TestSiteUrl
 $newListName = "ProductList"
 $newListDescription = "Product Information"
 $listTemplate = [Microsoft.SharePoint.SPListTemplateType]::GenericList
 $lstId = $NewWebobj.Lists.Add($ListName,$ListDescription,$ListTemplateType)
 write-host "list " $newListName " created successfully" $newListName -ForegroundColor Green
 $listUrl = $NewWebobj.ServerRelativeUrl + "/lists/" + $newListName;
 $myCustomList = $NewWebobj.GetList($listUrl)#get the lookup list ID
 $lookupListName = "MyLookupList"
 $LookulistUrl = $NewWebobj.ServerRelativeUrl + "/lists/" + $lookupListName;
 $lookupListObj = $NewWebobj.GetList($LookulistUrl)
 $lookupListId = $lookupListObj.ID#adding column of type 'lookup'

$fieldXml = "<Field Type='Lookup' DisplayName='LookupCol1' List='{" + $lookupListId + "}' ShowField='Title'
RelationshipDeleteBehavior='None' Name='LookupCol1'/>"
$myCustomList.Fields.AddFieldAsXml($fieldXml,$true,
[Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)

$fieldXml2 = "<Field Type='Lookup' DisplayName='LookupCol2' List='{" + $lookupListId + "}' ShowField='Title'
               Indexed='True' RelationshipDeleteBehavior='Restrict' Name='LookupCol2'/>"
$myCustomList.Fields.AddFieldAsXml($fieldXml2,$true,
[Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)

$fieldXml3 = "<Field Type='Lookup' DisplayName='LookupCol3' List='{" + $lookupListId + "}' ShowField='Title'
Indexed='True' RelationshipDeleteBehavior='Cascade' Name='LookupCol3'/>"
$myCustomList.Fields.AddFieldAsXml($fieldXml3,$true,
[Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)

$myCustomList.Update()
 }
 catch
 {

write-host "Error" $_.exception
 $errorlabel = $true
 }
 finally
 {
 if($NewWebobj -ne $null) {$myTestWeb.Dispose()}

if($errorlabel -eq $true){exit 1}
 else {exit 0}
 }

exit 0

Above code creates a custom list with three types of lookup columns.
Need to Considering only the snippet from the above code
$fieldXml = "<Field Type='Lookup' DisplayName='LookupCol1' List='{" + $lookupListId + "}' ShowField='Title'
RelationshipDeleteBehavior='None' Name='LookupCol1'/>"
$myCustomList.Fields.AddFieldAsXml($fieldXml,$true,
[Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)

$lookupListId is the ID of the list to which the lookup column belongs to
RelationshipDeleteBehavior=’None’ states that if the column in the actual list is deleted; then all other lists which are referring that column will be orphaned. So,the data will be there in other lists that referred this column, but no more relation.
In other lookup fieldxmls, we have used RelationshipDeleteBehavior with ‘Restrict‘ and ‘Cascade
RelationshipDeleteBehavior=’Restrict’ states that if we try to delete the column in the actual list; then SharePoint will restrict to delete unless all the data with lookup references are removed first.
RelationshipDeleteBehavior=’Cascade’ states that if we try to delete the column in the actual list; then SharePoint will delete all the referenced data where ever this column is used as lookup column.
It will give us warning if we want to continue the delete the operation or not
We have another way of creating lookup column. Infact I prefer creating columns with xml string, because it gives overview of complete properties what the list has.
$myCustomList.Fields.AddLookup("Title",$lookupListId,$false)
#set all other properties like we do in c#

Adding field of type ‘Checkbox’

Creating field of type ‘Checkbox’
$fldXml = "<Field Type='Boolean' DisplayName='chkBoxCol1' Name='chkBoxCol1'>
           <Default>1</Default>
           </Field>"
$myCustomList.Fields.AddFieldAsXml($fldXml,$true,Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)
The above code will create checkbox field in the list with default values as checked.
1 this makes checkbox checked by default
0 this makes checkbox unchecked by default

Adding field of type ‘People or Group column’

$fldXml = "<Field Type='User' DisplayName='PersonCol1' List='UserInfo' ShowField='ImnName'
UserSelectionMode='PeopleOnly' UserSelectionScope='0' Name='PersonCol1'/>"
$myCustomList.Fields.AddFieldAsXml($fldXml,$true,Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)

The above code will create people and group column ‘PersonCol1′ which allows only user(people) values but not user group names.
Setting UserSelectionMode=’PeopleAndGroups’ will allow user group values.
There are other possible values which can be set for ShowField attribute -
Title, NameWithPicture, NameWithPictureAndDetails, ImnName (this is NameWithPresence)

Adding field of type ‘Hyperlink’

$fldXml = "<Field Type='URL' DisplayName='HyperlinkCol1' Format='Hyperlink' Name='HyperlinkCol1'/>"
$myCustomList.Fields.AddFieldAsXml($fldXml,$true,Microsoft.SharePoint.SPAddFieldOptions]::AddFieldToDefaultView)

The above code will create Hyperlink column ‘HperlinkCol1′.
The property Format can have other value ‘Image
Reference:
http://adicodes.com/adding-fields-to-list-with-powershell-in-sharepoint-2010-part2/