Tuesday, June 21, 2016

InfoPath Form is not displaying for SharePoint 2013

I have decided few times to write something every week or at least every month couple of my learning. But from the busy schedule it is becoming a item of prioritization. But this one is a very interesting post and we almost spent > 150 man hours [And $$$] to figure this out. So I thought to share with the world and SharePoint Geeks out there. And again it is not 100% necessary that it will help you but we were not able to find any article referring to this solution out there so decided to have it on my blog.

Problem: I have created multiple SharePoint 2013 Farms by the time I am writing this blog along with my team but this one is the unique we started facing it. Where SharePoint 2013 is not displaying the InfoPath form. We had tested couple of scenarios where it was failing as below.
1) While User was trying to publish InfoPath, it was failing.
2) We have created a SharePoint 2010 Approval Workflow and while workflow initiate while user goes for approving the item he/she was not able to get the form as it was not displaying the InfoPath Form.

Now surprisingly out of our 5 environment we were only seeing this behavior on most critical environment. :(

We tried all the ways whatever we can and blogs available out there to solve the problem, but at the last we end up reaching out to Microsoft for their help.

Solution: And after hours of long calls and troubleshooting it turned out to be a security patch issue mentioned here @ https://support.microsoft.com/en-us/kb/3118750

Which actually talks about uninstalling KB3098779 & KB3097997.

We uninstall both the KBs from our Windows 2012 R2 servers rebooted the system and we are done long hours and sleep paid off. :P

Friday, March 18, 2016

Setup is Unable to Proceed due to following error, requires .Net Framework 4.5

I can not start this blog without giving credit to Jon Bryan for his amazing article which helped to resolve the error. @ here.

I did lot of setup of the SP2013 environment in last 2 years. But current error has blew my mind away. And i blame the error message which SharePoint give for this. I am using Windows Server 2012 R2 which comes default with .NET Framework 4.5 and I am keep getting the error message that pre-req .net framework 4.5 is missing.

Finally after reading the blog from Jon Bryan, I have realised that it has 4.5  and complete version is 4.6.01055. That means it is 4.6 while SharePoint 2013 keep looking for 4.5.50501. 

So, as an It Pro, what you need to do which we called as Register Hack by changing the value only in registry and not uninstalling or installing anything on the server.
Change the Value @ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Client
Key ==> Version = 4.5.50501

And start your installation. Keep in mind that after the installation change the same value back to 4.6.01055.

Now, when you go for making the changes to Registry you are going to face another challenge of "Access Denied". Please Use this blog from Austin Ruthruff on how to over come with that issue.

Thanks Joy Bryan and Austin Ruthruff to make the life easier for the people out there.

Saturday, November 23, 2013

Special Characters handling for filename in SP List

I was working with one of our client where we have developed some custom forms [Visual Web Part] which were saving the data in the SP List.
 
Problem: After go-live on the support business has reported that for some of the items they were seeing the duplicate entries for the items. After long analysis i have figured out that it is happening because business were trying to attached the files with special characters. when they tried SP was giving the error message but was not sufficient for some of the users and they were creating those items again instead of editing the already created item to only attach the file without special characters.
 
After a long discussion we agreed to prevent the user on the same form itself instead of saving it and ask user to edit it later.
 
NOTE: This is the case in OOTB SP List as well.
 
Solution:
Insert below script on your form


    function PreSaveAction() {
        var fileNames = document.getElementById('<%=hfExtensions.ClientID %>').value;
        var isInvalidFile = "";
        var attachment;
        var invalid = "no";
        var filename = "";
        var fileNameSpecialCharacters = new RegExp("[~#%&*{}<>;?/+|\"]");
        var attachmentID = document.getElementById("idAttachmentsTable");
        for (var k = 0; k < attachmentID.getElementsByTagName("span").length; k++) {

            try {
                attachment = attachmentID.getElementsByTagName("span")[k].firstChild;
                filename = attachment.data;
                for (var h = 0; h < fileNames.split(',').length; h++) {
                    if (filename.split('.')[filename.split('.').length - 1] == fileNames.split(',')[h]) {
                        isInvalidFile = "invalid";
                        break;
                    }
                }
                if (isInvalidFile == "invalid") {
                    break;
                }
            }
            catch (e) {
            }
            if (fileNameSpecialCharacters.test(filename.split('\\')[filename.split('\\').length - 1])) {
                invalid = "yes";
                break;
            }
            else {
                invalid = "no";
            }
        }
        if (isInvalidFile == "invalid") {
            alert('The file you are attempting to save or retrieve has been blocked from this Web site by the server administrators');
            return false;
        }
        else {
            if (invalid == "no") {
                return true;
            }
            else {
                alert('A file name cannot contain any of the following characters: \\ / : * ? \" < > | # { } % ~ &.Please remove the character and try again.');
                return false;
            }
        }
    }

Tuesday, April 16, 2013

Content Type Hub for your Enterprise

Content Type Hub is the new verbage or term you might here a lot while talking about SharePoint 2010 as a enterprise level solution for document or record managment.

In my last assignment we have used Content Type Hub as it was an enterprise level Record Management System implementation. We have heard or known SharePoint as a Content Management System (CMS) since MOSS, but to me it actually comes with SharePoint 2010.

So when we started our implementation in early 2011, it was very tough for me as well to understand what it Content Type Hub and how it works. But thanks to SharePoint 4 Developer I found the answer in very easy language here.

Now, each new feature comes with their pros and cons. So, here are the cons or limitations for using the Content Type Hub.

Search with SharePoint 2010

Below are some of the best blogs for configuring and customizing Search and understand how search works with SharePoint 2010.

How to build a good enterprise level Search Center?

Usage of Content Source

How to restrict your user search experiance?

How to customize your user search experiance?

Managed Metadata Services (MMS) Limitations in SharePoint 2010

I am blogging back after a long long time. Since last 2 years i was very busy in one of the largest migration assignment from DCTM to SharePoint 2010.

We have build one of the largest Record Managment System in SharePoint 2010 history.

So I just wanted to share some of my learnings and findings from some other blogs here.

Managed MetaData is one of the biggest term from SharePoint 2010 for their Record/Document Management system, though there are some limitations associated with the same while using it effectively.

I have found those limitations here.

Do visit this, to know the biggest issue with MMS while deploying the site backup from one environment to another. Or you can write me to know more on my experience.

Saturday, May 21, 2011

WebApplication Permission Policy in SharePoint 2010

After long time I found some time today to share my new experience in my new organisation. Since last 10 weeks I was working on my 1st ever SharePoint implementations assessment assignment. And ad on to that it was for SharePoint 2010.

My Assignment included to set up or to be precise suggest the Architecture for implementation of SharePoint 2010.

One of the requirement from the client is real time. They were planning to make their intranet portal available on extranet users as well. But they want the restriction on some of the confidential documents when same user accessing the portal from extranet.

Requirement: User A is a exist as a Store Manager in AD. He should be able to access the document on portal only when he is accessing it from store or say from Intranet. At the same time when User A is trying to access the same document on portal from Home through extranet the document should not be accessible to him. 

Myth:It can be achieved by using (1) Audiance Target (2) Creating different group for Intranet and Extranet.

Solution: I would say option (2) is half true. But My Document library is having a permission only for Intranet Group. Now when user A who is a part of both Intranet & Extranet Group how SharePoint will know when User A is accessing the portal from Extranet or Intranet?

Answer to this is Web Application Permission Policy in SharePoint 2010.

Step1: Create portal http://myportal for "Intranet Zone"
Step2: Go to Central Admin and Extend "http://myportal" for "Extranet Zone"
Step3: Select the created "http://myportal" and select Permission Policy from the "Ribbon" on the top.
Step4: Create new policy for "Deny" and add Intranet AD group to that, which will prevent the site to be accessed for the defined group in the Deny Policy.

Now when User A is accessing the portal from extranet and entered the site, SharePoint knows that User A is accessing the portal as a part of Extranet AD Group and not allowed him to access the Document Library which is only having an access to Intranet Group users.

Feel free to write to me for any help on this...and click here and here to know more on how to set up site permission policy.

Thursday, October 21, 2010

My Column in Search Result

We have a requirement in our project where we have to fetch the search result from a given list. Additionaly we have to display some columns from the list in serch result display.

We found a good article from Andy Burn's blog for how to do this.

Wednesday, October 20, 2010

Multiple Document Upload with jQuery

Here is the article with jQuery code from Marc for uploading multiple documents in SharePoint library and at the same time you can name, add description and check-in all together. Click here to see the article.

Thanks Marc :)