Thursday, August 28, 2008

Sharepoint Imports URL

1. KPI and DashBoard - http://office.microsoft.com/home/video.aspx?assetid=ES102632271033&width=884&height=540&startindex=0&CTT=11&Origin=HA102549161033

2. All Sharepoint Videos- http://office.microsoft.com/en-us/sharepointserver/CH102066971033.aspx?stt=1

3. SharePoint Training URL - http://www.sharepoint-videos.com/

4. Virtual Labs - http://www.microsoft.com/sharepoint/learning/virtual.mspx

Wednesday, August 27, 2008

Add Custom aspx page to Moss 2007

Step 1: Installed application project extension
(Already installed skip step 1)

Step 2: Open Visual Studio 2005 and select Web Application
Project as shown below,

Step 3: Name the project “FirstWebProject”.

Step 4: Delete Default.aspx page Or Rename the Default.aspx and
add new Web Page Or rename the web page name it to “FirstCustomePage.aspx”.

Step 5: You can design this page as you want. Once you are done
with designing run the application once to make sure that there is no error.

Step 6: Now go to the file path where you have created the Web
Application.
file path is “c:\chirag\VortalProject”. You have to copy the DLL file from web
application’s BIN folder to share point site’s BIN folder.

Step 7: To Find BIN folder for your share point site, go to IIS and
select your share point site. Right click on the site name and click on Open.

Step 8: This will open physical location where you site resides.
Copy web application’s DLL file (In my case “FirstWebProject.dll”)
in BIN directory of SharePoint site.

Step 9: Now create a new folder at same level where your SharePoint
site’s BIN directory resides. Name is “CustomePage”. Add the
“FirstCustomePage.aspx” page to “CustomPage” folder.

Step 10: Open Web.Config file of Share Point site and copy safe control
tag shown below to Web.Config file.

TypeName=”*” />
If you have chosen different namespace and assembly names
than you have to use your name instead of this.
You have completed 90% of the task.

Step 11: The last thing is, you have to add tag in share point
site’s Web.Config file. You need to set trust level to “WSS_Medium”
policyFile=”C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\config\wss_mediumtrust.config” />
Here you have completed all the required configurations!!!!

Step 12: Now open your share point site in browser and check for newly added page.
In our case the link will be
http://wscepios99:PortNo/CustomePage/FirstCustomePage.aspx
If you have done all the changes as mentioned above you can see your page running
fine in browser.

Add Server Admin Templates & Site Admin Templates to the SharePoint Server 2007

Server Admin Templates:

Server admin templates are created as site definitions, providing tighter integration and enhanced functionality within the Windows SharePoint Services platform. They will require a server administrator to install.
If you do not have Central Server Admin rights, you can still install the site admin templates (see second list below) in the sites/workspaces that you own or administrate
· Absence Request and Vacation Schedule Management
· Help Desk
· Budgeting and Tracking Multiple Projects
· Inventory Tracking
· Bug Database
· IT Team Workspace
· Call Center
· Job Requisition and Interview Management
· Change Request Management
· Knowledge Base
· Compliance Process Support Site
· Lending Library
· Contacts Management
· Physical Asset Tracking and Management
· Document Library and Review
· Project Tracking Workspace
· Event Planning
· Room and Equipment Reservations
· Expense Reimbursement and Approval Site
· Sales Lead Pipeline


Site Admin Templates:

Site admin templates are easy for site administrators to install in a template gallery without requiring server administration access.
· Board of Directors
· Employee Training Scheduling and Materials
· Business Performance Rating
· Equity Research
· Case Management for Government Agencies
· Integrated Marketing Campaign Tracking
· Classroom Management
· Manufacturing Process Management
· Clinical Trial Initiation and Management
· New Store Opening
· Competitive Analysis Site
· Product and Marketing Requirements Planning
· Discussion Database
· Request for Proposal
· Disputed Invoice Management
· Sports League
· Employee Activities Site
· Team Work Site
· Employee Self-Service Benefits
· Timecard Management


Installing a template:
1. Before installing a server admin template, you must first install the Application Template Core solution, ApplicationTemplateCore.wsp.
(Click here to download). If you have already installed this solution, proceed to Step 2.
1. Pull the core file, ApplicationTemplateCore.wsp, from the extracted distribution. The core solution file will be added to the solution store, a table in the Windows SharePoint Services configuration store that holds solution files.

2. Via command line, run stsadm -o addsolution -filename \ApplicationTemplateCore.wsp

