20 March, 2014

ERROR HRESULT E_FAIL while working on audit reports - Resolved

Error HRESULT E_FAIL while working on audit reports - Resolved

Problem description:
Facing an issue here in Audit Reports. The issue is when one site collection admin tries to run the Security Settings Audit report the report is getting generated successfully; however if another site collection admin tries to run the same report he gets an error. When checked in to the log files the error was "System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component. At System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal

Error message:
HRESULT E_FAIL has been returned from a call to a COM component. At System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal

Logs:
System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component. at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at Microsoft.Office.Server.OpenXml.Internal.ByteStream.Write(Byte[] rgb, Int32 offset, Int32 cb) at System.IO.BufferedStream.FlushWrite() at System.IO.BufferedStream.Flush() at System.IO.StreamWriter.Dispose(Boolean disposing) at System.IO.StreamWriter.Close() at System.Xml.XmlTextWriter.Close() at Microsoft.Office.RecordsManagement.Reporting.AuditReportGenerator.CloseDataPart() at Microsoft.Office.RecordsManagement.Reporting.AuditReportGenerator.Dispose() at Microsoft.Office.RecordsManagement.Reporting.ReportData.CloseCurrentReport() at Microsoft.Office.RecordsManagement.Reporting.ReportData.Dispose() at Microsoft.Office.RecordsManagement.Reporting.ReportBase.AggregateReports(Hashtable query, SPFolder folder, ReportNameGenerator reportNameGenerator) at Microsoft.Office.RecordsManagement.Reporting.ApplicationPages.CustomizeReport.OKBtn_Click(Object sender, EventArgs e) at System.Web.UI.WebControls.Button.OnClick(EventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Troubleshooting steps:
1.   Working for few users so it’s not a global issue
2.   Working in other browser but not in IE
3.   There are no multiple domains for whom it’s not working
4.   No restrictions on user accounts via GPO
5.   No errors in the event logs
6.   Other SP functionality is working fine for those users for whom auditing is not working

Resolution:
1.   For whom it’s not working, let him logged in to the SharePoint site

2.   Open the SharePoint site

3.   IE -> Tools -> compatibility settings

4.   Check "Display all websites in compatibility view".

5.   Add your SharePoint site on the top ("add this website" section) if its empty (by default it takes but sometimes it’s not)

6.   Refresh it and check the results

If you have any queries/questions regarding the mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

Product applies to:
a)   SharePoint Server 2010
b)   SharePoint Foundation 2010
c)   SharePoint Server 2013
d)   SharePoint Foundation 2013

17 March, 2014

Health check page throwing 404 - File or directory not found - NLB configuration

Today I was working on configuring the network load balancer for our web front ends. Let me give you some details on this before I start explaining the issue – NLB configuration can be done in two ways as follows:
1.   Health check file (Recommended one) – running IIS required.
2.   TCP port based health check

I was using the recommended way i.e. first one (health check file). We have 5 web front ends, while doing the configuration; you need to place this file on all the 5 web front ends. Why? – Good question! – If one server goes down then the requests will automatically get routed to the next available server.

Once you have placed the file then you need to browse that file in browser, just to make sure that you are getting the reply like this – http://108.34.45.145/healthcheck.txt

Proper output should be there, if not then there is something wrong in configuration. I faced the same problem as I was getting the reply from one server only and remaining servers were throwing the following error message:

404 - File or directory not found.

HTTP Error 404.0 - Not Found the resource you are looking for has been removed, had its name changed, or is temporarily unavailable

If the one server is giving me a proper output then the question is why the other servers are not working! There should be some problem in configuration, let me clear – not from the NLB side but from the IIS side.

I checked the IIS of the server where it was working and compare it with the remaining ones but didn’t find any differences.

So I tried browsing the local host site which is by default there in IIS – You should get IIS construction page. I tried browsing this IIS default website from the servers where I am not getting the output and result was same i.e. default website giving me “webpage cannot be found”

Why the default websites giving me error message? – The reason is so simple as they are in stopped status J

The server where it’s working, I checked the status of the default websites and it was in started mode. So the bottom line is - Sometimes solutions are simple but took some time to figure it out.

Resolution for this issue:
If you are working on NLB configuration with respect to health check page then make sure the default web site in started status.

If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.


If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.

Product applies to:
1.   SharePoint Server 2010
2.   SharePoint Foundation 2010
3.   SharePoint Server 2013
4.   SharePoint Foundation 2013
5.   SharePoint Server 2007

16 March, 2014

Sharepoint Administrator account Lost its control (Permissions) over a SiteCollection

Issue Description: User not able to perform the administrative task in a site collection(He is having full control over the site).Even Primary site collection administrator lost control over the site.



àWhen clicking on "Site Action", he is not able to see the full range of option like "create new site, Document library ..etc). He is able to see only few options as shown above.
à Administrator not able see option to add users under site permission.


