Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sharepoint 2010 - issue creating an activity news feed

Posted on 2013-12-15
7
Medium Priority
?
260 Views
Last Modified: 2014-03-05
Wow this is rough...I dont see much on the net ...the samples I do...dont work very well...

I am using this link:
http://blogs.microsoft.co.il/johnnyt/2011/03/26/working-with-sharepoint-2010-user-activity-newsfeed/


to create an activity newsfeed...everything isd working fine..however the issue I am having is that SPServiceContext and SPContext do not work inside event handlers like the an event reciever ...FeaturedActivated...any ideas?
0
Comment
Question by:GlobaLevel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 10

Author Comment

by:GlobaLevel
ID: 39720149
anyone?
0
 
LVL 32

Expert Comment

by:Jamie McAllister MVP
ID: 39757956
If you absolutely need SPContext in an Event Handler you can use this approach;

http://blogs.msdn.com/b/andrasg/archive/2011/06/27/what-to-do-when-spcontext-is-null-but-you-need-it.aspx
0
 
LVL 51

Accepted Solution

by:
Ted Bouskill earned 2000 total points
ID: 39758536
I have seen issues with the SPContext and SPServiceContext when the Alternate Access Mapping isn't set correctly.  Especially if someone has been changing the host header mappings in IIS.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Author Comment

by:GlobaLevel
ID: 39809123
Can you explain what you mean by alternative access mapping and why that is a factor
0
 
LVL 32

Expert Comment

by:Jamie McAllister MVP
ID: 39810021
You stated you were using Event Handlers? It's quite normal not to have access to SPContext in an event receiver. AAM doesn't come into it for that scenario.

http://blogs.msdn.com/b/andrasg/archive/2011/06/27/what-to-do-when-spcontext-is-null-but-you-need-it.aspx
0
 
LVL 10

Author Closing Comment

by:GlobaLevel
ID: 39906562
Great
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question