3. Next, run stsadm -o deploysolution -name ApplicationTemplateCore.wsp -allowgacdeployment(Additional attributes may be required based on your Windows SharePoint Services configuration. For example:Single Server: [ -local | -time


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "AbsenceVacationSchedule.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ApplicationTemplateCore.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name
"ApplicationTemplateCore" -allowgacdeployment -immediate –force

call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\BudgetingTrackingMultipleProjects.wsp"
call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "BudgetingTrackingMultipleProjects.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\BugDatabase.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "BugDatabase.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\CallCenter.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "CallCenter.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ChangeRequest.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ChangeRequest.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ComplianceProcessSupport.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ComplianceProcessSupport.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ContactsManagement.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ContactsManagement.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\DocumentLibraryReview.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "DocumentLibraryReview.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\EventPlanning.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "EventPlanning.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ExpenseReimbursementApproval.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ExpenseReimbursementApproval.wsp" -allowgacdeployment -immediate -force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\HelpDesk.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "HelpDesk.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\InventoryTracking.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "InventoryTracking.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ITTeamWorkspace.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ITTeamWorkspace.wsp" -allowgacdeployment -immediate –force

call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\JobRequisition.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "JobRequisition.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\KnowledgeBase.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "KnowledgeBase.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\LendingLibrary.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "LendingLibrary.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\PhysicalAssetTracking.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "PhysicalAssetTracking.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\ProjectTrackingWorkspace.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "ProjectTrackingWorkspace.wsp" -allowgacdeployment -immediate –force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\RoomEquipmentReservations.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "RoomEquipmentReservations.wsp" -allowgacdeployment -immediate -force


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o addsolution -filename "C:\temp\SalesLeadPipeline.wsp"


call "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe" -o deploysolution -name "SalesLeadPipeline.wsp" -allowgacdeployment -immediate -force


Run the batch file.


Reset IIS.


Now go to Site Action and click Create Site.

You will see list of server admin templates inside "Application Templates" tab

Add Server Admin Templates & Site Admin Templates to the SharePoint Server 2007

Server Admin Templates:
Server admin templates are created as site definitions, providing tighter integration and enhanced functionality within the Windows SharePoint Services platform. They will require a server administrator to install.
If you do not have Central Server Admin rights, you can still install the site admin templates (see second list below) in the sites/workspaces that you own or administrate
· Absence Request and Vacation Schedule Management
· Help Desk
· Budgeting and Tracking Multiple Projects
· Inventory Tracking
· Bug Database
· IT Team Workspace
· Call Center
· Job Requisition and Interview Management
· Change Request Management
· Knowledge Base
· Compliance Process Support Site
· Lending Library
· Contacts Management
· Physical Asset Tracking and Management
· Document Library and Review
· Project Tracking Workspace
· Event Planning
· Room and Equipment Reservations
· Expense Reimbursement and Approval Site
· Sales Lead Pipeline

Site Admin Templates:
Site admin templates are easy for site administrators to install in a template gallery without requiring server administration access.
· Board of Directors
· Employee Training Scheduling and Materials
· Business Performance Rating
· Equity Research
· Case Management for Government Agencies
· Integrated Marketing Campaign Tracking
· Classroom Management
· Manufacturing Process Management
· Clinical Trial Initiation and Management
· New Store Opening
· Competitive Analysis Site
· Product and Marketing Requirements Planning
· Discussion Database
· Request for Proposal
· Disputed Invoice Management
· Sports League
· Employee Activities Site
· Team Work Site
· Employee Self-Service Benefits
· Timecard Management


Installing a template:
1. Before installing a server admin template, you must first install the Application Template Core solution, ApplicationTemplateCore.wsp.
(Click here to download). If you have already installed this solution, proceed to Step 2.
1. Pull the core file, ApplicationTemplateCore.wsp, from the extracted distribution. The core solution file will be added to the solution store, a table in the Windows SharePoint Services configuration store that holds solution files.

2. Via command line, run stsadm -o addsolution -filename \ApplicationTemplateCore.wsp

3. Next, run stsadm -o deploysolution -name ApplicationTemplateCore.wsp -allowgacdeployment(Additional attributes may be required based on your Windows SharePoint Services configuration. For example:Single Server: [ -local -time

Add Quick Links using Custom Code

try
{
// Get the Site Collection using SPSites
SPSite quickLaunchSite = new SPSite("Top Level Site Name");
using (quickLaunchSite)
{
// Sharepoint have high security Code.
// So we can use to AllowUnsafeupdates keyword to overwrite the security. quickLaunchSite.AllowUnsafeUpdates = true;
//Find the Particular site and open the site using SPWeb
SPWeb quickLaunchWeb = quickLaunchSite.OpenWeb();
using (quickLaunchWeb)
{
quickLaunchWeb.AllowUnsafeUpdates = true;
// Read the Quick Launch Bar Nodes using SPNavigationNodeCollection SPNavigationNodeCollection quickLaunchNodes = quickLaunchWeb.Navigation.QuickLaunch;
// Read the Internal Quick Launch bar Manu Items using SPNavigationNode SPNavigationNode internalMenuItem = new SPNavigationNode("Top Level Sites", "", false);
// Add First Menu to the Quick Launch Bar
quickLaunchNodes.AddAsFirst(internalMenuItem);
// Add Tech Support Sub Manu items to the Quick Launch Bar
SPNavigationNode externalSubMenuItem1 = new SPNavigationNode("IT", "http://ServerName/sites/TechSupport/default.aspx", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem1);
// Add Sales Opreation Sub Manu items to the Quick Launch Bar
SPNavigationNode externalSubMenuItem2 = new SPNavigationNode("HR", "HR SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem2);
// Add Tech Engineering Sub Manu items to the Quick Launch Bar SPNavigationNode externalSubMenuItem3 = new SPNavigationNode("MARKETING", "MARKETING SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem3);
// Add IT Sub Manu items to the Quick Launch Bar
SPNavigationNode externalSubMenuItem4 = new SPNavigationNode("DEVELOPMENT", "DEVELOPMENT SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem4);
// Add Marketing Sub Manu items to the Quick Launch Bar
SPNavigationNode externalSubMenuItem5 = new SPNavigationNode("TESTING", "TESTING SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem5);
// Add Sales Sub Manu items to the Quick Launch Bar
SPNavigationNode externalSubMenuItem6 = new SPNavigationNode("SUPPORTS", "SUPPORTS SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem6);
// Add Senior Management Sub Manu items to the Quick Launch Bar SPNavigationNode externalSubMenuItem7 = new SPNavigationNode("MANAGEMENT", "MANAGEMENT SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem7);
// Add Tech Support Sub Manu items to the Quick Launch Bar
SPNavigationNode externalSubMenuItem8 = new SPNavigationNode("USERS", "USERS SITE NAME", true);
quickLaunchNodes[0].Children.AddAsFirst(externalSubMenuItem8);
//Finally Update menu and sub menus to Quick Launch Bar
quickLaunchWeb.Update();
}
}
}
catch (SPException x)
{
Response.Write(x.Message.ToString());
}

Add my Links using Custom Code

1. Create aspx page and add ASP button to this page. (aspx)
2. Copy the below mention code and paste to Button click events (aspx.cs)
3. Copy the aspx and aspx.cs file and paste to the _layout folder. (IIS --> 80 --> _layout--> Open)
4. Run the custom page through IIS
try
{
#region Basic Declaration
string strTitle = string.Empty;
string sLinkUrl = string.Empty;
string strGroup = string.Empty;
Microsoft.Office.Server.UserProfiles.UserProfile oUserProfile = null;
UserProfileManager upm = null;
SPSite site = null;
ServerContext server = null;
#endregion

#region Open SSP Site and Security Settings
site = new SPSite("SSP Website URL");
SPWeb myWeb = site.OpenWeb();
// Allow to Custom Updation
myWeb.AllowUnsafeUpdates = true;
server = ServerContext.GetContext(site);
upm = new UserProfileManager(server, false);
#endregion
// Assign the User Name
string sAccount = "Domain Name" + "\\" + "Account Name".ToString();
// Assign the Title
strTitle = "Title Name".ToString();
strWorkspace = "Title".ToString();
// Assign the Site URL
sLinkUrl = "Web Site URL";
strGroup = "General";
if (!upm.UserExists(sAccount))
{
// User Profile Not Exist means we need to create the user profile upm.CreateUserProfile(sAccount);
// Get the userprofile
oUserProfile = upm.GetUserProfile(sAccount);
QuickLinkManager qlm = oUserProfile.QuickLinks;
// Add my links to Sharepoint Personal Sites
QuickLink q1 = qlm.Create(strTitle, sLinkUrl, QuickLinkGroupType.General, strGroup, Privacy.Private); oUserProfile.Commit();
Response.Write("Account Created & My Links Added Successfully");
}
else
{
// Get the userprofile
oUserProfile = upm.GetUserProfile(sAccount);
QuickLinkManager qlm = oUserProfile.QuickLinks;
// Add my links to Sharepoint Personal Sites
QuickLink q1 = qlm.Create(strTitle, sLinkUrl, QuickLinkGroupType.General, strGroup, Privacy.Private);
oUserProfile.Commit();
Response.Write("My Links Added Successfully");
}
}
catch (Exception ex)
{ throw ex;
}