Sunday, February 10, 2013

What's new in SharePoint 2013


Here we are with new SharePoint 2013. With this edition comes lots of fun and also up to some level disappointment. Well, there are more fun than disappointment hence a good news.
First let us see what all new features of SharePoint 2013 and what all product family now we have.

First SharePoint 2013 is of course a next version of currently successfully running SharePoint 2010.

Just like SharePoint Foundation 2010 we also have SharePoint 2013 foundation which is again a free utility that can be downloaded if you have Windows Server 2008 R2 with SP1 or new Windows Server 2012.

we also have licensed SharePoint 2013 on premise version or the cloud version which is in office 365.

Covering everything about SharePoint 2013 would be very difficult in a single post. So we will divide the posts and will post them as separate posts.

It would only run on 64 bit machines and will require SQL Server 2008 R2 with SP1 or new SQL Server 2012.

Ideal RAM should be between 8 GB to 24 GB. (making hardware more expensive with each iteration)

Plus Microsoft has come up with new Visual Studio 2012 which is tightly integrated with SharePoint 2013. Visual Studio 2012 has a lot of new features eases the SharePoint 2013 development.

Of course we now also have SharePoint Designer 2013 as well as Office 2013 products.
So let's dive into the new features that has been introduced or enhanced from the previous version.

1) Everything is App

Now we need to think of almost everything as an App. Lists, Libraries, Calendar and even sites are apps. You can create an app and then publishes to the corporate app web application or to the Microsoft Store. Remember that when you create an app, you will work with client object model and not server object model. You can use ECAM script, HTML and jQuery to interact with SharePoint 2013. you can options to host your app either in SharePoint itself or on the cloud - provider hosted.

The advantage is Microsoft is going to have a dedicated store for SharePoint where developers from all around the world would be publishing their apps for SharePoint which then can be consumed by other developers based on contract/license.

Company developed apps can be hosted in internal app catelog. They enable you to use cross-platform standards, including HTML, REST, OData, JavaScript, and OAuth.

We already have few apps ready to go for SharePoint 2013 and here they are.

http://office.microsoft.com/en-us/store/apps-for-sharepoint-FX102804987.aspx

2) Create / Edit Master Pages

This is one of the biggest improvements over the last version.

You can simply create an HTML page with CSS and images and then convert this HTML page into the master page. Does that really make you read twice? Yes, you're right. We can now convert HTML into the fully functional master page. you also get a preview of new master page before applying.

3) Image duplicity

You can have all your images in a site and then can define the variants of those images that you would like to use. You can have one single image and can use this image in different way like with different height, width and even by cropping an image.

4) Windows 8 Style
You feel like you are using Windows 8 UI metro look as we have now tiles at most of the places.

5) Contemporary view for Mobile

We now have new contemporary view for mobile. This view is available in HTML 5 to those who uses Windows Phone 7.5 or above and IE 9 and above, iPhone 4 or above, Safari 4 or above and Android 4 or above.

We can also have full desktop view of SharePoint in smart phones.

6) Drag and Drop to library

Now we can upload the documents using drag and drop from the desktop. Files will be uploaded to the document library showing the progress bar.

7) New context menus

We now have more clear context menus for list items and documents.

8) Share the documents

Now we can select document and then share it with specific person / user with personalized message. After this email will be sent to the user so that user can access the document.

9) Social experience has improved

Now you can follow a document, list item and also users, posts etc. You can do a micro blogging.

There is a new community site available where you can define you ideas, team, contributors and can also give them ranks / raputations based on the answers that they give when someone post a question. You can create badges.

10) Preiew of Documents

Now in document library when you hove the mouse over the document, we get to see the preview of that document right there.

11) SkyDrive integration

You can synchronize your contents to your desktop with the SkyDrive.

12) BCS enhancements

Now it also suports oData. automatic generation via Visual Studio.

13) create an app for Office 2013

We can create an app specially for Office 2013 so that users using office 2013 can interact with SharePoint 2013 right from office. We can use new development tool called "Napa" along with Visual Studio 2012.

