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

Newtonsoft 10.0.2 casuing exception #285

Closed
manniefesto opened this issue Jan 10, 2019 · 9 comments
Closed

Newtonsoft 10.0.2 casuing exception #285

manniefesto opened this issue Jan 10, 2019 · 9 comments

Comments

@manniefesto
Copy link

manniefesto commented Jan 10, 2019

Hi,

After getting through the initial setup I am getting the following error "Cannot get SerializationBinder because an ISerializationBinder was previously set." on line 153 of the HomeController.

After a little googling it seems that this version of Newtonsoft has known issues when running on Azure. See https://github.com/Azure/azure-sdk-for-net/issues/3441 .

I have manually edited the Web.config and Packages.config to roll back to 9.0.1 and replaced the Newtonsoft DLL's, the extension is now working.

Many thanks,

Edit: Can't get my version numbers right 💯

@manniefesto manniefesto changed the title Newtonsoft 10.0.1 casuing exception Newtonsoft 10.0.2 casuing exception Jan 10, 2019
@sjkp
Copy link
Owner

sjkp commented Jan 10, 2019

Which version are you running, and did you do a clean install of it? I can't reproduce this.

@manniefesto
Copy link
Author

Hi, it was the latest version, I will get more information about the setup tomorrow for you. Thanks.

@javiercampos
Copy link

javiercampos commented Jan 11, 2019

Same here, when setting up, on the first "Next" button, I get:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Cannot get SerializationBinder because an ISerializationBinder was previously set. at Newtonsoft.Json.JsonSerializer.get_Binder() at Newtonsoft.Json.Serialization.JsonSerializerProxy.get_Binder() --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, BindingFlags invokeAttr, Binder binder, Object[] index, CultureInfo culture) at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index) at Microsoft.Rest.Azure.JsonSerializerExtensions.WithoutConverter(JsonSerializer serializer, JsonConverter converterToExclude) at Microsoft.Rest.Azure.CloudErrorJsonConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject[T](String json, JsonSerializerSettings settings) at Microsoft.Azure.Management.WebSites.WebAppsOperations.<GetWithHttpMessagesAsync>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.WebSites.WebAppsOperationsExtensions.<GetAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Azure.Management.WebSites.WebAppsOperationsExtensions.Get(IWebAppsOperations operations, String resourceGroupName, String name) at LetsEncrypt.SiteExtension.Controllers.HomeController.Index(AuthenticationModel model) in D:\a\1\s\LetsEncrypt-SiteExtension\Controllers\HomeController.cs:line 40

Will try to replace the DLL as the OP said

I installed the 0.8.10 extension with webjobs

@manniefesto
Copy link
Author

Hello all,

Below is the line I have changed in the web config.

<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="9.0.0.0" />

@sjkp Do you need any further information from me?

Thanks,

@javiercampos
Copy link

I did the same and it passed the install, but failed later... after installing, I just put it back to 10.0.2 and it seems to work fine

@dagrooms52
Copy link

I'm hitting the same issue. @manniefesto do you have any resources to share on how you edited Web.config and Packages.config?

@sjkp
Copy link
Owner

sjkp commented Jan 13, 2019

I have released a new version 0.9.0 that should solve this,

@sjkp sjkp closed this as completed Jan 13, 2019
@sjkp
Copy link
Owner

sjkp commented Jan 17, 2019

@dagrooms52 -> what happend to the comment is 0.9.0 still not working for you? (I got an email notification from you)

@dagrooms52
Copy link

Sorry, just a mistake on my end, your fix in 0.9.0 worked 👍

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

4 participants