PeopleEditor peoplePick = new PeopleEditor();
protected override void CreateChildControls()
{
peoplePick.AllowEmpty = false;
peoplePick.AllowTypeIn = true;
peoplePick.BrowseButtonImageName = "Search";
peoplePick.CheckButtonImageName = "Validate User";
peoplePick.ErrorMessage = "No Names Found";
tdPeoplePicker.Controls.Add(peoplePick);
//this.Controls.Add(peoplePick);
base.CreateChildControls();
}
protected void btnSave_Click(object sender, EventArgs e)
{
foreach (string ent in peoplePick.CommaSeparatedAccounts.Split(','))
{
if (ent.Length > 0)
{
PeerReviewGroup_Employee objPeerEmp = new PeerReviewGroup_Employee();
objPeerEmp.EmpID = Utility.GetNullableInt(GetSelectedUserIDsByName(ent));
objPeerEmp.GroupID = int.Parse(ddlPeerGroup.SelectedValue);
PeerReviewGroup_EmployeeService.Save(objPeerEmp);
}
}
}
Thursday, June 23, 2011
Monday, April 25, 2011
How to kill a remote session using command
Step 1. Gain enough privilege to kill RDP connection on the server.
net use \\servername_or_IP /USER:username “password“
Step 2. List the connection to a particular server and get session ID.
query session /server: servername_or_IP
Step 3. Reset the session which you don’t need using ID of the session got from previous step
net use \\servername_or_IP /USER:username “password“
Step 2. List the connection to a particular server and get session ID.
query session /server: servername_or_IP
Step 3. Reset the session which you don’t need using ID of the session got from previous step
reset session [sessionID] /server:servername_or_IP
Monday, April 11, 2011
Configure Drop-off Library in SharePoint 2010
Sometimes we need to have a common place to upload documents by a clerk & store data in correct data repository without his/her intervention. we can have a "Drop Off Library" and created "Rule", then documents will be stored relevant document library. we don't have to give permission for different users to upload documents to different libraries. It is with SharePoint 2010 :)

Finally we can see, the uploaded document is stored in "SDB Quotations" library. No copy is maintained in "Drop Off Library" . It is simple :)
Wednesday, April 6, 2011
SharePoint 2010 Recycle bin settings
There are 2 types of recycle bin in SharePoint. Even user deletes an item it will be stored in "Recycle Bin" of admin's. We can set a time period to keep those files in Admin's recycle bin. We can give a quota to recycle bin of normal users as well as admins.
It is also possible to set maximum file size that can be stored in SharePoint. Since all data stored in DB, it is recommended to store medium size files in SharePoint.

