Wednesday, August 8, 2012

Install App for SharePoint Failed to install App for SharePoint

When I am trying to install the App this error encountered.

"Error occurred in deployment step 'Install App for SharePoint' Failed to install App for SharePoint"

Solution:
Please make sure the App Management Service and Subscription Service are running. To fix it, [You should need FARM administrator access]

From browser:
Go to Central Administration -> Services on Server and start both.

Through Powershell:
Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"} | Start-SPServiceInstance

Tuesday, August 7, 2012

Install App for SharePoint-There were errors when validating the App Package

While installing the App from Visual Studio 2012, I was getting the below error

"Error occurred in deployment step 'Install App for SharePoint' There were errors when validating the App Package"

And checked everything what could be the possible mistakes I have made. And couldn't able to figure out what was the issue. I have googled  and checked everything by going through all XML files and removed all content from the App project I have written. But, still no luck.

After 2 days, I am going through the MSDN articles on Apps documentation and found below information.

Ensure that your app manifest has an element instead of property. Otherwise, you might encounter this error when trying to deploy your app by using Visual Studio.

And another scenario you might get this error is due to app image. This information I found from internet that make sure the app image size should be 96 width and 96 height.

Sunday, August 5, 2012

Uninstall App for SharePoint' Value cannot be null. Parameter name value - Error occurred in deployment step

While working with SharePoint 2013 developing and deploying app you may see this error couple of times in the deployment process. From Visual Studio 2012  when you try to deploy the app from project properties and deploy option then the app will be deploys to SharePoint and install to the site given. In some cases, the app will be deployed but will not install correctly. In this case you have to retract and re-install the app again.

When you try to redeploy the app, it tries to retract the app and it fails with below error:

"Error occurred in deployment step 'Uninstall App for SharePoint' Value cannot be null. Parameter name value."

The solution is: from the "Site Contents" option of the SharePoint site, click remove from the App available options. If it is not successful then retry to remove the app again. It should be removed successfully this time. Now, try to redeploy again from Visual Studio. It should deploy fine with no issues.

Saturday, August 4, 2012

Outlook.com looks cool

Outlook.com the new email from Microsoft. The new features, UI everything looks very cool and nice. I personally feel I should recommend to everyone. Another advantage is you can link all Microsoft emails like hotmail.com, msn.com accounts to it. (Everything comes under one).

Try it today for yourname@outlook.com. Hurry. :)

SharePoint site is not developer site - SharePoint 2013 deployment error

This is the first error I got when tried to deploy my first app to SharePoint 2013 environment. Full details:

"Installation of app to SharePoint failed: SharePoint site is not a developer site."

This not giving any full details about why it is failing. Below are the things I verified to resolve the error.

  1. Please make sure the site is available from your developer environment [Where visual studio 2012 is installed]
  2. I have created my default site [when I created my SharePoint 2012 preview environment] as http://sp15 with publishing template. When tried to deploy this site it was failing. So, I thought of creating another site collection with different settings. When I go to Central Administration, create a new site collection, under Collaboration tab of create site page I found a new option named "Developer Site" template. So, I have created the site collection in the same web application with this template with the url http://sp15/sites/dev. This time I have tried to deploy the app to new SharePoint site and it was successful. 
I am not understanding why the issue is resolved as the developer site template did the trick? More information I will post in the same post soon. Do let me know if you have any more details.

Friday, August 3, 2012

Creating first SharePoint 2013 App

I was playing with SharePoint 2013 when preview was released and the first week gone through all UI, central administration features. After read the documentation, MSDN articles I was interesting to create my first SharePoint App.

Prerequisites:
  • We need Visual Studio 2012 to create your SharePoint 2013 App.
  • SharePoint Developer tools for Visual Studio 2012. If any else missing from installation install all from here like WIF SDK, Workflow Tools, Client Components etc..
  • Permissions to SharePoint site.
So, I have installed all of them and so enthusiastic to see my first app in SP2013. Created a new project in VS 2012 and selected my SharePoint 2013 site and SharePoint host App option. It's created below files as shown.