14) App event handlers and remote event handlers

apps have their own events that we can handle like when app is installed or deleted. Remote event handlers can work with the remote components of the app for SharePoint.

15) Translation service, PowerPoint automation service, enhanced excel service and enhanced access services.

With new PowerPoint automation service you can now convert ppt or pptx files to PDF and other open XML formats.

Translation Service is a new service application in SharePoint 2013 that provides translation of files and sites. When the Translation Service application processes a translation request, it forwards the request to a cloud-hosted machine translation service, where the actual translation work is performed.

The Machine Translation Service application processes translation requests asynchronously and synchronously. Asynchronous translation requests are processed when the translation timer job executes. The default interval of the translation timer job is 15 minutes; you can manage this setting in Central Administration or by using Windows PowerShell

There is a lot of things that can be talked about SharePoint 2013. We will cover them as an when we come across to them and share it.

Why is SSP removed from SharePoint 2010


SSP is shared service provider and that was available in MOSS 2007. In MOSS days, there were certain actions that can only be performed only if you have created the SSP like the BDC and User profiles.

Now we all must be thinking that why SSP is removed from SharePoint 2010 version? Well there are many aspects to this.

First assume that you are going to have different web application and you would only need to work with BDC and do not want to use any other service that comes under BDC, but still just to use one BDC service you need to create two SSP that means two separate databases.

Another thing is in SSP we did not have items which are in similar nature. They all performed different operations.

It is little difficult to deploy the SSP on servers.

Because there are too many services in one database, so it becomes difficult to scale it. It did not support scaling as we could not add any extra service to the SSP.

Now in SharePoint 2010 SSP has been replaced by Service Applications. These services are not groups under anything, they all run independently. In other sense, service applications provide a-la-carte options to choose from. Per web application, you can configure which service you want to consume.

You can also publish these services outside of the current farm so that these services can also be used elsewhere. You need trust relationship between those farms who wants to consume these services.

You can also write your own services and add that service to this service application.
Here service applications have their own databases unlike shared database in MOSS 2007 SSP.

You can use PowerShell commands to play around with these services.

Get-SPServiceApplication returns all  service applications.
Get-SPServiceApplication-name {servicename} to get the service object.

From there you can get all other properties related to the service.

Bottom line is SSP services are now split into individual services and can be consumed from web applications as and when needed. These services are:
  • Profiles, Audiences = People Service App
  • Search = Search Service App
  • Performance Point = Performance Point Service App
  • Excel = Excel Service App
  • Office Web Applications = Office Web App
  • Visio Services = Visio Service App
  • Word = Word Service App
  • PowerPoint =  PowerPoint Service App
  • Project Server = Project Server App
Here are some new services that have been introduced in the SharePoint 2010.
  • Access Services - Allows viewing, editing and accessing Access databases in a browser.
  • Managed Metadata Service - allows access to managed taxonomy hierarchies, keywords, and social tags for site collections.
  • Secure Store Service –Provides capability to store data (e.g. credential set) securely and associate it to a specific identity or group of identities.
  • State Service - Provides temporary storage of user session data for Office SharePoint Server components.
  • Visio Graphics Service – Helps to view Visio diagrams in a web browser.
  • Word Conversion Service Application – Allows converting documents into different formats.
I hope this will give you a basic idea as to what is it that has replaced SSP and why?

How to get igoogle and Google Talk on a Sharepoint Page


To get Google Talk on a Sharepoint Page:

Google Talk can now be added to your blog as a gadget.

Drag a ContentEditorWebpart on your SharePoint Page.
Click on the "Source Editor" button in the Toop Pane on the right side.
Past the following HTML stuff in the Source Editor dialog box:

<iframe width="234" frameborder="0" src="http://talkgadget.google.com/talkgadget/client?fid=gtalk0&relay=http%3A%2F%2Fwww.google.com%2Fig%2Fifpc_relay" height="350"></iframe>


