Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Get 50% OFF QuickBooks for 3 months*
Buy nowOAuth2RequestValidator oauthValidator = new OAuth2RequestValidator(principal.FindFirst("access_token").Value);
showing error:- System.NullReferenceException: 'Object reference not set to an instance of an object.'
It's our pleasure that you've posted here in our Community forum, Naveen. Thanks for reaching out to us.
Our top priority is to help you resolve your problem. But I need more details about it. Would you mind sharing what QuickBooks Online activity you were processing at the time this error message appeared? Any additional information you can provide to help us choose and give you the best resolution would be greatly appreciated.
I'm looking forward to helping you in the future. Have a nice day!
public ServiceContext IntializeContext(string realmId)
{
var principal = User as ClaimsPrincipal;
OAuth2RequestValidator oauthValidator = new OAuth2RequestValidator(principal.FindFirst("access_token").Value);
ServiceContext serviceContext = new ServiceContext(realmId, IntuitServicesType.QBO, oauthValidator);
//Enable minorversion
serviceContext.IppConfiguration.MinorVersion.Qbo = "23";
//Enable logging
//serviceContext.IppConfiguration.Logger.RequestLog.EnableRequestResponseLogging = true;
//serviceContext.IppConfiguration.Logger.RequestLog.ServiceRequestLoggingLocation = @"C:\IdsLogs";//Create a folder in your drive first
return serviceContext;
}
Thank you for turning to the Community about your concern, Naveen Baghel.
I want to ensure I can provide an accurate solution to your concern. To get me on the same page, I have to ask for more details.
May I know if you're trying to integrate an application with QuickBooks Online (QBO)? What specific task did you perform? Which area in your company did you encounter the error?
While waiting for your response, let me share the link to the Community page. From there, you'll gain access to our tools and resources to help you run and grow your business. Simply choose the topic from the list that suits your concern.
I appreciate any information you can share. I'm looking forward to working with you again, Baghel.
You have clicked a link to a site outside of the QuickBooks or ProFile Communities. By clicking "Continue", you will leave the community and be taken to that site instead.
For more information visit our Security Center or to report suspicious websites you can contact us here