Friday, July 5, 2013

How to show/hide ribbon and quick launch in SharePoint 2010?

Environment: Project Server / SharePoint 2010

Issue:
In one of my clients, we are using BI Center as a part of PWA (Project Server 2010) environment to create few dashboards for our executives. We want to show those dashboards on Executive site using Pager Viewer web part. The issue started when it showed the ribbon and quick launch on the Page viewer web part (See Fig – A). The goal was showing only the dashboard contents using excel, performance Point, SSRS and Visio services.

                                                                 Fig-A

Solution:

Please use the following steps to hide both the ribbon and quick launch bar.

1. Put the following script into a text file using notepad.

Script:
<style type="text/css">
#s4-ribbonrow, .ms-cui-topBar2, .s4-notdlg, .s4-pr s4-ribbonrowhidetitle, .s4-notdlg noindex, #ms-cui-ribbonTopBars, #s4-titlerow, #s4-pr s4-notdlg s4-titlerowhidetitle, #s4-leftpanel-content {display:none !important;}
.s4-ca{margin-left:0px !important; margin-right:0px !important;}
</style>

2. Upload it to any document library (accessible via the All Site Content page).
3. Add a Content Editor Web part on the page where you want to hide the ribbon and quick launch bar
3. Go to Content Editor Properties
4. Point to the correct URL of the file on the Content Editor Web part – Content link text.
5. To hide the Web part from normal view, under Layout Section Tick the Hidden Check box and Click OK.

After following the above steps, you will see the following page without Ribbon and Quick Launch

                                                                      Fig-B

Note:
At this stage, you can’t edit the page in normal fashion as all the Ribbon options have been hidden. In case you want to edit existing web parts or add a new web part, you can put the following script on the URL address to open this page on ‘Edit page’ mode.

javascript:MSOLayout_ToggleLayoutMode()



How to hide only Quick Launch in a SharePoint page?

Please use the same instructions as mentioned above except the script. Please use the following script to accomplish this task and in result, only quick launch will be hidden as shown in Fig- 3 below

Script:

<style>

#s4-leftpanel{
display:none
}
.s4-ca{
margin-left:0px
}
</style>

 

                                                               Fig -3

Friday, April 12, 2013

Unable to open a project schedule from MS Project 2010 in Project Server environment – Schedule opening issue!

Environment: Project Professional 2010 SP1/ Project Server 2010
Issue:

One of my lead scheduler brought up an issue in accessing her schedule using MS Project Professional in Project server environment. When she tries to open a specific schedule on server, she gets the following error
She confirmed me that all other schedules have no issue at all but this one. She was not able to close this window as it freezes the MS Project Pro application. She first tried to kill MS Project application in Windows Task Manager but could not do that and eventually she killed Project (Winproj.exe) from process tab.

When I tried to see the exact error, it showed me the following error that does not help much.

Solution:
The first thing I checked if I am able to see project schedule in PWA (web client). I had no issue in opening that schedule in PWA. 
Initially I tried to restore the last saved specific project schedule from server. I was able to restore with 100% without any issue. I tried again to open the schedule from MS Project client; I got the same error mentioned above so this trick did not help much. Scheduler confirmed that she had no issue when she opened this schedule 2 days ago.
After doing a few tricks, I found the following steps worked for me and my scheduler was able to open the schedule this time without any issue.
Steps:
1-      Login to PWA
2-      Go to Project Center and click the affected schedule link
3-      Click ‘Project Details” PDP link and click ‘Edit’ button from Ribbon to edit project level custom fields.
4-      Click ‘Save’ button to save the project’s custom project fields.
5-      Close and check in the project schedule.
And bingo, scheduler was able to open her schedule without any issue. It looks like something happened during the last saving or publishing process that blocked communication between client and server and caused that issue. After saving the schedule from PWA, it removed all the blocks in the communication with server.

Friday, December 21, 2012

Adding a new DMZ WFE server to an existing internal SharePoint/Project Server 2010 farm (Tips and Tricks)


Environment: SharePoint / Project Server 2010 /SQL Server 2008 R2


Scenario:

My client requested to expose our existing internal SharePoint/Project Server (EPM) environment outside of the firewall to access the environment from internet. The proposed solution should be addressed not only for our internal corporate users but also for our external members or partners. Those external members should not have the same internal domain (Domain1) designated for internal employees.

Infrastructure:

Our infrastructure is composed of one WFE sever, one Application server and a SQL server cluster environment. Both WFE and App server are virtual servers. SQL Server is a physical server.

We are adding a new WFE server that resides on DMZ (outside of the firewall) on different domain (Domain2). We established one way trust from Domain 2 to Domain 1 so the additional DMZ WFE server will recognize Domain 1 user’s authentication. Our users will access the environment with https (SSL certificate)


Steps:

Following steps are very important (with the sequence) to get it setup based on my successful implementation experience.

1-    Install all the pre-requisite software components including SQL Management studio, Configuration Manager, Analysis Mgmt object (AMO) for OLAP cube etc.
2-    Work with your Firewall team to open the following ports before starting the actual installation

Source                       Destination                    Rule

DMZ WFE Server             SQL Server                      TCP/IP: 9914   (as per DBA)
IP address                         IP address

DMZ WFE Server             APP Server                      TCP: 32844 (https)
IP address                        IP address                        TCP: 32843 (http)

DMZ WFE Server             APP Server                      TCP: 445 (https) (for SMB)
IP address                        IP address                        UDP: 445 (http)

Internet                             DMZ WFE Server             TCP: 443 (SSL)
                                         IP address



3-    Make sure your server support department has created a DNS that is pointing to external IP address (DMZ WFE Server)
4-    Install both SharePoint and Project Server binaries (don’t SharePoint Wizard now)
5-    Install Service pack (SP1) and exactly the same Cumulative updates (CU) you have on the other existing internal WFE and APP server (don’t run SharePoint Wizard)
6-    In SQL Configuration manager, create DB client Alias. Make sure you use the same Alias name what you have used in the current existing environment. It is very important otherwise your setup SharePoint Wizard will be failed in step # 3.
7-    You can use SharePoint Auto-installer script to automate step 4 – 6. The script can be found in Codeplex (but not required).
8-    Once the new DMZ WFE server is joined to an existing farm, complete the following process

·         Go to SharePoint Central Admin site
·         Extend the Web Application you want to expose outside. This is very important step otherwise you can’t access any sites except the main root site.
·         Make sure you put correct host name (AppName.companydomain.com) and port 443 to access application site via https.
·         Go to DMZ WFE server, open IIS and apply SSL certificate. Make sure you apply SSL certificate on ALL the internal WFE server. It is important.

9-    After completing all the above steps, you should be able to access your application from outside with both domains (Domain1 and Domain2).



Issues/ Limitations /Solutions:


1-   Project Server 2010 Synchronization Failed:

To establish one way trust between two domains, can only resolve SharePoint authentication issue but Project server Sync will not work and not recognize Domain2 AD groups or users. SharePoint and Project server are totally different logic. SharePoint depends on NT account, but Project Server needs Display name of the user’s account so if the nearest global catalog does not have all info; it will not be able to fetch all the information. You must establish two way trust to make it work.


In my case, my company policy does not allow to establish two way trusts for security reasons. In that way, PWA sync process can’t work. We had very limited external users (with Domain2) who plan to use PWA access. The work around is as below

·         Go to Central Admin site
·         Go to Services on server
·         Select your new added DMZ WFE Server
·         Start the Project Application service
·         Now you can add Domain2 Users in PWA manually.

2-   Search is not working when accessing SharePoint sites from Internet:

To make it work, follow the below steps…

·         Go to Central Admin site
·         Click Manage Service application
·         Click Search Service application
·         Under ‘Search Application Topology’ section, click ‘Modify’ button
·         Click ‘New’ >> ‘Indexed partition and query component’ option
·         Select DMZ WFE Server, associated existing search database, update the query path and click OK.
·         The above steps will run ‘SharePoint Server Search” service on DMZ WFE server
·         You should be able to search your contents now.


I hope all the above steps will help to setup your infrastructure properly and error free. Please leave any comments if you want to share.

Tuesday, August 7, 2012



Environment: SharePoint 2010 / Powershell