Wednesday, March 16, 2011
Configuring SharePoint 2010 in a Farm environment for Development
(1) Creating hyper-v machines
a. Create a hyper-V machine with Windows server 2008 R2
b. After installation is completed install service pack(s) if any
c. Go to à /Windows/System32 àSearch “sysprep.exe”
d. Run it and select “Shutdown options” in the dropdown
e. Get a copy of .vhd file & save it for future use as a BASE DISK
(2) Configure a new “AD server” using BASE DISK
(3) Create a new “SQL server” using BASE DISK
(4) Add “SQL server” to AD
(5) Configure SQL server 2008 R2 64 bit
a. Install it with native mode
b. Add “AD admin” user group when installing SQL
(6) Install latest service pack (if any)
(7) Create “SharePoint server” using BASE DISK
(8) Adding server to AD
(9) Check network configuration of ALL servers
a. All servers in 1 domain
b. IP address in static mode
c. DNS of servers match with IP of AD server IP
(10)Disable firewall in all servers before link each servers
(11)Install SharePoint foundation 2010 pre-requisites
a. Web Server (IIS) role
b. Application Server role
c. Microsoft .NET Framework version 3.5 SP1
d. SQL Server 2008 Express with SP1
e. Microsoft Sync Framework Runtime v1.0 (x64)
f. Microsoft Filter Pack 2.0
g. Microsoft Chart Controls for the Microsoft .NET Framework 3.5
h. Windows PowerShell 2.0
i. SQL Server 2008 Native Client
j. Microsoft SQL Server 2008 Analysis Services ADOMD.NET
k. ADO.NET Data Services Update for .NET Framework 3.5 SP1
l. A hotfix for the .NET Framework 3.5 SP1 that provides a method to support token authentication without transport security or message encryption in WCF.
m. Windows Identity Foundation (WIF)
(12)Run 10 step SharePoint technology wizard
(13)Install TFS
a. Use a domain admin account to install TFS
b. Use “Network Service” as service account when configure TFS
c. RAM in TFS server should be > 2 GB
d. Firewall should be disabled
(14)Accounts that used
a. SQL == ESPMS\admin
b. SharePoint install = ESPMS\administrator
c. SharePoint wizard == ESPMS\spfarmadmin
Thursday, February 24, 2011
Complex LINQ query with outer joins and customized columns
using (VonQuestDBDataContext context = new VonQuestDBDataContext())
{
var lines =
from P in context.VQPlayers
join T in context.VQPlayerTippings on P.VQPlayerID equals T.VQPlayerID into T_t
from T in T_t.DefaultIfEmpty()
join MT in context.MatchTeams on T.MatchTeamID equals MT.MatchTeamID into T_mt
from MT in T_mt.DefaultIfEmpty()
join G in context.VQGames on P.VQGameID equals G.VQGameID into T_g
from G in T_g.DefaultIfEmpty()
join Te in context.Teams on MT.TeamID equals Te.TeamID into T_te
from Te in T_te.DefaultIfEmpty()
join U in context.Users on P.UserID equals U.UserID into T_u
from U in T_u.DefaultIfEmpty()
join Mate in context.Matches on MT.MatchID equals Mate.MatchID into T_Mate
from Mate in T_Mate.DefaultIfEmpty()
join R in context.Rounds on Mate.RoundID equals R.RoundID into T_r
from R in T_r.DefaultIfEmpty()
where (G.VQGameID == vqGameID && R.RoundID==roundID
orderby P.VQPlayerID
select new { User = U.UserName, MatchID = Mate.MatchID == null ? "" : Mate.MatchID.ToString(), ChosenTeam = Te.TeamName == null ? "(NONE)" : Te.TeamName, };
dgvTippings.DataSource = lines;
dgvTippings.Columns[0].HeaderText = "User Name";
dgvTippings.Columns[1].HeaderText = "Match ID";
dgvTippings.Columns[2].HeaderText = "Chosen Team";
}
Monday, February 21, 2011
Change the query string values in C#
// reflect to readonly property
PropertyInfo isreadonly = typeof(System.Collections.Specialized.NameValueCollection).GetProperty("IsReadOnly", BindingFlags.Instance | BindingFlags.NonPublic);
// make collection editable
isreadonly.SetValue(this.Request.QueryString, false, null);
this.Request.QueryString.Remove("playermode");
this.Request.QueryString.Add("playermode", "editinitialselection");
// make collection readonly again
isreadonly.SetValue(this.Request.QueryString, true, null);
Saturday, January 29, 2011
Services in SharePoint 2010
(1) Access services
(2) Business data connectivity
(3) Excel services application
(4) Search service application
(5) State service
(6) Usage & health data collection
(7) User profile service application
(8) Visio graphics service
(9) Web analytics service application
(10) Word automation service
The new services are in GREEN
The new services are in GREEN
Sunday, January 16, 2011
Best Practices in SharePoint Development
- When user creates a Webpart the UserControl should be placed in ~/ControlTeamplates folder
- To identify SharePoint content within VS 2010
- Server Explorer à SharePoint Data Connections à Lists, Tasks, Calendar
- Server Explorer à SharePoint Data Connections à Lists, Tasks, Calendar
- To add a workflow feature
- Template/1033/Workflows (can do using VS 2010 navigation)
- Template/1033/Workflows (can do using VS 2010 navigation)
- After create a feature
- Rename chanaka.wsp as chanaka.wsp.cab
- Open as zip file
- Check about automatically created,
- Public key
- Solution id
- Feature id
- Public key
- Rename chanaka.wsp as chanaka.wsp.cab
- When want to add Images to SharePoint portal
- Right click on solution VS 2010 server explorer
- Add à Sharepoint "Images" Mapped Folder
- It will be placed in (14 hive) SharePoint root à TemplateàImages
- Right click on solution VS 2010 server explorer
- When we add a SPI (SharePoint Project Item) it will creates (Eg:- A Webpart name as chanaka)
- Element.xml (List ID, URL, Property Name, Webpart group)
- Chanaka.webpart (Name / Description)
- Chanaka.feature (Better to set Scope = "Site" )
- New UI in VS 2010 to work with
- Manifest.xml
- Dependencies
- SPI View
- Manifest.xml
- Connect as a Event Receiver
- Right click on feature name in VS
- Add a Event Receiver
- Write the logic in one of event (Eg:- Feature Activated)
- Right click on feature name in VS
- Element.xml (List ID, URL, Property Name, Webpart group)
Sunday, January 9, 2011
Visual Studio 2010 with SharePoint Development
When talking about SharePoint 2007 with Visual Studio 2008 we had tedious process to do development in sharepoint.
- No direct way to do "Debugging"
- Had to attach W3WP.exe process manually
- Had to copy images / usercontrols to 12 hive manually
- Had to add safe control entries in web.config manually
- Specific SharePoint templates & SharePoint items
- Project includes separate properties & assemblies sections same as normal VS project
- Items can be categorized into
- Features (It comes with design mode, XML definition and activation)
- Packages (It comes with design mode, XML definition)
- Features (It comes with design mode, XML definition and activation)
- Project includes separate properties & assemblies sections same as normal VS project
- Migration tools
- SharePoint explorer (Also we can use "Mapped Folder" concept directly with 12 hive)
- Direct debugging
- One click deployment
- Default (have to activate manually)
- No activation
- Default (have to activate manually)
What it does when we press F5 (in a SharePoint project)
- Builds a new assembly
- Packages project into .WSP file
- Deactivate/ Uninstall feature (if installed before)
- Delete old .WSP file
- IIS Reset
- Deploy new .WSP file
- Activate feature (Using site URL that we given when creating SharePoint project)
Subscribe to:
Posts (Atom)







