Wednesday, November 9, 2011

System.IO.FileNotFoundException: Unable to find the specified file

When trying to edit the site permissions we see the following error in Log:

System.IO.FileNotFoundException: Unable to find the specified file

Solution: Configure alternate access mappings

Tuesday, August 23, 2011

How to deploy a SharePoint WSP


In our development world, especially with Visual Studio 2010 and SharePoint 2010, we have it very easy for deploying our solutions to SharePoint. As long as we have SharePoint installed on the same box as Visual Studio, we just right click the solution and deploy.
Moving into the real world though, you’ll quickly find that having Visual Studio 2010 on a production or staging environment is not always there. Somehow we have to get our project from source code, to an assembly, and then to SharePoint.
You may have asked:
  • How do I deploy a SharePoint 2010 Solution or WSP file?
  • How do I create my SharePoint 2010 WSP file?
  • Where is my SharePoint 2010 WSP file?
Let’s jump right in and answer those questions…

Assumptions

  • You have a Visual Studio 2010 SharePoint project set up and ready to go.
  • The project compiles.
  • Are able to use powershell.

Generating the WSP

The first step is to build your project. So, right click on your project/solution in Visual Studio and choose “Build.” Now depending on your configuration, you’re either going to be building to a debug or release directory. Whatever your scenario is, browse to that location on your hard drive (either of these two directorys will be located in C:\<Project Directory>\bin\<release or debug>.

There should be, at least, an assembly dll and your .wsp file. From this point onward, you’ll only need that .wsp file. For the sake of keeping things short, let’s move this file to a C:\deploy directory.

Adding the WSP

  1. Open the SharePoint 2010 Management Shell. You can get to this by going to Start > All Programs > Microsoft SharePoint 2010 Products > SharePoint 2010 Management Shell. Using this will automatically run PowerShell and set up the Microsoft.SharePoint.PowerShell snappin for us.
  2. Type Add-SPSolution c:\deploy\<solution file>.wsp
  3. You should now see a table like structure showing the solution name, its ID and that your solution has not yet been deployed…

Deploying the Solution

Deploying the solution is now taken care of by one command in PowerShell now called Install-SPSolution.
  1. Back in PowerShell, type:
    Install-SPSolution –Identity <solution file>.wsp –WebApplication http://<url> -GACDeployment
  2. You’re done. Verify that your assembly is the GAC (C:\windows\assembly) and then go activate any features you may have had in your solution.

Quick Overview

Here’s a quick overview of what we’ve learned with a few more tidbit commands you’ll probably need along the way:
  • Add Solution
    Add-SPSolution c:\<path>\<solution filename>.wsp
  • Deploy/Install Solution
    Install-SPSolution –Identity <solution file>.wsp –WebApplication http://<url> -GACDeployment
  • Update Solution
    Update-SPSolution –Identity <solution file>.wsp –LiteralPath c:\<path>\<solution file>.wsp –GACDeployment
  • Uninstall Solution
    Uninstall-SPSolution –Identity <solution file>.wsp –WebApplication http://<url>
  • Remove Solution
    Remove-SPSolution –Identity <solution file>.wsp

Need More?

Of course, I can’t include every possible iteration, scenario and permutation of your deployment process or strategy. If the above commands aren’t working for you, you’ll find some more detailed information about the commands here:


Thursday, June 16, 2011

How To Configure IIS SMTP Server To Forward Emails Using A Gmail Account (Smart Host)

This is very useful when you want to test your outgoing email for SharePoint but not have access to an SMTP server.
  1. Create and setup a Gmail account to use POP3
  2. Install the mail server role (POP3 and SMTP) 
  3. Configure the IIS Server to forward messages using that account:
    • IIS SMTP Virtual server -> Properties ->
      • Access Tab
      • Relay Button
    • You can specify only the servers that you want to be able to send email here by selecting Only the list below and adding your servers IP addresses.
      • Delivery Tab
      • Outbound Security Button
      • Select Basic Authentication and specify your Gmail account  and password. Check the TLS encryption. (If you use other SMTP server, it may not support TLS and cause error)
      • Outbound connections button
      • Set TCP port to 587 (This is Gmail port, default port should be 25)
      • Advanced Button
      • specify the smart host as smtp.gmail.com
    • Now configure the Outbound email in SharePoint to send email to the server where you have installed this SMTP server.

Wednesday, June 15, 2011

How to solve Missing Server Side Dependencies – 8d6034c4-a416-e535-281a-6b714894e1aa Error?

After installing SharePoint 2010, you may encounter “Missing Server Side Dependencies – 8d6034c4-a416-e535-281a-6b714894e1aa” error in SharePoint Cental Administration. It is a very weird error and there is no logical reason behind it. Until then here is the solution:
  • Navigate to SharePoint Central Administration Page
  • Click General Application Settings on left hand side Quick Launch bar
  • Under Search, click Farm Search Administration to open farm wide search administration page.

  • Now, under Search Service Application click Search Service Application

  • Now restart the server by executing iisreset -noforce command on command prompt. (or maybe try Reanalyze Now from Monitoring -> Review Problems and solutions first if it solved)
  • Thats it! You have solved the issue 
If you want to know the background of this issue then please read this post



Tuesday, June 14, 2011

SMTP Diagnostics

For testing SMTP server functionality, we have to follow some steps to identify that whether SMTP configured or not. Below are the steps we need to follow to check SMTP server functionality. We are using the command prompt telnet to test the server.

1. open command prompt and type :
telnet <servername> 25
Note: 25 is the port used by SMTP and <servername> is the SMTP server name.
After you hit enter you will get some output like
220 <servername> Microsoft ESMTP MAIL Service, Version: 6.0.3790.3959 ready at
Tue, 22 Jan 2008 09:10:27 -0600
It means you got response from the SMTP server and it's the clue that SMTP is setup on the server.

2. For testing response say helo to it.
Type :
helo <servername>
output:
250 <servername> Hello [IP Adress]

3. Now we need to enter the From address of the mail.
Type :
mail from: admin@domain.com
output:
250 2.1.0 admin@domain.com….Sender OK

4. It's time to enter the recepient email address.
Type : rcpt to: someID@domain.com
output:
250 2.1.5 someID@domain.com

5. Now we are left with the data of the email. i.e. subject and body.
Type : data
output:
354 Start mail input; end with <CRLF>.<CRLF>

6. Type:
subject: this is a test mail
Hi
This is test mail body
I am testing SMTP server.

7. Hit Enter, then . and then Enter.
output:
250 2.6.0 <<servername>C8wSA00000006@<servername>> Queued mail for delivery
8. Type: quit
output:
221 2.0.0 <servername> Service closing transmission channel

If you did everything as explained, you will get a mail soon.

Thursday, June 2, 2011

Install FAST Search Server 2010 for SharePoint

Install FAST Search Server 2010 for SharePoint (TechNet)
http://technet.microsoft.com/en-us/library/ff381243.aspx

Installation And Configuration Of FAST Search Server for SharePoint 2010
http://blogs.msdn.com/b/spses/archive/2010/04/09/installation-and-configuration-of-fast-search-server-for-sharepoint-2010.aspx

Create and set up the Content Search Service Application (FAST Search Server 2010 for SharePoint) (TechNet)
http://technet.microsoft.com/en-us/library/ff381261.aspx

[Lync Server 2010] Prerequisite installation failed: msspeech_sr_en-us_tele



During 'Lync Server 2010 Deployment Wizard' - 'Setup or Remove Lync Server Components'


Problem:
Prerequisite installation failed: msspeech_sr_en-us_tele

Solution:
Just uninstall that particular language pack from programs and features(they are all listed in there), then re-run setup

Friday, May 6, 2011

SharePoint Configuration Wizard Failing - RPC Server is unavailable



If you encounter this issue, it is clear that your SP machine is unable to get the credentials verified with the Active Directory.

  • Try ipconfig /flushdns - and if it still does not work, do ipconfig /registerdns
Or,
  • Use domain user to login windows for configuration wizard

Register new managed account problem

When i try to register managed account it is showing me the following error and not possible to create the managed account

The specified user 'accountname' is a local account. Local accounts should only be used in stand alone mode.

Solution:
If you are trying to add a new managed account using a local account, you can perform this task via PowerShell.



Right click on SharePoint 2010 Management Shell > Run as Administrator
In the PowerShell window - type: $cred = Get-Credential
You will be prompted to enter an account and password (here you can type in a local account)
Back in the PowerShell window - type: New-SPManagedAccount -Credential $cred
Even though the warning appears, the account is added.

soap:Server was unable to process request. Value does not fall within the expected range

There is error message when we try to edit page using SharePoint Designer:


soap:Server was unable to process request. Value does not fall within the expected range

Solution

  • Use IP instead of Hostname, or
  • Avoid using 'localhost', or
  • Configuring alternate access mapping (not tested yet)

This data source cannot be used because performancepoint services is not configured correctly

If you’re setting up a fresh installation of Performance Point Services 2010 , you might think that all has gone well only to see the above error in Dashboard Designer once you try to start creating scorecards and reports. This is actually quite common – it seems there are a few extra steps to do before you can start using PPS 2010. 



1) Set up the Unattended Service Account. 

