Wednesday, February 2, 2011

A runtime exception was detected. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Interestingly one fine day, I created a new site collection with me as site collection Administrator in one of the Web Application in Production environment, and tried to access the site from my local machine. I was navigated to "Access Denied" page.


Well I am the site collection administrator. Not sure why this is happening all of sudden, I did the IISRESET on both the WFEs thinking that may be this is causing due to some cache from the IIS. Well again tried my luck here still having the same message. Then i checked the event viewer. Below is the event viewer message
Event Type: Error




Event Source: Office SharePoint Server

Event Category: Office Server General

Event ID: 7888

Date: 1/27/2011

Time: 10:15:07 AM

User: N/A

Computer: ITECOMP
Description:


A runtime exception was detected. Details follow.

Message: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))



Techinal Details:


System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))


at Microsoft.SharePoint.Utilities.SPUtility.HandleAccessDenied(Exception ex)


at Microsoft.SharePoint.SPGlobal.HandleUnauthorizedAccessException(UnauthorizedAccessException ex)


at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish)


at Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents)


at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents)


at Microsoft.SharePoint.SPListItem.Update()


at Microsoft.SharePoint.Publishing.Internal.LongRunningOperationJob.<>c__DisplayClassb.b__1()


at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


Then i tried accessing the existing sites. I can access those but there are issue in the existing sites
- Unable to activate / deactivate any of the features. When trying to Activate / De-activate it was navigating to the "Access Denied" page.
- Unable to run the OOTB SharePoint workflows.
- Unable to change the master pages. When trying to change the master pages from the Site Actions --> Modify all site settings, it was navigating to "Access Denied" page.


Then from the threads i even tried following things
dcomconfg settings and the "Disable Loop back check" options. Well that still didn't resolve this issue. One of the thread suggested to give the content access account full control access at the web application level. I applied that setting by following steps
a) Go to SharePoint Central Administration
b) Under the "Application Security" section click on "Policy for web application".
c) Make sure right web application is selected from the drop down at the right side of Menu bar
d) Click on the service account that is used for content access and make sure that account has "Full Control" permissions. Click Ok.


After these operations
- No Access Denied message while accessing newly created site collections
- No Access Denied message while changing the Master pages.
- No Access Denied message while activating /deactivating any of the features.


Hence we applied this as temporary fix. But this is the typical scenario, since all the other web applications have content access account "Full Read" permissions at the web application level. Something tells me this is not right fix and there should be some permanent fix or somethings that needs to be rechecked.


After some days we installed Nintex on the Production environment. In all sites in other web applications users are able to use the Nintex except for this web application where i applied this Temporary fix for Access Denied Issue. And even users complained that they are unable to use Simple OOTB Approval Workflow in the SharePoint. I checked the logs while running the workflows at that instance(Nintex). The status of the workflow sayd "Failed On Start" and the detailed message says "Workflow Cancelled by service SharePoint SSP account".  Below is the log information from the SharePoint logs.


01/28/2011 00:07:22.16 w3wp.exe (0x1B50) 0x1458 Windows SharePoint Services Workflow Infrastructure 72fs Unexpected RunWorkflow: System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties..ctor(SPWorkflow workflow, Int32 runAsUserId, String associationData, String initiationData) at Microsoft.SharePoint.Workflow.SPWinOEWSSService.MakeActivation(SPWorkflow workflow, SPWorkflowEvent e) at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(Guid trackingId, SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut) at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow originalWorkflow, SPWorkflow workflow, Collection`1 events, SPRunWorkflowOptions runOptions)



01/28/2011 00:07:22.16 w3wp.exe (0x1B50) 0x1458 Windows SharePoint Services Workflow Infrastructure 98d7 Unexpected System.ArgumentException: Value does not fall within the expected range. at Microsoft.SharePoint.Workflow.SPWorkflowActivationProperties..ctor(SPWorkflow workflow, Int32 runAsUserId, String associationData, String initiationData) at Microsoft.SharePoint.Workflow.SPWinOEWSSService.MakeActivation(SPWorkflow workflow, SPWorkflowEvent e) at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(Guid trackingId, SPWorkflowHostService host, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut) at Microsoft.SharePoint.Workflow.SPWorkflowManager.RunWorkflowElev(SPWorkflow originalWorkflow, SPWorkflow workflow, Collection`1 events, SPRunWorkflowOptions runOptions)


