Code Monkey home page Code Monkey logo

Comments (11)

darrencauthon avatar darrencauthon commented on July 3, 2024

I haven't figured it out yet. If I had to guess right now, there's something in your request that's causing a null error on the way out. Still investigating...

from csharp-sparkpost.

darrencauthon avatar darrencauthon commented on July 3, 2024

Can you try this advice here: https://github.com/SparkPost/csharp-sparkpost#special-note-about-async

Just to double-check that it's not this issue?

from csharp-sparkpost.

darrencauthon avatar darrencauthon commented on July 3, 2024

Closing just because I haven't heard back. My time is worth... something. 👅 ⌚ ⏳

from csharp-sparkpost.

altozar avatar altozar commented on July 3, 2024

Hi Darren,
of course... We figured out this was due to the reasons explained in the
link I sent you on slack. Thanks for the help

On Thursday, April 21, 2016, Darren Cauthon [email protected]
wrote:

Closing just because I haven't heard back. My time is worth... something. [image:
👅] [image: ⌚] [image: ⏳]


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#30 (comment)

from csharp-sparkpost.

waglons avatar waglons commented on July 3, 2024

We're receiving a very similar error as to what was described above. The email sends successfully but immediately after a System.NullReferenceException is raised and the w3wp.exe process is terminated.

The code we're using is very similar to the sample code in the documentation and are working with version 1.2.0.

from csharp-sparkpost.

darrencauthon avatar darrencauthon commented on July 3, 2024

@waglons

Would it be possible to get a copy of the entire project or solution?

I ask not because I've asked for code samples from people, but... the code samples always "work for me."

There's something deeper, but I'm guessing as to what it can be.

Another option is... this library is relatively small. Could you bring it into your solution raw, run it through a debugger, and tell me exactly where it is throwing?

from csharp-sparkpost.

darrencauthon avatar darrencauthon commented on July 3, 2024

@waglons Here is the code sample of the person that figured it out:

 Task.Run(async () =>
                    {
                        await client.Transmissions.Send(transmission);
                        transmission.Options.StartTime = new DateTimeOffset(deliveryTime).ToOffset(TimeSpan.FromHours(1));
                        transmission.Content.Subject = new DateTimeOffset(deliveryTime).ToOffset(TimeSpan.FromHours(1)).ToString();
                        await client.Transmissions.Send(transmission);
                        transmission.Options.StartTime = new DateTimeOffset(deliveryTime).ToOffset(TimeSpan.FromHours(2));
                        transmission.Content.Subject = new DateTimeOffset(deliveryTime).ToOffset(TimeSpan.FromHours(2)).ToString();
                        await client.Transmissions.Send(transmission);
                        transmission.Options.StartTime = new DateTimeOffset(deliveryTime).ToOffset(TimeSpan.FromHours(3));
                        transmission.Content.Subject = new DateTimeOffset(deliveryTime).ToOffset(TimeSpan.FromHours(3)).ToString();
                        await client.Transmissions.Send(transmission);
                    }
                  ).Wait();

from csharp-sparkpost.

darrencauthon avatar darrencauthon commented on July 3, 2024

^^^ I can't vouch for that code, but it might provide some clue.

from csharp-sparkpost.

waglons avatar waglons commented on July 3, 2024

The code was helpful. While putting together a solution for you to review I noticed an issue with my asynchronous call and was able to correct it.

Thanks for your help.

from csharp-sparkpost.

darrencauthon avatar darrencauthon commented on July 3, 2024

Glad it helped!

It might help me... I think I might put in a sync mode, hidden behind the Task<T> contract.

from csharp-sparkpost.

darrencauthon avatar darrencauthon commented on July 3, 2024

@waglons @altozar Version 1.3.0 has just been released with sync support.

Details here: https://github.com/SparkPost/csharp-sparkpost#special-note-about-async

from csharp-sparkpost.

Related Issues (20)

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.