HTTP status 401: Unauthorized. error on Web Part Page.
Hi All,
I have a SharePoint 2007 Intranet. I have one page under one of the subsites like
http://MyServer/communications/Product/Pages/instructions.aspx. whenever i am adding a webpart to it it gives me following error. I am the SCA for this site.
Server Error in '/' Application.
The request failed with HTTP status 401: Unauthorized.
Description:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[WebException: The request failed with HTTP status 401: Unauthorized.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +412862
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +300
NobelBiocare.GMT.net.nobelbiocare.marketingtoolbox.DataAccessWSService.findRecordsByQuery(String alias, Int32 start, Int32 count, Int32 mode, Order[] orders, Query query) +247
NobelBiocare.GMT.GmtFacade.GetRecords(GmtAlias alias, GmtMode mode, Int32 start, Int32 count, Order[] orders, FieldValue[] fields) +1296
NobelBiocare.GMT.GmtFacade.GetRecords(String[] types, String[] brands, String order, GmtMode mode, GmtAlias alias, Int32 start, Int32 count) +882
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +1255
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +38
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +897
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1848
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +27
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +261
System.Web.UI.WebControls.ListView.PerformSelect() +74
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.ListView.CreateChildControls() +74
System.Web.UI.Control.EnsureChildControls() +146
System.Web.UI.Control.PreRenderRecursiveInternal() +61
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394
I have checked the logs:
IIS LOGS in the event Viewer:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 3/10/2011 1:52:31 PM
Event time (UTC): 3/10/2011 12:52:31 PM
Event ID: d71eb2328a5948308dcec21ca18bf6f2
Event sequence: 6561
Event occurrence: 265
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/795071984/Root-1-129442103970240967
Trust level: WSS_Custom
Application Virtual Path: /
Application Path: d:\inetpub\wwwroot\wss\VirtualDirectories\86\
Machine name: NBCIISCPH801V
Process information:
Process ID: 3092
Process name: w3wp.exe
Account name: NOBELBIOCARE\nbc_moss_portal_t
Exception information:
Exception type: TargetInvocationException
Exception message: Exception has been thrown by the target of an invocation.
Request information:
Request URL:
http://pp-intranet.nobelbiocare.net/communications/Product/Pages/instructions.aspx
Request path: /communications/Product/Pages/instructions.aspx
User host address: 193.88.157.74
User: NOBELBIOCARE\NBC_MOSS_Farm_T
Is authenticated: True
Authentication Type: NTLM
Thread account name: NOBELBIOCARE\nbc_moss_portal_t
Thread information:
Thread ID: 13
Thread account name: NOBELBIOCARE\nbc_moss_portal_t
Is impersonating: False
Stack trace: at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance)
at System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
at System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback)
at System.Web.UI.WebControls.DataBoundControl.PerformSelect()
at System.Web.UI.WebControls.ListView.PerformSelect()
at System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
at System.Web.UI.WebControls.ListView.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
------------------------------------------------------------------------------------------------------
SHAREPOINT LOGS:
A runtime exception was detected. Details follow.
Message: Cannot insert duplicate key row in object 'dbo.UserMemberships' with unique index 'CX_UserMemberships_RecordId_MemberGroupId_SID'.
The statement has been terminated.
Techinal Details:
System.Data.SqlClient.SqlException: Cannot insert duplicate key row in object 'dbo.UserMemberships' with unique index 'CX_UserMemberships_RecordId_MemberGroupId_SID'.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.Office.Server.Data.SqlSession.ExecuteNonQuery(SqlCommand command)
at Microsoft.Office.Server.UserProfiles.WSSSynchSqlSession.SynchExecuteNonQuery(SqlCommand cmd, Boolean throwOnFail)
at Microsoft.Office.Server.UserProfiles.WSSSynchSqlSession.SynchExecuteNonQuery(SqlCommand cmd)
at Microsoft.Office.Server.UserProfiles.SiteSynchronizer.WriteChangeLogConsumed()
at Microsoft.Office.Server.UserProfiles.SiteSynchronizer.Synch()
at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock)
---------------------------------------------------------------------------------------------------------
A runtime exception was detected. Details follow.
Message: Cannot insert duplicate key row in object 'dbo.UserMemberships' with unique index 'CX_UserMemberships_RecordId_MemberGroupId_SID'.
The statement has been terminated.
Techinal Details:
System.Data.SqlClient.SqlException: Cannot insert duplicate key row in object 'dbo.UserMemberships' with unique index 'CX_UserMemberships_RecordId_MemberGroupId_SID'.
The statement has been terminated.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
Any ideas please!!!!!!!!!!!
Thanks and Regards, Amreesh Sharma| MCTS MOSS 2007| SharePoint Administrator
March 11th, 2011 1:04am
Hi Amreesh,
Please check permission of the account with which you are adding the web part on the page.
Make sure application pool account is running and also check if the password is changed or not for that account.
If possible use farm admin account to add that web part.
Please let us know after above checking.Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
March 11th, 2011 9:48am
Hi Amreesh,
Please check permission of the account with which you are adding the web part on the page.
Make sure application pool account is running and also check if the password is changed or not for that account.
If possible use farm admin account to add that web part.
Please let us know after above checking.Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/
March 11th, 2011 9:48am
Hi Pratik,
Thanks for your reply. I am adding webpart to the page as SCA. I have checked the Application poll account as well. Its the same login ID by which i Logging into the Sharepoint site as SCA. The password for this account has not been changed yet. We are using
same username and password since the time this username was created in October 2010. I am using this SCA in "Home Owners" Group which has full permission on this site. Any other ideas?Thanks and Regards, Amreesh Sharma| MCTS MOSS 2007| SharePoint Administrator
Free Windows Admin Tool Kit Click here and download it now
March 14th, 2011 7:08am
Hi Amreesh,
Is this account added to all three WSS groups and also check it in local admin group.
If not please add it and check.Warm Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/
March 14th, 2011 8:03am
Hi Pratik,
I have three WSS groups namely WSS_ADMIN_WPG, WSS_RESTRICTED_WPG, WSS_WPG. The user is added to all the 3 groups. User is also added to the Local admin group as an Administrator.
and I have another group called IIS_WPG, user is added to this group also. Please suggest.
Thanks and Regards, Amreesh Sharma| MCTS MOSS 2007| SharePoint Administrator
Free Windows Admin Tool Kit Click here and download it now
March 14th, 2011 9:45am
Yes we can try after adding the farm admin account to WSS_WPG group.
If that will not work then we can remove it later on.Warm Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/
March 14th, 2011 9:52am
Hi Pratik,
I have added the user to all groups including IIS_WPG. but still the same result. any ideas?Thanks and Regards, Amreesh Sharma| MCTS MOSS 2007| SharePoint Administrator
Free Windows Admin Tool Kit Click here and download it now
March 14th, 2011 11:33am
HI Amreesh,
Are you using kerberos authentication ? and which web part you are trying to add ?
Warm Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/
March 14th, 2011 12:22pm
Hi Pratik, We are not using Kerberos but Windows authentication. I am trying to add a webpart named as "GMT Documents Webpart by Crealogix". Our third party vendor has developed it.Thanks and Regards, Amreesh Sharma| MCTS MOSS 2007| SharePoint Administrator
Free Windows Admin Tool Kit Click here and download it now
March 14th, 2011 1:01pm
>I am trying to add a webpart named as "GMT Documents Webpart by Crealogix". Our third party vendor has >developed it.
In that case you should ask them for assistance. For all we know the problem could be linked to only that particular web part and the chances of someone else visting these forums having the same web part is likely to be very small.
ModeratorSP 2010 "FAQ" (mainly useful links):
http://wssv4faq.mindsharp.com/default.aspx
WSS3/MOSS FAQ (FAQ and Links) http://wssv3faq.mindsharp.com/default.aspx
Both also have links to extensive book lists and to (free) on-line chapters
March 14th, 2011 1:05pm
Oh Yea. Was thinking that may be the problem from the permissions side or from the SSP side as well but cannot conclude that now. So will ask the Dev team now. Thanks anyways Mike...Thanks and Regards, Amreesh Sharma| MCTS MOSS 2007| SharePoint Administrator
Free Windows Admin Tool Kit Click here and download it now
March 14th, 2011 1:23pm