01/28/2011 00:07:22.24 w3wp.exe (0x1B50) 0x1458 Windows SharePoint Services Database 880l Verbose ConnectionString: 'Data Source=flnshp2p-sqls.corp.pep.pvt\sqlflnshp2p,60020;Initial Catalog=FLNA_Sales_Content;Integrated Security=True;Enlist=False;Connect Timeout=15' ConnectionState: Closed ConnectionTimeout: 15


Note: Nintex was built on top of the SharePoint designer. Hence if Nintex Works SharePoint workflows works and vice-versa)/.


And below is the event viewer log information


Event Type: Error

Event Source: Windows SharePoint Services 3

Event Category: General

Event ID: 6875

Date: 1/18/2011

Time: 8:46:19 PM

User: N/A

Computer: PRODCOMPWFE1
 Description:


Error loading and running event receiver Microsoft.Office.RecordsManagement.Internal.AuditHandler in Microsoft.Office.Policy, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c. Additional information is below.



: Transaction (Process ID 250) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.


For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.





Event Type: Error
Event Source: Windows SharePoint Services 3

Event Category: None

Event ID: 0

Date: 1/18/2011

Time: 8:46:58 PM

User: N/A

Computer: PRODCOMPWFE1


Description:


Nintex Workflow; Build: 11100 (http://ProdHostSite/_layouts/NintexWorkflow/preview.aspx?ListId=4aa6b188-b2c2-487b-9995-fff1a99ecc06&ItemId=2&WorkflowId=f3bace1e-d33b-4e78-87e3-040a00528ba2&mode=Runtime&InstanceId=fad57eac-e70b-4ab5-9ec3-9238ad028027)


Cannot find history for workflow with instanceId fad57eac-e70b-4ab5-9ec3-9238ad028027. It may have been removed from the database.



For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


Problems after problems. One fix leading to another issue. Not sure what is going on this environment. I thought this is Nintex issue and contacted them with the above information to look for any suggestions from them. Finally they responded and said that this is not the Nintex issue, moreover this is environment issue and posted the following link
http://blog.ozippy.com/2008/02/sharepoint-2007-workflow-on-start.html. Thanks a Lot to Jeremy and Rodney.


After going through this blog, i finally found the root cause for this error or issue. BINGOOOOOOOOOO.................


The issue here is the IIS App pool account and the SharePoint App pool account are not running under same identity. Hence refreshed the app pool identity of the central admin by following steps
 - Check the Application pool identity of the web application from the Internet Information Services   Manager .
    a) Log in to the WFE and then click on "Start" --> "Run", then in the window type inetmgr
    b) Expand the "Application pools" then select the application pool that has the issue right click on it and click on "Identity" tab.
    c) Check the "Application Pool" Identity. Below is the screen capture for reference
       


 - Go to SharePoint central Administration and click on the “Operations” tab. Under the “Security configuration” section click on “Service Accounts”.


 - In the “Credential Management” section select “Web Application Pool” then select “Windows SharePoint Services Web application”.
- Select “Application Pool” from drop down.
- Select the account as “Configurable” give the service account and respective password.


- Click Ok! these steps refresh the Application Pool Identity.


After I applying these steps there is


- No “Access Denied” message when changing the master pages (Which used to have before)
- No “Access Denied” message while activating and deactivating any feature
- No “Access Denied” message while accessing the newly created sites (for members, owners also for     the Site Collection Administrators)
- SharePoint OOTB workflows are running without issues
- Able to Activate Nintex and use it as well


Finally the above steps get rid off this "Access Denied" issue that i have seen so far. This had made my day. In the end i would like to say Happy SharePointing.


Cheers,


Vinay.

Tuesday, November 23, 2010

The form has been closed

This is the most common error that occurs while designing the Info-Path form. It also says the form template that is published in the Form library location is invalid. I had this issue a lot of times and most of the times the common thing i was missing while designing the New form is, i am not checking the option "Enable browser-compatible features only" while opening a "Blank" form. Once i am able to check that option while designing the form, then it was working fine for me. below is the screen capture for reference.

Monday, November 22, 2010

Timeout expired. The timeout period elapsed prior to completion of operation or the server is not responding

