Solved

Sharepoint 2010 - issue creating an activity news feed

Posted on 2013-12-15
7
245 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
  • 3
  • 2
7 Comments
 
LVL 10

Author Comment

by:GlobaLevel
ID: 39720149
anyone?
0
 
LVL 31

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 500 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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 31

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

947 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now