àNobody could add new documents or edit documents, nearly every single Document or Library option is greyed out.

Resolution:

Method 1:

1.     Central Administration -> Site Collection Quotas and Locks.
2.     Select your site collection
3.     Change the Site Lock Information radio button from “Read-only” to “Not locked
4.     OK



Method 2: Use Stsadm command

stsadm -o setsitelock -url http://sitecollection -lock none

Root Cause: Usually While taking a sharepoint back up, site collection goes to read-only mode. Once it is completed it will returned to “Not Locked” mode.
Reason for this issue might be while taking back up got interrupted in middle and it left the site collection to read mode.

13 March, 2014

The site collection containing this sandboxed solution has exceeded its daily resource usage quota

In our last article, we talked about sandboxed solutions and some associated issues:

In this article, we will discuss on resource usage with respect to Sandboxed Solutions.

Every time we will learn more and more when there is an issue and we start our analysis, troubleshooting, reproducing the issue and many more! – This is not going to stop J in fact nobody want to – J

I had a ticket in which user was facing the issue – he has uploaded a solution package inside solution gallery but as soon as he tried adding the webpart then he was getting the following error message

The site collection containing this sandboxed solution has exceeded its daily resource usage quota

Quite strange because uploading a package and the error in the next 5 mins – don’t you think something is wrong here? I have checked the resource usage of that solution-

1.   Open the site in which you have uploaded the solution (.WSP)
2.   Site actions
3.   Site settings
4.   Galleries
5.   Solutions

You will see the complete usage here – see the following screenshot.

From the above screenshot, it’s very clear that the resource usage is 0 but still I am not able to add the webpart :) then I thought it might be a permission issue so I tried with the farm account but same problem L - OK, permission is not the issue! – cleared.

Then I thought it might be browser specific so I tried in Mozilla as well as chrome to test the functionality but no changes in the result i.e. same problem – OK, browser is not the issue – cleared.

I checked the ULS logs to get more clarity, additionally event logs but didn’t find anything relevant.

Then I checked the timer jobs in case of any failures but everything was fine there also.

Then I thought there should be some setting from where we can set these resource usage numbers and finally I found it, LOL the setting that you see regularly gets sometimes ignored by us. Start thinking guys and hit the target!

Yes, you are right – “Configure quotas and locks” – by means of this you can check the actual “Sandboxed Solutions Resource Quota”.

So when I checked this then I found out that there were no numbers in the textboxes.
1.   Open the central administration
2.   Application management
3.   Configure quotas and locks
4.   Select the appropriate site from the top dropdown and specify the following numbers

By default these are numbers:
Limit maximum usage per day to: 300
Send warning e-mail when usage per day reaches: 100

Set this numbers and you should be good to go J

If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.

Notes: if you are facing this problem in reference to Office 365 then here is the Microsoft endpoint: http://support.microsoft.com/kb/2536051

12 March, 2014

The Business Data Connectivity Metadata Store is currently unavailable

BDC, Everybody aware as it was there in MOSS 2007 / SharePoint 2007 but now we have BCS – Business connectivity services, one of the important features in SharePoint 2010. Whenever we need to bring external content / connect to external content types then BCS comes into picture. Today’s article is also based on one of the BCS issue which I came across and resolved it with proper analysis and troubleshooting.

Problem description:
One of our users trying to connect to ‘External content types’ by means of SharePoint Designer and facing the following error.

Error message - 1:

The Business Data Connectivity Metadata Store is currently unavailable.


Error message - 2:

There is no business data connectivity service associated with the current web context.


We haven't used the BCS before so this is the first time we came across this error so when I started exploring our farm then I noticed that one of mandatory requirement to make this functionality working is – Service Application.

Point #1: Make sure you have the BCS service application (SA) exists.

So we have created the BCS SA and check the results but same problem i.e. same error message.

Point #2: Make sure you associate this service application with the respective web applications on which you have the site collections.

How to do this? – Here are the details.
1.   Open the Central Administration
2.   Application management
3.   Service applications
4.   Configure service application associations
5.   Make sure its listed under ‘application proxies’

Point #3: BCS service application has a dependency on managed metadata so make sure the managed metadata service application already exist in your environment. If it’s not then please create it.

Point #4: Make the account that you have used for creating the BCS service application has necessary permissions on the web application database.

Point #5: Make sure the Business connectivity service is in started mode via Services on Server.

How to check this? – Here are the details.
1.   Open the central Administration
2.   System Settings
3.   Servers
4.   Manage services on Servers.
5.   Check the respective service i.e. BCS and start it if it’s in stopped status.

That’s it – the issue should be resolved now after following the above recommendations.

If you find a different solution, please report it as a comment to this post. Be sure to double-verify it: undo your solution and verify that the problem comes back, then redo it and verify that the problem goes away.


If you have any queries/questions regarding the above mentioned information then please let me know. I would be more than happy to help you as well as resolves your issues, Thank you.