sitecore publishing initializing 7.1 - sitecore

My website worked right.
Yesterday I setup Windows Server 2008 SP1 patch, and some safe files:
KB3011780,KB4012212,KB976902
and then, publish item does not work!
This is the error image:
And below are the logs:
Heartbeat 12:47:58 ERROR Exception while handling event Sitecore.Publishing.StartPublishingRemoteEvent
Exception: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: System.Web
at System.Web.Security.Roles.IsUserInRole(String username, String roleName)
at Sitecore.Security.Accounts.RolesInRolesProvider.IsUserInRole(User user, Role targetRole, Boolean includeIndirectMemberships)
at Sitecore.Security.AccessControl.AccessRule.RuleApplies(Account account, AccessRight accessRight, PropagationType propagationType, Boolean includeRoleMembers, Boolean includeEveryoneMembers)
at Sitecore.Security.AccessControl.AccessRuleCollectionHelper.GetMatchingRule(Account account, AccessRight accessRight, PropagationType propagationType, AccessPermission permission, Boolean includeRoleMembers, Boolean includeEveryoneMembers)
at Sitecore.Security.AccessControl.AccessRuleCollectionHelper.GetMatchingRule(Account account, AccessRight accessRight, PropagationType propagationType)
at Sitecore.Security.AccessControl.ItemAuthorizationHelper.GetItemAccess(Item item, Account account, AccessRight accessRight, PropagationType propagationType)
at Sitecore.Buckets.Security.AuthenticationHelper.GetItemAccess(Item item, Account account, AccessRight accessRight, PropagationType propagationType)
at Sitecore.Security.AccessControl.ItemAuthorizationHelper.GetAncestorAccess(Item item, Account account, AccessRight accessRight, PropagationType propagationType)
at Sitecore.Security.AccessControl.ItemAuthorizationHelper.GetItemAccess(Item item, Account account, AccessRight accessRight, PropagationType propagationType)
at Sitecore.Buckets.Security.AuthenticationHelper.GetItemAccess(Item item, Account account, AccessRight accessRight, PropagationType propagationType)
at Sitecore.Security.AccessControl.ItemAuthorizationHelper.GetAccess(Item item, Account account, AccessRight accessRight)
at Sitecore.Security.AccessControl.AuthorizationProvider.GetAccess(ISecurable entity, Account account, AccessRight accessRight)
at Sitecore.Security.AccessControl.AuthorizationManager.IsAllowed(ISecurable entity, AccessRight right, Account account)
at Sitecore.Data.Managers.ItemProvider.ApplySecurity(Item item, SecurityCheck securityCheck)
at Sitecore.Data.Managers.ItemManager.GetItem(String itemPath, Language language, Version version, Database database)
at Sitecore.Publishing.PublishOptions.GetPublishingTargets()
at Sitecore.Publishing.PublishOptions..ctor(Database sourceDatabase, Database targetDatabase, PublishMode mode, Language language, DateTime publishDate)
at Sitecore.Publishing.DistributedPublishingManager.DecodeOptions(DistributedPublishOptions options)
at Sitecore.Publishing.DistributedPublishingManager.GetOptions(DistributedPublishOptions[] options)
at Sitecore.Publishing.DistributedPublishingManager.StartPublishing(StartPublishingRemoteEvent event)
at Sitecore.Events.Event.EventSubscribers.RaiseEvent(String eventName, Object[] parameters, EventResult result)
at Sitecore.Events.Event.RaiseEvent(String eventName, Object[] parameters)
at Sitecore.Eventing.Remote.RemoteEventMap.OnGenericRemoteEvent[TEvent](TEvent event)
at Sitecore.Eventing.EventProvider.RaiseEvent(Object event, Type eventType, EventContext context)

If you have the “Trace Failed Requests” feature enabled, it may cause such errors when HttpContext is not available. Try disabling it or, at least, decreasing tracing level down to “Warning”
<add provider="ASPNET" ... verbosity="Warning" />
Find more info about Trace Failed Requests here.

sometimes it worked normally ,sometimes do not work.
i copy the website files to another server,it work!
somebody know why? thank you very much!

Related

Why can't I get more attributes from google provider via cognito UserInfo endpoint?

I have configured google provider via cognito user pool and I am able to login through google and get user information. And I have added many attributes on the attribute mapping page as shown in below screenshot.
The endpoint I am using to get user info is https://docs.aws.amazon.com/cognito/latest/developerguide/userinfo-endpoint.html.
The response data for user info is always:
data: {
identities: '[{"userId":"xxxx","providerName":"Google","providerType":"Google","issuer":null,"primary":true,"dateCreated":1587772412295}]',
email_verified: 'true',
email: 'xxxx#gmail.com',
username: 'Google_1xxxx'
}
Regardless how I update the attribute mappings, I always see above response. Why can't I get additional attributes like picture, given_name, birthday etc. Do I need to set any permission on google side?
In app client setting, I have below configuration:
In authorized scope, I have set: email openid profile