Last weekend our SQL servers are rebooted. This had the instance of NW2007 configuration DB. on mondya morning  the Pending Tasks and the New Tasks are not able to be viewed by the concerned approvers. When approvers clicking on the Tasks they are getting unexpected error. In the event viewer it says "Cannot find a corresponding human workflow task id for this task".

Event Type: Error

Event Source: Windows SharePoint Services 3
Event Category: None
Event ID: 0
Date: 11/22/2010
Time: 9:41:40 AM
User: N/A
Computer: COMPUTERNAME
Description:
Nintex Workflow; Build: 11100 (http://DOMAINNAME/_layouts/NintexWorkflow/ApproveReject.aspx?List=27d20a40-c30f-4a8c-978d-f9a1d772f02f&ID=937&Source=http://DOMAINNAME/AllItems.aspx)
Cannot find a corresponding human workflow task id for this task.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
 
Then we disabled custom error mode to get the detailed error message. Below is the error page information.
 

It seems like the connection between the Web front ends and the Databases of the Nintex workflow DB is missing.

Nintex suggested to check the connection settings between Web Front End and the server runnning the Nintex Workflow DB. We did the following things to get the issue reolved.
 
a) Go to SharePoint Central Administratioin --> Application Management
b) Under the Nintex Workflow Management click on "Database setup".
c) EDIT the Configuration Database that is already setup.
d) Following are the settings that has already setup
   Database Server, Database Name, ("Connect to an exisiting Database" checked)Database Authentication
   is "Windows Authentication".
e) Clicked on "Ok" at the end of the page.
 
That's it. The magic is it reset the connection between the Web Front End and the Server connecting the Nintex Worklfow database.
Everything is working fine now.
Thanks to the Nintex support for asking to check the connectivity.

Saturday, August 28, 2010

How do i change the Host File Information

In Windows XP the host file information is setup in the following path by default
c:\windows\system32\drivers\etc\host

You can edit this file using the note pad and can give the IP names and the host header information there so that it redirects you to the remote sites that are hosted by the servers.

for instance i had the following requirement
156.81.248.28 http://testwip.mycompany.pvt/

If you add this host information in your host file it will redirect you to that location.

Friday, March 5, 2010

A required previlige is not held by the client

The remote shutdown option is always safer option to restart the server. This is ideal option when the server is virtual because when you restart the server from the server itself some times server fails to start up.

Syntax: shutdown -r -f -m MachineName

r - restart
f - force
m - machine

But sometimesThe remote shutdown cannot run sometime due to lack of previliges. We can check the following things
Start --> Run gpedit.msc
Go to
Computer Configuration --> Windows Settings--> Security Settings --> Local Policies --> User Rights Assignment
Double Click on "Shut Down the System"

Check if the following groups are listed

Administrators
Backup Operators
Power Users
Users

If any of them are missing, add them.

Monday, March 1, 2010

Server Out Of Memory

Server Out of Memory

There is no memory on the server to run your program. Please contact your administrator with this problem.

I have got the above exception when trying to downlaod a large flash file to local drive.which is about 198 MB. After following some blogs and IISRESET on the server caused to get rid of the exception.

Start --> Run --> IISRESET

I believe IISRESET causes to clean up the temporary file storage and also cleans up the application pool which get rids of the Out Of Memory exception and also the server that we had has POC server which is very old.

Please feel free to comment on this post so that i can update this post effectively.

Cheers,

Vinay.

Thursday, February 4, 2010

There are no page layout files available in the master page library of the top-level site. Add one or more page layouts to this library before you create a page or set page properties

I created the blank site and activated the publishing features. After this i have migrated the content frm one site to other site using SharePoint content Deployment wizard tool. Then tried to create the page. Here is the error i got when i ctried to create page.

There are no page layout files available in the master page library of the top-level site. Add one or more page layouts to this library before you create a page or set page properties.

Below are the steps i followed
1) Navigate to the master page gallery (Site Actions --> Site Settings --> Modify All Site Settings)
2) Under the galleries section go to "Master pages and page layouts".
3) In the "Master Pages abd page layouts" library click on "document Library settings"
4) Then go to "Advanced settings".
5) Here go to "Allow management of content types" is equal to "Yes".
6) Then "document library settings" page under the "content types" section click "change new button order and default content type".
7) Check the first two and modify the order. Then click Ok.

That fixed this issue. Will be updating the reasons for this error in next post.

Please post your ideas.