Comments (13)
Huge thanks to Travis for digging in. Using the enum fixed the problem for us as well. We can now test with 5.9.0
from quickbooks-v3-dotnet-sdk.
This seems to me like a dll hell issue. Please clean your references, do a clean solution, add the latest package n then retry. That should fix this issue.
from quickbooks-v3-dotnet-sdk.
I have checked all dll's in the bin folder. They all are all 5.8 version from ipp.Core to ipp.WebhooksService.
I have tried removing the package from Nuget. doing fresh install.
The result is the same when I deploy our build to Azure. With 5.8 we might be able to call the integration a few times, but eventually it will fail when refreshing the access token. If I redeploy our build using 5.6, it runs without interruption.
from quickbooks-v3-dotnet-sdk.
I pushed 5.9.0 package to Nuget. Try downloading it and see if that resolves your issues. Did you try removing the bin n debug folders too after uninstalling the package?Generally that helps.
from quickbooks-v3-dotnet-sdk.
I had this same issue when upgrading from 5.6.0 to 5.9.0. It looks like a bug introduced by this commit in DiscoveryClient.cs:
Passing in the full URL to DiscoveryClient used to work, but it does not now:
DiscoveryClient discoveryClient =
new DiscoveryClient("https://developer.api.intuit.com/.well-known/openid_sandbox_configuration/");
var _discoveredEndpoint = discoveryClient.Get();
The above call returns the following error, which shows the prod route appended to the end of the passed in url:
Error connecting to https://developer.api.intuit.com/.well-known/openid_sandbox_configuration/.well-known/openid_configuration/: Not Found
Passing in the AppEnvironment enum to the DiscoveryClient constructor resolves to the correct url:
DiscoveryClient discoveryClient = new
DiscoveryClient(Intuit.Ipp.OAuth2PlatformClient.Helpers.AppEnvironment.Sandbox);
Edit: The issue looks like it is from the linked commit adding a trailing slash to the ProdDiscoveryEndpoint and SandBoxDiscoveryEndPoint in the Discovery class.
from quickbooks-v3-dotnet-sdk.
Fixed in 5.9.1. The trailing slash was indeed the culprit. Thanks!
from quickbooks-v3-dotnet-sdk.
Seeing this same behavior in 7.5.0. Uninstalled and re-installed everything. Oddly, the same code in a console app (instead of my Web API app) works...
`OAuth2Client oauthClient = new OAuth2Client(clientId, clientSecret, 'https://developer.intuit.com/v2/OAuth2Playground/RedirectUrl', 'sandbox');
var tokenResp = oauthClient.RefreshTokenAsync(refreshToken).Result;`
Value cannot be null.
Parameter name: endpoint
at Intuit.Ipp.OAuth2PlatformClient.TokenClient..ctor(String endpoint, HttpMessageHandler innerHttpMessageHandler)
at Intuit.Ipp.OAuth2PlatformClient.TokenClient..ctor(String endpoint, String clientId, String clientSecret, HttpMessageHandler innerHttpMessageHandler, AuthenticationStyle style)
at Intuit.Ipp.OAuth2PlatformClient.OAuth2Client.d__29.MoveNext()
from quickbooks-v3-dotnet-sdk.
7.5.0 is the SDK version that works with .Net full framework 4.6.1 or higher full frameworks.
Please make sure that you are using .Net frameworks 4.6.1 or higher.
Also, make sure that TLS1.2 is being used by your code. Enable fiddler logs.
Blog for TLS1.2 update- https://developer.intuit.com/hub/blog/2018/07/11/tls-1-0-1-1-deprecation-intuit-developers
Please follow the steps mentioned here- https://developer.intuit.com/hub/blog/2017/08/03/upgrading-your-apps-to-support-tls-1-2
to make just an http call to this url- https://tlstest.intuit.com
Code example-
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; //Add this just to be sure to use TLS1.2
var result = string.Empty;
using (var webClient = new WebClient())
{
result = webClient.DownloadString("https://tlstest.intuit.com");
}
Download Fiddler from Google and run it alongside your code to log raw requests and responses along with URL and headers to confirm that your calls are using TLS1.2 protocol. If the calls works for the url above then your QBO api sandbox/prod calls will also work once the change goes live after Dec 31st, 2017. I have also added how the fiddler logs would look like once you test your code.
When you download Fiddler, open it, go to Tools > Fiddler Option > Enable (Tick Mark) Capture HTTPS connects > Do not Enable Decrypt Https traffic (https://textslashplain.com/2015/10/12/viewing-https-handshakes-in-fiddler/). Thatβs it. No other setting is required. The .NET localhost is by default captured in Fiddler, so after you have enabled https traffic in Fiddler just run your code. (Fiddler should be open.) You will see requests and responses logged in Fiddler.
You should set 'decode the raw request body' by clicking on the yellow bar in Fiddler. Then go to the File menu on top, select Save all session > Save the fiddler session. A .saz file is created, which can be viewed later.
So, for checking TLS version, you need to set Do not Enable Decrypt Https traffic in fiddler.
But I would also like to see the exact request and response which is failing, so send me the logs by running youe code again with fiddler having this setting-
Enable Decrypt Https traffic in fiddler.
Another thing to check is the registry keys if something works on your machine but not on client's machine-
https://stackoverflow.com/questions/43872575/net-framework-4-6-1-not-defaulting-to-tls-1-2
http://www.excel-fsm.com/ExcelFSM.html#IssuesAnswers
@rkasaraneni20
from quickbooks-v3-dotnet-sdk.
Thanks for the quick response! The following code gives me the error:
The remote server returned an error: (503) Server Unavailable.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; var result = string.Empty; using (var webClient = new WebClient()) { result = webClient.DownloadString("https://tlstest.intuit.com"); }
I'm running ASP.NET Web API using .NET Full Framework 4.6.1 on IIS Express.
from quickbooks-v3-dotnet-sdk.
GET https://tlstest.intuit.com/ HTTP/1.1
Host: tlstest.intuit.com
HTTP/1.1 503 Service Temporarily Unavailable
Server: awselb/2.0
Date: Fri, 14 Jun 2019 01:17:42 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 20
Connection: keep-alive
Resource Unavailable
from quickbooks-v3-dotnet-sdk.
Can you please check whether the DiscoveryURL is valid or not..
from quickbooks-v3-dotnet-sdk.
Figured it out! Saw an error in the OAuth2Client that it could not load 'System.Diagnostics.DiagnosticSource'. Installed latest System.Net.Http and it resolved the issue. Thanks!
from quickbooks-v3-dotnet-sdk.
Thats nice to hear.. Let us know if you face any issues.
from quickbooks-v3-dotnet-sdk.
Related Issues (20)
- Should SalesItemLineDetail have a UnitPrice property? HOT 3
- Refund Receipts and Credit Memos
- .NET Compatability HOT 1
- Connect
- Connect_tartle.co
- Remove ancillary serilog dependencies
- BinaryFormatter is used in your code HOT 1
- NuGet package no longer lists Newtonsoft.Json as a dependency, but it's still required HOT 2
- Sales Order
- Please remove Serilog dependencies
- IppDotNetSdkForQuickBooksApiV3 all nuget package versions are deprecated? HOT 2
- Please remove serilog dependencies HOT 10
- Can't add a TaxCode, URL SDK is using is incorrect
- serilog dependencies
- Unable to get the Vendor Credit applied to a bill
- Yet another problem due to serilog dependencies HOT 1
- "Invalid URI or Environment" in Blazor WASM app HOT 1
- BadRequest on SalesReceipt Add when using SalesLineItemDetail HOT 4
- When using the attachment API to upload the png file with content type "image/png" it does not upload the file comes back with null Attachable. Works for every other file type.
- Date deserialization broken since 14.6.3.5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quickbooks-v3-dotnet-sdk.