Add user attribute in IdToken AWS cognito Service

Consider I Have Following Attribute In user pool
username
first-name
last-name
location
How to add All attribute in IdToken after successful authentication
As per the ID Token specification, the response claim doesn't have these attribute values (user name, first & last name, location etc.).
However, as part of the standard claim, you can get these attributes using USERINFO endpoint.
ID Token

Check Whether person logged in is user or admin in sharepoint

How to check whether the person loggen in user or admin by checking permissions in sharepoint.
You can use SpServices to determine the permission levels for a user. You can use the below code in document.ready function.
$().SPServices({
operation: "GetRoleCollectionFromUser",
userLoginName: $().SPServices.SPGetCurrentUser(),
async: false,
completefunc: function(xData, Status) {
$(xData.responseXML).find("Role").each(function() {
alert($(this).attr('Name'))
});

Why does my access token do not return my events and the Graph API explorer access token does?

Using the graph api explorer access token as below with scopes read_stream and user_events it does return my created events.
App ID: 145634995501895 : Graph API Explorer
User ID: xxxx: xxxx
Issued: Unknown
Expires: 1361847600 (in about an hour)
Valid: True
Origin: Unknown
Scopes: read_stream user_events
But when I'm using my app and authenticate it through web browser, it does not return any events.
App ID: xxx: xxxx
User ID: xxx: xxxx
Issued: 1361843644 (about a minute ago)
Expires: 1367027644 (in about 2 months)
Valid: True
Origin: Web
Scopes: manage_pages read_friendlists read_stream user_events user_questions
Here's my fql:
fql?q={'posts':'SELECT post_id,target_id,actor_id,tagged_ids,with_tags, message,description,attachment, likes, comments,type, updated_time, created_time, action_links, attribution FROM stream WHERE source_id=me() order by updated_time desc LIMIT 25',
'options':'SELECT id, question_id, votes,name FROM question_option where question_id in (SELECT attachment.fb_object_id FROM #posts)',
'voters':'SELECT option_id, voter_id FROM question_option_votes WHERE option_id IN (SELECT id FROM #options)',
'question':'SELECT id, owner, question FROM question WHERE id in (SELECT attachment.fb_object_id FROM #posts)',
'profile':'SELECT id, pic_square, type, name, username, url FROM profile WHERE id IN (SELECT target_id,actor_id,tagged_ids,with_tags,comments.comment_list.fromid FROM #posts) OR id in (SELECT voter_id FROM #voters)'
}

How can use topologymanager obsolete Namespace in Custom SharePoint Web Service?

I am unable to Use the Topologymanager class inside the namespace Microsoft.SharePoint.Portal.Topology. I searched a lot. Its urgent. Thanks
I am getting the following error. When I include the namespace "Microsoft.SharePoint.Portal.Topology" in my Custom Web service.
A runtime exception was detected.
Details follow. Message: Cannot open
database "WSS_Content_Dev3" requested
by the login. The login failed. Login
failed for user
Techinal Details:
System.Data.SqlClient.SqlException:
Cannot open database
"WSS_Content_Dev3" requested by the
login. The login failed. Login failed
for user .
at
System.Data.SqlClient.SqlInternalConnection.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.SqlInternalConnectionTds.CompleteLogin(Boolean
enlistOK) at
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword,
Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection
owningObject) at
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean
redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString
connectionOptions, Int64 timerStart)
at
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString
connectionOptions, String newPassword,
Boolean redirectedUserInstance) at
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString
connectionOptions, Object
providerInfo, String newPassword,
SqlConnection owningObject, Boolean
redirectedUserInstance) at
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo,
DbConnectionPool pool, DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection
owningConnection,
DbConnectionPoolGroup poolGroup) at
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) at
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory
connectionFactory) at
System.Data.SqlClient.SqlConnection.Open()
at
Microsoft.Office.Server.Data.SqlSession.OpenConnection()
at
Microsoft.Office.Server.Data.SqlSession.ExecuteNonQuery(SqlCommand
command) at
Microsoft.Office.Server.Data.SqlDatabaseManager.HasAccess(String
user) at
Microsoft.Office.Server.Administration.SharedResourceProvider.SynchronizeAccessControl(SharedComponentSecurity
sharedApplicationSecurity) at
Microsoft.Office.Server.Administration.SharedResourceProvider.Microsoft.Office.Server.Administration.ISharedComponent.Synchronize()
Finally got the solution:
When you Use the templogymanager inside the web service directly or even include the namespace "Microsoft.SharePoint.Portal.Topology" at the top of the custom web service. It gives you error. I did the following thing.
I create the helper project in which I used the namespace Microsoft.SharePoint.Portal.Toplogy.
Compile it and put the dll into GAC.
Add the .dll reference to my project.
Then I called the helper Method in my custom web service.
Problem Solve.