Coder Social home page Coder Social logo

oss.sdk.net's People

Contributors

afrasiabian avatar beachygreg avatar bizhichen avatar bofomike avatar chiwingsit avatar ckeyrouz avatar davelawsontest avatar devirte1 avatar ehardy avatar eslci avatar gergina1 avatar houjianyu avatar jianyuhou avatar kalpeshonespan avatar kehang-xu avatar marcinsliwinskivasco avatar martin-tk avatar mateuszgruszkaonespan avatar mrmontreal avatar paulsmelser avatar peiyu-onespan avatar piotrrudnik-one avatar rafalolszewskios avatar remicartieros avatar seungchoi avatar simonlevy-mtl avatar singhjaswinderonespan avatar sohanal1 avatar wangyifan1985 avatar yinghuonespan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

oss.sdk.net's Issues

sdk logging is broken

In v11.35.1, OneSpanSign.Sdk.Internal.ApplicationLogger no longer seems to work because the trace compiler constant is missing.
I suspect, but did not validate, this setting went missing during the upgrade to netstandard. The visual studio project type for netstandard doesn't have an obvious way to set this, and it seems to be set by default back in the full .net framework days.

According to Microsoft, there are 2 ways to fix the issue:

  1. Adding #define TRACE to OSS SDK code.
  2. specifying the option /d:TRACE when compiling OSS SDK code.

I didn't check the code on versions newer than v11.35.1, because those tags aren't available.

In case you're curious what's going on behind the scenes, here is what ApplicationLogger looks like when decompiled, and TRACE is not defined. Notice all the empty methods.
image

Here is what ApplicationLogger looks like when decompiled, and TRACE is defined. Notice methods arent empty.
image

Here is the quick and dirty fix I used so I could move forward.
image

Cannot download separate attachment files

When there are more than one attachment, we cannot download separate attachment files using:

public DownloadedFile DownloadAttachmentFile(PackageId packageId, String attachmentId, Int32 fileId)

because the path template used in the DownloadAttachmentFile(string packageId, string attachmentId, Int32 fileId) method in the AttachmentRequirementApiClient is wrong:
string path = template.UrlFor(UrlTemplate.ATTACHMENT_REQUIREMENT_PATH)

Fix: UrlTemplate.ATTACHMENT_REQUIREMENT_PATH -> UrlTemplate.ATTACHMENT_FILE_PATH

EventNotificationService.Register - The 'User-Agent' header must be modified using the appropriate property or method

In 11.38, commit c9b3a53, calling EventNotificationService.Register(builder) throws an exception in HttpMethods.WithUserAgent due to setting the 'User-Agent' string as a name/value pair. 11.36 works correctly.

https://docs.microsoft.com/en-us/dotnet/api/system.net.httpwebrequest.headers#System_Net_HttpWebRequest_Headers contains the list of restricted headers.

OneSpanSign.Sdk.OssException: Unable to configure event notification. Error communicating with oss server. The 'User-Agent' header must be modified using the appropriate property or method.
Parameter name: name ---> OneSpanSign.Sdk.OssException: Error communicating with oss server. The 'User-Agent' header must be modified using the appropriate property or method.
Parameter name: name ---> System.ArgumentException: The 'User-Agent' header must be modified using the appropriate property or method.
Parameter name: name
   at System.Net.WebHeaderCollection.ThrowOnRestrictedHeader(String headerName)
   at System.Net.WebHeaderCollection.Add(String name, String value)
   at OneSpanSign.Sdk.Internal.HttpMethods.WithUserAgent(WebRequest request)
   at OneSpanSign.Sdk.Internal.HttpMethods.PostHttp(String apiKey, String path, Byte[] content, IDictionary`2 headers)
   --- End of inner exception stack trace ---
   at OneSpanSign.Sdk.Internal.HttpMethods.PostHttp(String apiKey, String path, Byte[] content, IDictionary`2 headers)
   at OneSpanSign.Sdk.RestClient.Post(String path, String jsonPayload)
   at OneSpanSign.Sdk.EventNotificationApiClient.Register(Callback callback)
   --- End of inner exception stack trace ---
   at OneSpanSign.Sdk.EventNotificationApiClient.Register(Callback callback)
   at OneSpanSign.Sdk.Services.EventNotificationService.Register(EventNotificationConfig config)
   at OneSpanSign.Sdk.Services.EventNotificationService.Register(EventNotificationConfigBuilder builder)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.