The Google Talk Gadget lets you send instant messages, transfer files, make voice calls (to other Google Talk users) and leave voicemail messages. If you paste a Picasa Web Album or YouTube URL into a chat session, the gadget gives you an instant preview of the photos and videos.

To get any page say igoogle on a Sharepoint Page:

Drag a ContentEditorWebpart on your SharePoint Page.
Click on the "Source Editor" button in the Toop Pane on the right side.
Past the following HTML stuff in the Source Editor dialog box:

<iframe width="1000" height="500" frameborder="0" src="http://www.google.com/ig?referrer=ign" width="500" height="300"></iframe>


Below Image shows both implementations:



Try out the stuff here it self:

How to Implement Live Chat in Sharepoint

This feature of the Windows Live Messenger application enables you to actually add a web-based messenger to your site or blog.

Check out http://settings.messenger.live.com/applications/websettings.aspx to create one for yourself.

I will explain in brief.

Here http://settings.messenger.live.com/applications/WebSettings.aspx
you will see a setting for "Show your Messenger Status on the Web"

The checkbox "Allow websites to see your Messenger status and send you messages"
will allow any one to message you from the gadget.

You can place the gadget on any web page by copying the html code.


To get the HTML code click here
http://settings.messenger.live.com/applications/CreateHtml.aspx

At the bottom you will find these instructions.
"Copy the HTML and paste it into your webpage"

Open your sharepoint page in browser.
Drag and Place a ContentEditorWebPart there.
In it's Source Editor, Past the HTML Code that you have copied.

That's It. Dude now people can catch you and chat with you.
They from the Gadget and you from your MSN Messenger.



For Further Queries Begin a conversation with the "Kings" ;)
Chat Here

MOSS 2007 Excel Services - Basics

Excel Services !
Its one of the most powerful feature of MOSS 2007. But have you tried to have a look into it?
If not , this article explains you the basic steps required to get hands on experience with Excel services. What all is required is listed below:
1. Shared Service Provider (SSP).
2. Excel file
3. A MOSS site
4. Document library
So now if you have created all of the above components, lets start….
STEP 1 : Making the document library trusted in central admin
In order to work with excel services, you need to make the document library where you are going to keep an excel file declare as ‘trusted’ in the central admin site.
Open the central admin site and click on the SSP name. In this case, the name of SSP is MySSP. Click on Excel Services Trusted File Locations and add a new trusted location. Mention URL of the document library in the site where you wish to keep the excel file. Keep rest of the settings as it is and click on OK. Refer to the screenshot below:


STEP 2: Configure settings of the document library
Open the document library where you want to keep the excel file. Go to settings à Advance Settings and as shown in the screenshot below, find the option ‘Opening browser - enabled documents’ and select the option ‘Display as a web page’ . Press OK to complete the step.




STEP 3 Publishing file to the document library
There are two ways to store the excel file in the document library.
a. Uploading the file directly to the library.
b. Publishing the file to the library.
As we all know how to upload a document to the document library, I would like to explain the other way.
Open the excel file and open the option of file menu as shown in the figure below. Select publish and then Excel Services. Specify the URL of the document library and that’s it. The excel file will be published or uploaded at the specified location. Of course, no need to mention that you need to have permissions on that library for uploading.






STEP 4 : Start of the excel calculation services
In order to view an published excel file, the ‘Excel Calculation Services’ needs to be running. You can start the service by navigating to Central Admin à Operation à Services on server and start this particular service.





That’s it. You have successfully completed the basic hands on for working with excel services. To see what is there in the excel, click on the title of the excel you published in the document library. Intended result is that it will open in the browser itself displaying the data in excel format.

InfoPath


How to fill values (Data) Repeating Table in InfoPath?

Hi All,
Here is sample code to fill value in repeating table at runtime (Dynamically)
Suppose you have repeating table Name “tblCustomer” and has two column name “Text” and “value”
Here is code to fill value from database or from web service.
Repeating table structure in data source like this


