Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

When i debug in the event reciever(item adding) as soon as it reached the if condition i get the following error

unable to automatically step into the server.The remote procedure could not be debugged. This usually indicates that the debugging has not been enabled on the server.

 SPServiceContext serviceContext = SPServiceContext.GetContext(Osite);
       UserProfileManager upm = new UserProfileManager(serviceContext);

       UserProfile u = upm.GetUserProfile(accNames);
       if (u[PropertyConstants.WorkEmail].ToString() != null || u[PropertyConstants.WorkEmail].ToString() != string.Empty)
       {

I am working on a remote machine in the dev environment..i also turn the the debug = false to true in webconfig file..but no luck..any suggestions?

share|improve this question
    
when you say remote machine, is the debugger running on the same machine that the SharePoint server and User Profile Serview are executing on? –  GavinB Jan 25 '12 at 3:44
    
yes it is on the same machine –  spStacker Jan 25 '12 at 4:15
1  
Although not answering your question, I am wondering if you could avoid using User Profile to get email address for a given account name. See msdn.microsoft.com/en-us/library/ms478576.aspx –  Ashish Patel Jan 25 '12 at 4:18
    
I debugged it again ..when it was on if(u[PropertyConstants.WorkEmail].ToString() != .. condition it gave the error in the pop pup box i..so clicked ok, and then when i pressed f11 ..it did allow to again to debug through...i think its just the part when the code is getting information from the user profiles, it does not allow to debug –  spStacker Jan 27 '12 at 15:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.