From project options [right click on solution or project, choose deploy] select deploy to deploy it to SharePoint site. It was not successful and end up with below errors in different trails. If you are getting anyone of the below errors please go through the related solutions and then proceed further steps.
Before you start developing App, the first thing we should do is, set up the environment for SharePoint Apps. This include below steps.
  1. Start SharePoint Administration Service and SharePoint timer Service. 
  2. Start App Manager Service and Subscription Settings Service.
  3. Create application pool for both services
  4. Associates the application pools to the services.
  5. Create database for each service to save the service specific information.
  6. Set appDomain for running apps.
  7. Set the app site subscription name [which comes as prefix in the app web url.]
Open the command prompt and execute the commands one by one to follow all the above 7 steps.
#Step 1
net start spadminv4
net start sptimerv4
#Step 2
Get-SPServiceInstance | where{$_.GetType().Name -eq "AppManagementServiceInstance" -or $_.GetType().Name -eq "SPSubscriptionSettingsServiceInstance"} | Start-SPServiceInstance
#Step 3
$account = Get-SPManagedAccount "domain\farm account"
$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account
$appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account
#Step 4 and 5
$appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName SettingsServiceDB
$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool $appPoolAppSvc -Name AppServiceApp -DatabaseName AppServiceDB
$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc
#Step 6
Set-SPAppDomain appdomain
#Step 7
Set-SPAppSiteSubscriptionName -Name "app" -Confirm:$false
Note: The appDomain should be your application domain. Full qualified domain is preferable. And please make sure you are replacing the string "domain\farm account" with your actual farm account user.

If all the commands ran successfully without any issues then you are ready to create and deploy your first app to the SharePoint environment. Let me know if there are any issues.

Wednesday, August 1, 2012

SharePoint 2013 - Apps overview

Apps for SharePoint are self-contained pieces of functionality that extend the capabilities of a SharePoint website. Which means an App may include list, library, pages, workflow, a remote web application etc. The new Cloud App Model enable us to create Apps. Apps will be accessed from "Site Contents" page.

For example, we have to see every day the conversions from one currency to another currency for doing business then every time we have to go to web and open some site and then find the information. Instead if we have an App available to do this job of converting one currency to another currency mapping then we can simply do that inside the SharePoint site without going out of the site.

Important points to remember:
  • An app is a web application. So, if you know how to create a web application then you can create an App. It's that simple.
  • You can develop the app in any language you know like PHP, .NET, JavaScript, HTML etc.
  • App can connect any source like internal or external web services through ODATA protocol support in SharePoint 2013.
  • They can use REST [Representational State Transfer], client API's like JavaScript client API or .NET managed client API to integrate/connect app with SharePoint.
  • We can use all API's which SharePoint 2013 provides in Apps to read SharePoint data and utilize it to process the requirements. [Basically with ease of access we can read data from SharePoint and utilizing it in our App for different processing scenarios which is a huge advantage when compared to previous versions.]
  • The client.svc service we used in SharePoint 2010 for accessing the SharePoint data. Now, we don't need this to call client.svc end point and instead we can directly call the SharePoint 2013 service using the url /_api/ to read SharePoint data. For example, to call search service we can directly use /_api/search to call list data /_api/web/lists/ etc.
  • Using ASMX calls are deprecated.
Where can we host Apps?

1. SharePoint Store
SharePoint Store is owned and hosted by Microsoft. Developers can develop the custom apps around the world and can submit to SharePoint Store. So that any user can be able to download and install them. They can purchase apps if it is not free and buy licenses etc.

2. App Catalog
App Catalog is specific to any organization, where the apps are developed and owned by specific organization. It can be either on on-premises or SharePoint online hosted.

As I already mentioned each App will be a web application. SharePoint 2013 uses the App manifest metadata to identify the App and it will be registered to SharePoint. The sample manifest file will looks like below.
 
<?xml version="1.0" encoding="utf-8" ?>
<App xmlns="http://schemas.microsoft.com/sharepoint/2012/app/manifest"
     Name="My First SharePoint App"
     ProductID="{6c442cc4-0968-4f75-b664-2cbae5d5a6ca}"
     Version="1.0.0.0"
     SharePointMinVersion="15.0.0.0">
  <Properties>
    <Title>My First SharePoint App</Title>
    <StartPage>~appWebUrl/Pages/Default.aspx?{StandardTokens}</StartPage>
  </Properties>
  <AppPrincipal>
    <Internal />
  </AppPrincipal>
</App>
You can include authentication [app principles] and more details in the app manifest files. The string "StandardTokens" is replaced at run time to pass some context data like SharePoint language etc. See more details about App manifest here.