Go to the Central Administration page ( on Sharepoint ). Under Application Management , click on Manage Service Applications. Then click on Performance Point Service Application , then Performance Point Service Application Settings. We need to configure the Unattended Execution Account. This is the account that PPS will use to connect to the data source (unless you use Per User Identity , but thats another story ). If you’ve never seen this page before , there are some interesting options there. Once you set this up and hit Apply. It might be successful, or it might give you another error…. 


2) The Unattended Service Account cannot be set for the service application.
The Secure Store Service key might not have been generated or properly refreshed
after the service was provisioned.

Performance Point uses Secure Store Service to store the password for the Unattended execution account. If you get this error, you need to check that a key has been generated for the Secure Store Service. Once again , go to the Central Administration page, and under Application Management , click on Manage Service Applications. Now click on Secure Store Service. Click on Generate New Key. Once that is done, you can go back to set the Unattended Execution Account on the other page , and Dashboard Designer should then work fine. 

Microsoft SharePoint Workspace 2010

SharePoint in Pain English

SharePoint My Sites - No link back to main page

When your organization uses SharePoint My Sites – one of the first things your users will probably ask is how come there is no link back from My Site to SharePoint main page. Since My Site sits in it's own site collection, it's parallel to the root site collection and hence there is no link by default. However, there is an easy way to add it globally for everyone. Also, users can add their own individual links to their personal site (My Content site).

