Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with json - Production server only? #479

Closed
hookbeak opened this issue Jul 3, 2020 · 1 comment
Closed

problem with json - Production server only? #479

hookbeak opened this issue Jul 3, 2020 · 1 comment

Comments

@hookbeak
Copy link

hookbeak commented Jul 3, 2020

Hi,

clean project and installed latest version from nuget

used this code:

`
Dim listid = "mylistidhere"
Dim APIKey = "apikeyhere"
Dim email = "myemail@email.com"

        Dim mailChimp = New MailChimpManager(APIKey)
        Dim member = New Member() With {.EmailAddress = Email, .StatusIfNew = Status.Subscribed, .Status = Status.Subscribed}


        member.MergeFields.Add("FNAME", "Andy")
        member.MergeFields.Add("LNAME", "TEST01")

        Dim transmitResult = mailChimp.Members.AddOrUpdateAsync(ListID, member)
        Return transmitResult.Result.Status.ToString`

when running locally, it works. returning "subscribed"

when uploaded i get the following error:

A-System.AggregateException: One or more errors occurred. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader) at MailChimp.Net.Core.Helper.Deserialize[T](Stream stream) at MailChimp.Net.Core.Helper.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MailChimp.Net.Logic.MemberLogic.d__2.MoveNext() --- End of inner exception stack trace --- at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at MailchimpV3.NewSubscriber(String ListID, String Email) in D:\websites$live_sites\mywebsite.com\App_Code\MailchimpV3.vb:line 336 ---> (Inner Exception #0) Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader) at MailChimp.Net.Core.Helper.Deserialize[T](Stream stream) at MailChimp.Net.Core.Helper.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at MailChimp.Net.Logic.MemberLogic.d__2.MoveNext()<---`

Any ideas? i'm baffled by it...

To reinterate this only happens on the production server, on my local machine it works perfectly.

I've previously used this across multiple sites and all sites have now stopped working with no code changes. Is anyone aware of recent IIS updates that stop this code from working?

@hookbeak hookbeak changed the title problem with json problem with json - Production server only? Jul 6, 2020
@guslandt
Copy link

guslandt commented Jun 3, 2022

I'm having this exact same issue. Same error message, only on production server.
Was anything discovered as to the solution to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants