[英]How to enable Request and Response Logging in the .Net DevKit V2
如何為XML啟用日志記錄?
我嘗試按照http://docs.developer.intuit.com/0025_Intuit_Anywhere/0200_DevKits/0100_IPP_.NET_DevKit/0600_Logging的指示進行操作
我將代碼放在從HelloIntuitAnywhere派生的測試程序中以進行事務添加
所以我把它放在InvoiceAdd程序的正常設置下
realmId = HttpContext.Current.Session["realm"].ToString();
accessToken = HttpContext.Current.Session["accessToken"].ToString();
accessTokenSecret = HttpContext.Current.Session["accessTokenSecret"].ToString();
consumerKey = ConfigurationManager.AppSettings["consumerKey"].ToString(CultureInfo.InvariantCulture);
consumerSecret = ConfigurationManager.AppSettings["consumerSecret"].ToString(CultureInfo.InvariantCulture);
intuitServiceType = (IntuitServicesType)HttpContext.Current.Session["intuitServiceType"];
oauthValidator = new OAuthRequestValidator(accessToken, accessTokenSecret, consumerKey, consumerSecret);
context = new ServiceContext(oauthValidator, realmId, intuitServiceType);
commonService = new DataServices(context);
////////////////////////////////////////////
//OAuthRequestValidator
oauthValidator = new OAuthRequestValidator("<<accessToken>>",
"<<accessTokenSecret>>",
"<<consumerKey>>",
"<<consumerSecret>>");
//ServiceContext
context = new ServiceContext(oauthValidator, realmId, IntuitServicesType.QBO);
context.EnableServiceRequestsLogging = true;
context.ServiceRequestLoggingLocation = @"c:\IPPlogs";
//////////////////////////////////////////
但是在上獲取InvalidTokenException
context = new ServiceContext(oauthValidator, realmId, IntuitServicesType.QBO);
這是兩個用於在SDK中啟用.Net或Java日志記錄的論壇帖子,也是Java .Net的博客帖子https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0200_DevKits_for_Intuit_Partner_Platform/0100_IPP_.NET_DevKit/0600_Logging
Java http://ippblog.intuit.com/blog/2012/07/ipp-java-devkit-logger.html
謝謝
賈里德
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.