As a My Site site collection administrator – here is how you would add a link to everyone's My Site top nav bar:

1. Go to Central Administration on your farm.
2. Under "Application Management" click "Manage Service Applications"
3. Click on User Profile Service Application
4. Under "My Site Settings" click on "Configure Personalization Site"
5. Click "New Link"



6. Enter necessary Info
7. Press OK


Create a site using Business Intelligence Center template

How to enable this template? Make sure SharePoint version is Enterprise (not Foundation nor Standard)

Note: to compare SharePoint edition's feature, plese refer to http://sharepoint.microsoft.com/en-us/buy/Pages/Editions-Comparison.aspx

Activate "PerformancePoint Services Site Collection Features"
Site Actions -> Site Settings -> Site Collection Administration -> Site Collection features -> Activate "PerformancePoint Services Site Collection Features"



Able to see the "Business Intelligence Center" template, but when try to create, system show error: An unexpected error has occurred

Because the BI Center requires the Publishing infrastructure, so we also need to activate "SharePoint Server Publishing Infrastructure"

Site Setting of your site collection -> Site collection Admin -> Site Collection Admin Features -> Active "SharePoint Server Publishing Infrastructure"

SharePoint 2010 Single Server Complete Install

If we choose "Standalone" option for SharePoint 2010 installation, although the server already have SQL Server 2008 R2 installed, but SharePoint will still install SQL 2008 Express for us

If we choose "Server Farm" and then "Complete" install, when come to Configuration Wizard, we will get error message like "Local accounts should only be used in stand alone mode"

To overcome this problem, we need to use "SharePoint 2010 management shell" (in the same locations as the central admin link)

Under the Start Menu, browse to "Microsoft SharePoint 2010 Products". Right-click on "SharePoint 2010 Management Shell" and choose "Run as administrator"
(Notice: Since we have not created a farm yet, the shell will load with error that the local farm is not accessible. This is expected.)

Simply type "New-SPConfigurationDatabase" and press enter



Please provide new database name, database server (computer name), and passphrase.
"Passphrase" is new password for you to manage your farm later
Notes:
If anything fails, close and reopen PowerShell (SharePoint 2010 management shell)
Use your servername in the FarmCrentials section (ServerName\Username)

Next, open again "SharePoint 2010 Product Configuration Wizard" to complete the installation