Apps hosting options
  • Cloud hosted: This type of hosting is used when app has at least one remote component. It may also include SharePoint hosted components. There are two types in Cloud hosted apps.
    • Provider-hosted: Apps for which the non-SharePoint components are deployed. Provider hosted apps can run on the cloud [SharePoint online] or on the own server [on-premises] depends on where you hosted them.
    • Autohosted: This will be used when apps that include Windows Azure web site, may has SQL Azure database. These apps will run in the cloud.
  • SharePoint hosted: Apps that include only SharePoint components and logic that runs on client. SharePoint hosted apps are hosted in SharePoint itself. The code we can use is HTML, JavaScript, CSS etc. When we deploy SharePoint hosted apps, SharePoint 2013 actually creates a web site in the site collection [to which you deployed] and is called as "App Web". The url of the App web is "prefix you register" + "-some random key from SharePoint"."full server qualified name/appname". For example: app-4c690ed122ce1f.sp15.corp.contoso.com/pages/default.aspx. This url is completely specific to the App and you can call it through API to read the App data.
I believe with this information, you can have clear idea on what are Apps in SharePoint 2013. Feel free to comment me if you have any questions or need more information.

Tuesday, July 17, 2012

OFFICE 2013 New Features–A new Office

Office 2013 preview got released recently and got time to install and test it out. Some features are really amazing and nice implementation. Here are my views on it.

New Office is Cloud friendly and ready to use on the touchscreen. This is really an amazing feature to Office. Another top new feature in office 2013 suite is the cursor. When you are typing the text, the cursor just move forward just like a line. It don’t appear like blinking anymore. I am liking this much and like to type more and more…

The new interface is looking clean but not with much colors though. A plain and clean white color ribbon. The ribbon and icons are a bit big when compared to office 2010 icons. This will be good for touchscreen users. 

Word_Preview

Top Features:

Word:

  • Import, edit and save PDF: We can import an existing PDF file directly to Microsoft WORD 2013 and then do edits and then save back to either word or PDF format. This is the number one feature which I liked much in Office 2013 suite.
  • Ability to connect to online services: You can directly search web using Bing for keyword search, images or Videos without leaving word. And then you can use/embed the HTML code in the word directly. You can also play the video directly in the word.
  • You can embed the online services like Flickr, SkyDrive etc. with document without leaving word.
  • Expand and Collapse: Now you can use the expand, collapse option in the word text. This is called "read" mode. You can expand, collapse a paragraph once you read it.
  • Resume Reading: Office 2013 will automatically bookmark the user last position in the document. After you reopened the document it can pick you where you left off.

Excel:

  • Flash Fill: If you have two columns and based on the first column, if you type the data in second column first row, then the Flash Fill predicts and fills the data accordingly for remaining rows in second column.
  • Quick analysis: If you select a range of values in Excel then the quick analysis tool will automatically conditional formats which helps us to understand the data easily.
  • Many chart options: There are many chart options and features available in Excel 2013.

Outlook:

  • Weather: New outlook has the best option to show the weather reports for next 3 days in the calendar. This helps us to change the plans in meetings and plan according to weather reports. Smile

Weather_Outlook

  • Reply, Forward in POP-IN window: You can reply, forward emails in the pop-in window. When you are moving out of inbox, send items etc. and come back to same email the pop-in window still there and you can continue in typing text.

Outlook_Popin

OneNote:

  • Onenote is now more powerful and looks very good. It is described as digital notebook from Microsoft.
  • Integration to Outlook: You can save the emails to Onenote directly from Outlook.

PowerPoint:

I didn’t spend much time in PowerPoint. I like to see how they improved the functionality in presenting something on projector… And there it wins me.

    • When we are presenting the PowerPoint presentation the presenter can see on his screen what is the next slide to present. This will give much information and help to the presenter what to give in next slide.
    • Clock on the screen: The presenter can keep tracking of the time how long she/he has been speaking. Smile

Many more features are there. I will document and post them as soon as I can. The bottom line I like Office 2013 much and it is going to be a huge success in Office suite so far which makes Microsoft to sit at top position.

Windows 8 Release Date

I am enjoying the new Windows version and the tiles UI. I am using it in my laptop and it is my main OS now. The release date has been announced from Microsoft and it is on October 26, 2012. I am awaiting to see the final version……