API Exception


#1

I have downloaded Aspose.words.cloud SDK from git repository(https://github.com/aspose-words-cloud/aspose-words-cloud-dotnet) and written these few lines of code in testAspose project. When i run the project i get an API Exception.
CharityTemplate.docx is uploaded to aspose cloud account.

var anotherWordApi = new WordsApi(new Configuration { ApiBaseUrl = “http://api.aspose.com/v1.1”, AppKey = “NNNNN”, AppSid = “NNNNNNN” });

        var saveOptionsData = new SaveOptionsData { SaveFormat = "pdf", FileName = "destination.pdf" };
        PostDocumentSaveAsRequest request = new PostDocumentSaveAsRequest("CharityTemplate.docx", saveOptionsData);
        anotherWordApi.PostDocumentSaveAs(request);

Log:

‘testAspose.exe’ (CLR v4.0.30319: DefaultDomain): Loaded ‘C:\Windows\Microsoft.Net\assembly\GAC_32\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testAspose.exe’ (CLR v4.0.30319: DefaultDomain): Loaded ‘C:\Users\welcome\Documents\numberguess\testAspose\bin\Debug\testAspose.exe’. Symbols loaded.
‘testAspose.exe’ (CLR v4.0.30319: testAspose.exe): Loaded ‘C:\Users\welcome\Documents\numberguess\testAspose\bin\Debug\Aspose.Words.Cloud.Sdk.dll’. Symbols loaded.
‘testAspose.exe’ (CLR v4.0.30319: testAspose.exe): Loaded ‘C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testAspose.exe’ (CLR v4.0.30319: testAspose.exe): Loaded ‘C:\Users\welcome\Documents\numberguess\testAspose\bin\Debug\Newtonsoft.Json.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testAspose.exe’ (CLR v4.0.30319: testAspose.exe): Loaded ‘C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testAspose.exe’ (CLR v4.0.30319: testAspose.exe): Loaded ‘C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Numerics\v4.0_4.0.0.0__b77a5c561934e089\System.Numerics.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testAspose.exe’ (CLR v4.0.30319: testAspose.exe): Loaded ‘C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Runtime.Serialization\v4.0_4.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testAspose.exe’ (CLR v4.0.30319: testAspose.exe): Loaded ‘C:\Windows\Microsoft.Net\assembly\GAC_32\System.Data\v4.0_4.0.0.0__b77a5c561934e089\System.Data.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testAspose.exe’ (CLR v4.0.30319: testAspose.exe): Loaded ‘C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Xml\v4.0_4.0.0.0__b77a5c561934e089\System.Xml.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
‘testAspose.exe’ (CLR v4.0.30319: testAspose.exe): Loaded ‘C:\Windows\Microsoft.Net\assembly\GAC_MSIL\System.Configuration\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll’. Skipped loading symbols. Module is optimized and the debugger option ‘Just My Code’ is enabled.
Exception thrown: ‘System.Net.WebException’ in System.dll
Exception thrown: ‘Aspose.Words.Cloud.Sdk.ApiException’ in Aspose.Words.Cloud.Sdk.dll
Exception thrown: ‘Aspose.Words.Cloud.Sdk.ApiException’ in Aspose.Words.Cloud.Sdk.dll
The program ‘[4716] testAspose.exe’ has exited with code 0 (0x0).


This Topic is created by sohail.aspose using the Email to Topic plugin.


#2

@ssana

These exceptions are not in Aspose Cloud NuGet packages. Instead, they are in your Visual Studio Project.