Issue:

I have been asked by a colleague about an issue in SharePoint 2010 Management Shell command prompt. The issue was how to use loop(for e.g. For each loop) in this command prompt to print names of a document list library within a SharePoint site. 


Solution:

Here is an example. The trick is that once you complete your statement and close your parenthesis then press TWO enters to get your output (see below). Users only click one time to get result and think it is not working. 



#================================================================================
# The following cmdlets use Foreach loop on Powershell cmd prompt with a condtion to show only PDF file #
#===============================================================================#

PS C:\Users\epmadminproc_d> $SPWeb = Get-SPWeb -identity  http://site/pws/projectsite1
PS C:\Users\epmadminproc_d> $SDlist = $SPWeb.Lists["Site Documents"]
PS C:\Users\epmadminproc_d> $view = $SDlist.Views["All Documents"]
PS C:\Users\epmadminproc_d> $Items = $SDlist.GetItems($view)
PS C:\Users\epmadminproc_d> foreach ($Item in $Items){
>> if ($Item.name.Contains("pdf")) { write-host $Item.name}}
>>
Bobcat CW5 Milestone Schedule_V1.1.pdf
Bobcat Project Summary Schedule.pdf
PS C:\Users\epmadminproc_d>

Environment: SharePoint 2010 



Powershell cmdlets have been become so popular for Administrators and Developers in the SharePoint 2010 world to automate your process and update the existing current SharePoint environments. You can use the same SharePoint object model and can do a lot of work using Powershell scripts without using Visual Studio. In this post, i am trying to give some most common examples/scenarios for those who are new in PowerShell to give an idea how cool and helpful this tool is in the SharePoint 2010.



Examples:

For Help:

Use Get-Help verb with the available cmdlets i.e.





For Site collections/Sites:










  For Lists or Document library:







If you have any comments or questions, please drop a line.

Happy Powershell scripting!

Monday, July 30, 2012

Incoming email feature stopped working after migrating to SharePoint 2010


Environment: SharePoint 2010 

Issue:

After migrating to SharePoint 2010 from SharePoint 2007, the incoming email stopped working and not anymore able to accept any invitation and showing on the Calendar web part. No specific event in Application log or SharePoint log file. After a couple of hour’s investigation, we figured it out the following steps to get it work.


Solution:

Please use the following steps as mentioned below…

1- Go to Calendar list
2- On the Ribbon, select List from the tab and click List Settings
3- Under Communication, click Incoming e-mail settings (see attached screenshot below)



4- In "Incoming E-mail" section, select "Allow this list to receive e-mail?" to “No” and save it.
5- Go back to same Incoming e-mail setting screen, select "Yes" this time and save it.

Then I sent an invitation from Outlook and wola - it worked fine and showed my invitation on Calendar this time. It looks like this setting was not saved properly during the migration even though apparently, everything looks ok and configured correctly.

Note: I will recommend creating a Powershell script batch file to open all sites calendar list and fix it as mentioned above i.e. turning off and on the specific property and avoid manually updating each site's calendar. It would be a big hassle if you have hundreds of sites created.

Thursday, July 5, 2012

Critical Error (Error ID: 6398) in Application log (SharePoint 2010)

Environment: Project Server /SharePoint 2010 

Issue:
The other day i was monitoring our Production servers and found multiple critical errors with the same Error ID in Application log file as shown below


Solution:
If you get this error on around 4:30 AM on daily basis then this is related to Microsoft's Customer Experience Improvement Program aka CEIP. To get it resolve, you have two options as mentioned below.

1- Under Customer Experience Improvement Program select "No, I don't wish to participate" checkbox. You can fix it in the following locations

a) In the Central Admin, go to each Web application within the farm, select the mentioned checkbox available in General Settings option (present on the ribbon section)

b) If the above step does not work then you may need to stop the relavant Timer job service.

For details, you can see the following good blogpost to get this issue fix.

http://ianankers.wordpress.com/2011/08/19/sharepoint-2010-the-execute-method-of-job-definition-microsoft-sharepoint-administration-spsqmtimerjobdefinition-threw-an-exception-event-id-6398/
Hope it helps!