private void fillRepeatingTable(string table, string tr)
{
string value, Text;
value = string.Empty;
Text = string.Empty;
DataTable dt = null;
//this is method that Will return DataTable
dt = this.CustomerDataSource();
//cloumn name Value in Repeating Table
value = "//my:Value";
//column name Text in Repeating Table
Text = "//my:Text";

XPathNavigator root = this.MainDataSource.CreateNavigator();
XPathNavigator row = root.SelectSingleNode("//my:" + tr + "[1]", NamespaceManager);
// make a copy of the node by cloning it
XPathNavigator row1;
if (dt != null)
{
foreach (System.Data.DataRow dr in dt.Rows)
{
// set the new values of the row’s fields
row1 = row.Clone();
row1.SelectSingleNode(value, NamespaceManager).InnerXml =Convert.ToString(dr["Value"]);
row1.SelectSingleNode(Text, NamespaceManager).InnerXml = Convert.ToString(dr["Text"]).Replace("&", " "); ;
XPathNavigator parent = row1.SelectSingleNode("//my:" + table, NamespaceManager);
parent.AppendChild(row1);
}
row.DeleteSelf();
}
}



Access denied error when I use web services in InfoPath

Hi All,
When I use user profile service or any other web service in InfoPath and run it on my local server it works fine and when I deploy same form on production server where there is SharePoint farm it fails to run and give access denied error. I have used host header for SharePoint site and I refer that host header to open that site.
The solution for this problem is to disable the loopback check on each SharePoint server in farm.
To set the DisableLoopbackCheck registry key yourself, follow these steps:
Set the DisableStrictNameChecking registry entry to
  1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:
    (http://support.microsoft.com/kb/281308/ ) Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name
  2. Click Start, click Run, type regedit, and then click OK.
  3. In Registry Editor, locate and then click the following registry key:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
  4. Right-click Lsa, point to New, and then click DWORD Value.
  5. Type DisableLoopbackCheck, and then press ENTER.
  6. Right-click DisableLoopbackCheck, and then click Modify.
  7. In the Value data box, type 1, and then click OK.
  8. Quit Registry Editor, and then restart your computer.
    And run IISRESET on each server
    Reference: http://support.microsoft.com/kb/896861


InfoPath Fill Drop-down List Box dynamically (Run time)

Hi All,
Some time you need to fill Drop-Down List Box of InfoPath runtime from database or webservice.
here is solution and demo code will help you to solve this purpose. this solution is best when you are trying to bind small amount of data to drop-down.
here I have taken Customer drop-down and it will fill runtime from Repeating table.
Here in image you can see we have Customer drop-down and below it one Repeating table.
  1. Open InfoPath.
  2. Click on design new template.
  3. drag dropdown on the InfoPath Form and give name "Customer"
  4. drag repeating table on InfoPath form.
  5. now go to the data source pane and rename the binding shown in the figure.
  6. Now, double click on customer Drop-down, In Data tab List box entry section select radio button “lookup value in the Form’s data source”.
  7. In Entries select “tblCustomer”
  8. Value : myValue , Text: myText.
  9. And then Hide Repeating table from Conditional Formation in Display tab.
  10. Download the Code (Click Here)
  11. Here is Main Code


private void fillDropDown(string table, string tr, string DropDownName)
{
string value, Text;
value = string.Empty;
Text = string.Empty;
DataTable dt = null;
//if you have more than one Dropdown you can use switch case
switch (DropDownName)
{
case "Customer":
//here you can use webservice to fill dropdown..
dt = this.CustomerDataSource();
value = "//my:Value";
Text = "//my:Text";
break;
}
XPathNavigator root = this.MainDataSource.CreateNavigator();
XPathNavigator row = root.SelectSingleNode("//my:" + tr + "[1]", NamespaceManager);
// make a copy of the node by cloning it
XPathNavigator row1;
if (dt != null)
{
foreach (System.Data.DataRow dr in dt.Rows)
{
// set the new values of the row’s fields
row1 = row.Clone();
row1.SelectSingleNode(value, NamespaceManager).InnerXml =Convert.ToString(dr["Value"]);
row1.SelectSingleNode(Text, NamespaceManager).InnerXml = Convert.ToString(dr["Text"]).Replace("&", " "); ;
XPathNavigator parent = row1.SelectSingleNode("//my:" + table, NamespaceManager);
parent.AppendChild(row1);
}
row.DeleteSelf();
}
}

InfoPath using Web Service Data connection

Hi,
Read the following scenario you probably come across while development InfoPath using Web Service Data Connection. (Here I assume you know how to create Web Service Data connection using InfoPath 2007)
I have created one InfoPath form in my local machine, where I am filling dropdown from web service of my local machine,
For that I am creating data connection library, but it takes design time web service URL reference in data connection.
Now I want to publish this form to server, but on server it is not working because it considers local web service URL.
On server I have created same data connection library and change the web service reference in all .udcx file but still form template take web reference which I have added design time.
Because In my local machine web service URL is different and on server web service URL is different.
When I try to see preview of my InfoPath template on server it shows following message
"One or more data connection in your form are specified with server-relative link, but no published location has been defined for the form. Data connection will retrieve data from the server specified in design time. To enable server-relative link publish your form to Microsoft Office server"
I have divided this solution in two parts.
1. Create Web service Project (i.e. here I have created web service as Library it will generate .dll file assembly for web service not web service as web application) .Here we will use Web Service Template if you don’t have install this template please download it to create Web Service Project. You can see template in picture.
Now create project like this
Give Strong name to this Assembly.
Deploy it into a GAC .Now open MyService.asmx file in Notepad and replace <%@WebsService /> Tag with following according to your project here is one sample.
<%@ WebService Language="C#" Class="SharePointKings.MyService, SharePoiintKings, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=bce3f92a230905aa" %>
Now create one Directory in 12/Template/Layouts Directory Name in Our case we will create
Directory “SharePointKings” under this directory put .dll from your project in our case it will be SharePointKings.dll.
Now from RUN write “inetmgr” now suppose your site Directory name is “2020” expand this site go to Layouts under Layouts now you will find directory called “SharePointKings” as we created it under 12/Template/Layouts so it will listed here. Now create virtual directory SharePointKings from here.
In first part we have created our web service as Assembly and configure it to use in InfoPath Web service data connection.
2. Now here I assume you know how to create Web service data connection and you want to populate dropdown list from web service.
When you open InfoPath Code Project and from this code project right click on project add Web Reference.
As we have assume that our site port is “2020” so our site URL is like this “http://servername:2020” and add referencehttp://servername:2020/_layouts/SharePointKings/Myservice.asmx now all web methods will be listed there. Name this web reference “MyService”
Ok now as you add this web reference you will find few additional files created in your InfoPath Code Project in which one is “Reference.cs” open this file you will find default constructor now add second additional constructor which take parameters for Web Reference URL.
public MYService(string WebseriveUrl)
{
this.Url = WebseriveUrl;
if ((this.IsLocalFileSystemWebService(this.Url) == true))
{
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
}
else
{
this.useDefaultCredentialsSetExplicitly = true;
}
}
Now in your InfoPath Form Load Event Write Following code.
First we Create Dynamic URL For WebService like this so it works for our testing server as well in production server we don’t need to change any thing in code so, here we are creating dynamic URL though we have given hard coded refrecnce while adding web referce.
public void FormEvents_Loading(object sender, LoadingEventArgs e)
{
try
{
string webserviceurl = string.Empty;
webserviceurl = SPContext.Current.Site.Url +"/_layouts/SharePointKings/MYService.asmx"; ExecuteConnection("YourConnectionName",webserviceurl);
}catch(Exception ex){throw ex;}
}
private void ExecuteConnection(string ConnectionName,string WebServiceUrl)
{
WebServiceConnection cn = (WebServiceConnection)this.DataConnections[ConnectionName];
string url = WebServiceUrl;
UriBuilder uri = new UriBuilder(url);
cn.ServiceUrl = uri.Uri;
cn.Timeout = 60;
cn.Execute();
}
This way you can execute Web service connection yousing dynamic web service URL.you don’t need to change any code while deploying your code to production server .
download in word format