Tuesday, March 22, 2011

WCF: Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http]

Hi All,
I was getting this error while running a WCF service using net.tcp binding. In most of the blogs you will find that adding a binding for net.tcp will resolve this problem which is important too but you have to also check Enabled Protocols for the website as well as for the virtual directory if net.tcp is mentioned there or not.
If now please add:
http,net.tcp

And here you go. Your service will start working fine.

But in general, please make sure to check following settings:
1.app.config
2.Make sure that WCF activated for http and non-http by going to features under server manager in Windows 2008 R2.
3.Bindings
4.Enabled Protocols

Thanks...Hope it helps someone else also.

Saturday, March 12, 2011

SP 2010 Power Shell - The term 'Get-SPSite' is not recognized as the name of a cmdlet

You may see error while executing sharepoint commandlets on your machine. For example if you are trying to execute a simple commandlet as:
Get-SPSite
You may see below error:
The term 'Get-SPSite' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:11
+ Get-SPSite <<<<
+ CategoryInfo : ObjectNotFound: (Get-SPSite:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException


To resolve this error just run following command to your powershell snapin:
Add-PSSnapin Microsoft.SharePoint.Powershell