The supplied Uri is not valid for the current service

This thread is now closed to new comments.
Some of the links and information provided in this thread may no longer be available or relevant.
If you have a question please start a new post.
Contributing Cover User options
7 Posts
Contributing Cover User
Contributing Cover User

7Posts

0Kudos

0Solutions

The supplied Uri is not valid for the current service

hi there,

 

I'm trying to use AccountRight APIs for desktop version to create and update or even get an existing supplier. Unfortunately if keeps failing weirdly. Below is the exception:

 

StackTrace:
       at MYOB.AccountRight.SDK.Extensions.ExceptionExtensions.ProcessException(Exception ex, Uri requestUri) in c:\projects\accountright-live-api-net-sdk\MYOB.API.SDK\SDK\Extensions\ExceptionExtensions.cs:line 68
       at MYOB.AccountRight.SDK.Services.ServiceBase.MakeApiGetRequestSync[T](Uri uri, ICompanyFileCredentials credentials, Action`1 transform, String eTag) in c:\projects\accountright-live-api-net-sdk\MYOB.API.SDK\SDK\Services\ServiceBase.cs:line 148
       at MYOB.AccountRight.SDK.Services.ReadableService`1.Get(CompanyFile cf, Guid uid, ICompanyFileCredentials credentials, String eTag) in c:\projects\accountright-live-api-net-sdk\MYOB.API.SDK\SDK\Services\Version2\ReadableService.cs:line 55
       at AccountingDirect.Core.Services.MYOB.SupplierImportService.GetSupplier(ICredential credential, Guid uid) in c:\Users\nguyenxuan.nguyen\Documents\Visual Studio 2013\Projects\LEAccountingDirect\AccountingDirect.Core\Services\MYOB\SupplierImportService.cs:line 66
       at AccountingDirect.Core.Services.MYOB.SupplierImportService.Import[T](ICredential credential, ContactEntity`1 entity) in c:\Users\nguyenxuan.nguyen\Documents\Visual Studio 2013\Projects\LEAccountingDirect\AccountingDirect.Core\Services\MYOB\SupplierImportService.cs:line 30
       at AccountingDirect.Core.Services.MYOB.Tests.SupplierImportServiceTests.ImportTest_ValidInput_ExpectedNoException() in c:\Users\nguyenxuan.nguyen\Documents\Visual Studio 2013\Projects\LEAccountingDirect\AccountingDirect.CoreTests\Services\MYOB\SupplierImportServiceTests.cs:line 50
  InnerException: System.Net.WebException
       HResult=-2146233079
       Message=The remote server returned an error: (404) Not Found.
       Source=System
       StackTrace:
            at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
            at MYOB.AccountRight.SDK.Communication.BaseRequestHandler.HandleResponseCallback[T,TReq,TResp](IAsyncResult asynchronousResult) in c:\projects\accountright-live-api-net-sdk\MYOB.API.SDK\SDK\Communication\BaseRequestHandler.cs:line 126

 

I did read some discussion from this link (http://community.myob.com/t5/AccountRight-and-Essentials-API/Customer-and-item-synchronisation/m-p/3... but it doesn't help.

 

Moreover when I try to get a supplier through AccountRight API, it also throws exception. but if I try to browse the give uri through the browser I can get the expected result without any issue.

 

What should I do now

Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post