IoT Edge runtime error 400 after starting VM which was off for 1+ months - azure-iot-edge

I had a working VM running IoT Edge 1.0.10.3 on Ubuntu 16.04 that I had turned off for the past month or so.
Turned it on today to find that:
I can start up all modules ok. They all report running
The runtime response is: 400 -- The deployment configuration is malformed or invalid
Running iotedge check, it doesn't appear that there's any errors
when I try to set modules, under IoT edge Modules: There are no listed IoT Edge Modules
also I'm getting the following error in the EdgeHub logs:
<4> 2021-01-19 22:27:12.834 +00:00 [WRN] - Error getting edge hub config from twin desired properties
System.ArgumentException: schemaVersion is null or whitespace.
at Microsoft.Azure.Devices.Edge.Util.Preconditions.CheckArgument(Boolean expression, String message) in /home/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/Preconditions.cs:line 73
at Microsoft.Azure.Devices.Edge.Util.Preconditions.CheckNonWhiteSpace(String value, String paramName) in /home/vsts/work/1/s/edge-util/src/Microsoft.Azure.Devices.Edge.Util/Preconditions.cs:line 192
at Microsoft.Azure.Devices.Edge.Hub.Core.Config.EdgeHubDesiredProperties..ctor(String schemaVersion, IDictionary`2 routes, StoreAndForwardConfiguration storeAndForwardConfiguration) in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/config/EdgeHubDesiredProperties.cs:line 14
at lambda_method(Closure , Object[] )
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader, JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, String id, Boolean& createdFromNonDefaultCreator)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
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(JsonReader reader, Type objectType)
at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings)
at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value)
at Microsoft.Azure.Devices.Edge.Hub.Core.Config.TwinConfigSource.GetConfigInternal() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/config/TwinConfigSource.cs:line 97
at Microsoft.Azure.Devices.Edge.Hub.Core.Config.TwinConfigSource.GetConfigInternal() in /home/vsts/work/1/s/edge-hub/src/Microsoft.Azure.Devices.Edge.Hub.Core/config/TwinConfigSource.cs:line 105
What could have happened in the past month of being offline to put the edge into an inconsistent state?

According to the docs, the $schemaVersion that your logs refer to was introduced in 1.0.10. The docs say the property is recommended, but it would seem the runtime requires it. In your comment you included the desired properties, which is missing the $schemaVersion. Try setting the following desired properties:
"properties":{
"desired":{
"routes":{},
"schemaVersion": "1.1",
"$metadata":{
"$lastUpdated":"2020-11-25T18:26:39.4780665Z",
"$lastUpdatedVersion":5,
"routes":{
"$lastUpdated":"2020-11-25T15:03:42.6671499Z",
"$lastUpdatedVersion":4
}
}
}
}

Related

Docker install fail with error This access control list is not well-formed and cannot be modified

I got this error:
\Windows>System.InvalidOperationException: This access control list is not well-formed and cannot be modified
System.Security.AccessControl.CommonAcl.ThrowIfNotCanonical()
System.Security.AccessControl.CommonAcl.AddQualifiedAce(SecurityIdentifier sid, AceQualifier qualifier, Int32 accessMask, AceFlags flags, ObjectAceFlags objectFlags, Guid objectType, Guid inheritedObjectType)
System.Security.AccessControl.DiscretionaryAcl.AddAccess(AccessControlType accessType, SecurityIdentifier sid, Int32 accessMask, InheritanceFlags inheritanceFlags, PropagationFlags propagationFlags)
System.Security.AccessControl.CommonObjectSecurity.ModifyAccess(AccessControlModification modification, AccessRule rule, Boolean& modified)
System.Security.AccessControl.CommonObjectSecurity.AddAccessRule(AccessRule rule)
Docker.Core.PermissionUtils.RemoveGlobalWrite(ILogger logger, String path) C:\workspaces\4.12.x\src\github.com\docker\pinata\win\src\Docker.Core\PermissionUtils.cs:line 30
CommunityInstaller.Program.Main(String[] args)strong text

TFS 2017 Run Functional Tests runs in OutOfMemoryException (no results saved)

I have a test run that as around 280 tests. Of those 237 tests were executed (the rest skipped). The test is executed by Run Functional Tests and run on a single machine. After the run is completed.
But TFS never shows those results, because there is an OutOfMemory Exception. From the logs I assume this happens while transmitting the test results.
DTAExecutionHost.exe Error: 0 : ExecutionTaskStateModel.ExecuteTask: Recived error while executing task: System.AggregateException: One or more errors occurred. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.IO.MemoryStream.set_Capacity(Int32 value)
at System.IO.MemoryStream.EnsureCapacity(Int32 value)
at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Http.HttpContent.LimitMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
at Newtonsoft.Json.Utilities.JavaScriptUtils.WriteEscapedJavaScriptString(TextWriter writer, String s, Char delimiter, Boolean appendDelimiters, Boolean[] charEscapeFlags, StringEscapeHandling stringEscapeHandling, IArrayPool`1 bufferPool, Char[]& writeBuffer)
at Newtonsoft.Json.JsonTextWriter.WriteEscapedString(String value, Boolean quote)
at Newtonsoft.Json.JsonTextWriter.WriteValue(String value)
at Newtonsoft.Json.JsonWriter.WriteValue(JsonWriter writer, PrimitiveTypeCode typeCode, Object value)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializePrimitive(JsonWriter writer, Object value, JsonPrimitiveContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)
at System.Net.Http.Formatting.JsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)
at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content)
at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)
--- 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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.<SendAsync>d__17.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\Common\VssHttpMessageHandler.cs:line 206
--- 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.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__4.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\Common\VssHttpRetryMessageHandler.cs:line 91
--- 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.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__48.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 818
--- 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.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45`1.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 721
--- 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.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__27`1.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
--- 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.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__26`1.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.IO.MemoryStream.set_Capacity(Int32 value)
at System.IO.MemoryStream.EnsureCapacity(Int32 value)
at System.IO.MemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Http.HttpContent.LimitMemoryStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
at Newtonsoft.Json.Utilities.JavaScriptUtils.WriteEscapedJavaScriptString(TextWriter writer, String s, Char delimiter, Boolean appendDelimiters, Boolean[] charEscapeFlags, StringEscapeHandling stringEscapeHandling, IArrayPool`1 bufferPool, Char[]& writeBuffer)
at Newtonsoft.Json.JsonTextWriter.WriteEscapedString(String value, Boolean quote)
at Newtonsoft.Json.JsonTextWriter.WriteValue(String value)
at Newtonsoft.Json.JsonWriter.WriteValue(JsonWriter writer, PrimitiveTypeCode typeCode, Object value)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializePrimitive(JsonWriter writer, Object value, JsonPrimitiveContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeValue(JsonWriter writer, Object value, JsonContract valueContract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)
at System.Net.Http.Formatting.JsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)
at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content)
at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)
--- 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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.<SendAsync>d__17.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\Common\VssHttpMessageHandler.cs:line 206
--- 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.VisualStudio.Services.Common.VssHttpRetryMessageHandler.<SendAsync>d__4.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\Common\VssHttpRetryMessageHandler.cs:line 91
--- 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.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__48.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 818
--- 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.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45`1.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 721
--- 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.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__27`1.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0
--- 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.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__26`1.MoveNext() in E:\v2.0\A5\_work\1\s\Vssf\Client\WebApi\VssHttpClientBase.cs:line 0<---
Complete DTAExecutionHost.exe.log
On TFS 2010 there was no problem with the size of the results.
I'm currently not sure how to debug this further. All the test results are deleted after the cleanup.
Build Log:
2017-09-12T09:12:46.2472405Z ##[warning]DistributedTests: Test run is aborted. Logging details of the run logs.
2017-09-12T09:12:46.2472405Z ##[debug]Processed: ##vso[task.logissue type=warning]DistributedTests: Test run is aborted. Logging details of the run logs.
2017-09-12T09:12:46.2639752Z ##[warning]DistributedTests: New test run created.
2017-09-12T09:12:46.2639752Z ##[debug]Processed: ##vso[task.logissue type=warning]DistributedTests: New test run created.
2017-09-12T09:12:46.2639752Z Test Run queued for Project Collection Build Service (DefaultCollection).
2017-09-12T09:12:46.2639752Z
2017-09-12T09:12:46.2639752Z ##[warning]DistributedTests: Test execution started. Test run id : 22452
2017-09-12T09:12:46.2639752Z ##[debug]Processed: ##vso[task.logissue type=warning]DistributedTests: Test execution started. Test run id : 22452
2017-09-12T09:12:46.2639752Z ##[warning]DistributedTests: UnExpected error occured during test execution. Try again.
2017-09-12T09:12:46.2639752Z ##[debug]Processed: ##vso[task.logissue type=warning]DistributedTests: UnExpected error occured during test execution. Try again.
2017-09-12T09:12:46.2639752Z ##[warning]DistributedTests: Error : One or more errors occurred.--->Exception of type 'System.OutOfMemoryException' was thrown.
2017-09-12T09:12:46.2639752Z ##[debug]Processed: ##vso[task.logissue type=warning]DistributedTests: Error : One or more errors occurred.--->Exception of type 'System.OutOfMemoryException' was thrown.
2017-09-12T09:12:46.2639752Z
2017-09-12T09:12:46.2639752Z ##[warning]DistributedTests: Test run aborted. Test run id: 22452
2017-09-12T09:12:46.2639752Z ##[debug]Processed: ##vso[task.logissue type=warning]DistributedTests: Test run aborted. Test run id: 22452
2017-09-12T09:12:46.2639752Z ##[error]System.Exception: The test run was aborted, failing the task.
2017-09-12T09:12:46.2639752Z ##[debug]Processed: ##vso[task.logissue type=error;]System.Exception: The test run was aborted, failing the task.
2017-09-12T09:12:46.2784911Z ##[debug]DistributedTests: Deleted test settings with id : 20637
2017-09-12T09:12:46.3097431Z ##[error]PowerShell script completed with 1 errors.

Tweetsharp issue while getting the UserProfile and TimeLine

We are using TweetSharp(TweetSharp version = 2.3.1 and Newtonsoft.Json version = 5.0.6) API to show the Tweets of the Users in our web application. Below is the code that we are using in our asp.net mvc (C#) application:
var service = new TwitterService("ConsumerKey", "ConsumerKeySecret");
service.AuthenticateWith("TwitterToken", "TwitterTokenSecret");
TweetSharp.TwitterUser tuSelf = service.GetUserProfile(new GetUserProfileOptions() { IncludeEntities = false, SkipStatus = false });
if (tuSelf != null)
{
//Get the User Details
}
var tweets = service.ListTweetsOnUserTimeline(new ListTweetsOnUserTimelineOptions { Count = 5 });
We are getting the Following exception while getting the UserProfile:
System.OverflowException: Value was either too large or too small for an Int32.
Generated: Wed, 30 Oct 2013 05:48:41 GMT
System.OverflowException: Value was either too large or too small for an Int32.
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Newtonsoft.Json.JsonTextReader.ParseNumber()
at Newtonsoft.Json.JsonTextReader.ParseValue()
at Newtonsoft.Json.JsonTextReader.ReadInternal()
at Newtonsoft.Json.JsonReader.ReadAsInt32Internal()
at Newtonsoft.Json.JsonTextReader.ReadAsInt32()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at TweetSharp.SerializerBase.DeserializeJson(String content, Type type)
at TweetSharp.JsonSerializer.DeserializeJson(String content, Type type)
at TweetSharp.JsonSerializer.DeserializeSingle(String content, Type type)
at TweetSharp.JsonSerializer.DeserializeContent(String content, Type type)
at TweetSharp.JsonSerializer.Deserialize[T](RestResponseBase response)
at Hammock.RestClient.DeserializeEntityBody[T](RestRequest request, RestResponse`1 response)
at Hammock.RestClient.BuildResponseFromResult[T](RestRequest request, WebQuery query)
at Hammock.RestClient.Request[T](RestRequest request)
at TweetSharp.TwitterService.WithHammockImpl[T](RestRequest request)
at TweetSharp.TwitterService.WithHammock[T](String path)
at TweetSharp.TwitterService.WithHammock[T](String path, Object[] segments)
at TweetSharp.TwitterService.GetUserProfile(GetUserProfileOptions options)
at TweetApp.Web.Controllers.TwitterController.GetFollowersAndTweets(TwitterSettings twitterSettings)
at TweetApp.Web.Controllers.TwitterController.ViewTwitter(Nullable`1 Id)
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__36(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.<BeginInvokeAction>b__20()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
And the below exception while getting the Timeline Tweets:
Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'TweetSharp.TwitterStatus' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly. To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array. Path '', line 1, position 1.
Generated: Wed, 30 Oct 2013 04:45:03 GMT
Newtonsoft.Json.JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'TweetSharp.TwitterStatus' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '', line 1, position 1.
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract(JsonReader reader, Type objectType, JsonContract contract)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
at TweetSharp.SerializerBase.DeserializeJson(String content, Type type)
at TweetSharp.JsonSerializer.DeserializeJson(String content, Type type)
at TweetSharp.JsonSerializer.AddDeserializedItem(String c, Type type, IList collection)
at TweetSharp.JsonSerializer.DeserializeCollection(String content, Type type)
at TweetSharp.JsonSerializer.DeserializeContent(String content, Type type)
at TweetSharp.JsonSerializer.Deserialize[T](RestResponseBase response)
at Hammock.RestClient.DeserializeEntityBody[T](RestRequest request, RestResponse`1 response)
at Hammock.RestClient.BuildResponseFromResult[T](RestRequest request, WebQuery query)
at Hammock.RestClient.Request[T](RestRequest request)
at TweetSharp.TwitterService.WithHammockImpl[T](RestRequest request)
at TweetSharp.TwitterService.WithHammock[T](String path)
at TweetSharp.TwitterService.WithHammock[T](String path, Object[] segments)
at TweetSharp.TwitterService.ListTweetsOnUserTimeline(ListTweetsOnUserTimelineOptions options)
Its not happening for all the Twitter Users. It happens only for few Users who has more tweets. Please suggest how to handle this?
I'm pretty sure this is to do with the new user id length Twitter is using for new accounts.
I had the same error whenever working with a new twitter account. It also occurs when looking at older accounts if they have tweets or mentions from new accounts.
Tweetsharp is using integers for the user_id in a few places which is throwing the exceptions.
This section had a link to fetch an updated version, but that github has now been removed.
Rob
Twitter has changed their id from Int32 to Int64 and TweetSharp has not updated to handle this.
To fix:
In the packages.config file delete the reference to TweetSharp.
Open the Package Manager Console
PM> Install-Package TweetSharp-Unofficial
And boom. That should do it.
I have this issue , I just Update JSON.Net package and its fixed.
Go to Solution Exp -> References right click -> Manage Nuget pack -> Check Updates and update Json.net pack.

asp.net mvc: InitializeSimpleMembershipAttribute throwing exception when app is run from IIS, but works fine when app is run from Visual Studio

I created a asp.net mvc4 web application in Visual Studio. By default it creates a file Filters\InitializeSimpleMembershipAttribute.cs. I am getting an exception on line 34 when this attribute is invoked:
using (var context = new UsersContext())
{
**if (!context.Database.Exists())**
{
// Create the SimpleMembership database without Entity Framework migration schema
((IObjectContextAdapter)context).ObjectContext.CreateDatabase();
}
}
The exception happens when I try to run the webapp through IIS, but does not happen when running the app through visual studio F5 or Ctrl+F5 (VS uses iisexpress I think). The ConnectionString is same in both cases and copied below. Also I have configured the apppool in IIS to run under my identity (to match what happens when app is run through VS).
context.Database.Connection
{System.Data.SqlClient.SqlConnection}
[System.Data.SqlClient.SqlConnection]: {System.Data.SqlClient.SqlConnection}
base {System.ComponentModel.Component}: {System.Data.SqlClient.SqlConnection}
ConnectionString: "Data Source=(LocalDb)\\v11.0;AttachDbFilename=|DataDirectory|\\aspnet-MvcApplication1-20130328112431.mdf;Initial Catalog=aspnet-MvcApplication1-20130328112431;Integrated Security=True;Application Name=EntityFrameworkMUE"
ConnectionTimeout: 15
Database: "aspnet-MvcApplication1-20130328112431"
DataSource: "(LocalDb)\\v11.0"
ServerVersion: 'context.Database.Connection.ServerVersion' threw an exception of type 'System.InvalidOperationException'
State: Closed
I have checked my machine has SQLEXPRESS installed
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64)
Mar 29 2009 10:11:52
Copyright (c) 1988-2008 Microsoft Corporation
Express Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
(1 row(s) affected)
How can I fix this exception? Exception details in case anyone wants:
Server Error in '/EntityBrowser' Application.
--------------------------------------------------------------------------------
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.
)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.
)
Source Error:
Line 32: using (var context = new UsersContext())
Line 33: {
Line 34: if (!context.Database.Exists())
Line 35: {
Line 36: // Create the SimpleMembership database without Entity Framework migration schema
Source File: c:\Users\siddjain\Documents\Visual Studio 2012\Projects\MvcApplication1\Filters\InitializeSimpleMembershipAttribute.cs Line: 34
Stack Trace:
[SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.
)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5295167
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +242
System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, Boolean withFailover) +5307115
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover) +145
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout) +889
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance) +307
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions) +434
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) +225
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) +37
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionOptions userOptions) +558
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnectionOptions userOptions) +67
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) +1052
System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +78
System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) +167
System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) +143
System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) +83
System.Data.SqlClient.SqlConnection.Open() +96
System.Data.SqlClient.SqlProviderServices.UsingConnection(SqlConnection sqlConnection, Action`1 act) +79
System.Data.SqlClient.SqlProviderServices.UsingMasterConnection(SqlConnection sqlConnection, Action`1 act) +384
System.Data.SqlClient.SqlProviderServices.GetDbProviderManifestToken(DbConnection connection) +241
System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +26
[ProviderIncompatibleException: The provider did not return a ProviderManifestToken string.]
System.Data.Common.DbProviderServices.GetProviderManifestToken(DbConnection connection) +170
System.Data.Entity.ModelConfiguration.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection) +32
[ProviderIncompatibleException: An error occurred while getting provider information from the database. This can be caused by Entity Framework using an incorrect connection string. Check the inner exceptions for details and ensure that the connection string is correct.]
System.Data.Entity.ModelConfiguration.Utilities.DbProviderServicesExtensions.GetProviderManifestTokenChecked(DbProviderServices providerServices, DbConnection connection) +192
System.Data.Entity.ModelConfiguration.Utilities.DbConnectionExtensions.GetProviderInfo(DbConnection connection, DbProviderManifest& providerManifest) +39
System.Data.Entity.DbModelBuilder.Build(DbConnection providerConnection) +46
System.Data.Entity.Internal.LazyInternalContext.CreateModel(LazyInternalContext internalContext) +62
System.Data.Entity.Internal.RetryLazy`2.GetValue(TInput input) +123
System.Data.Entity.Internal.LazyInternalContext.InitializeContext() +468
System.Data.Entity.Internal.InternalContext.CreateObjectContextForDdlOps() +17
System.Data.Entity.Database.Exists() +36
MvcApplication1.Filters.SimpleMembershipInitializer..ctor() in c:\Users\siddjain\Documents\Visual Studio 2012\Projects\MvcApplication1\Filters\InitializeSimpleMembershipAttribute.cs:34
[InvalidOperationException: The ASP.NET Simple Membership database could not be initialized. For more information, please see http://go.microsoft.com/fwlink/?LinkId=256588]
MvcApplication1.Filters.SimpleMembershipInitializer..ctor() in c:\Users\siddjain\Documents\Visual Studio 2012\Projects\MvcApplication1\Filters\InitializeSimpleMembershipAttribute.cs:45
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +113
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
System.Activator.CreateInstance(Type type) +6
System.Threading.LazyHelpers`1.ActivatorFactorySelector() +68
System.Threading.LazyInitializer.EnsureInitializedCore(T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory) +115
System.Threading.LazyInitializer.EnsureInitialized(T& target, Boolean& initialized, Object& syncLock) +106
MvcApplication1.Filters.InitializeSimpleMembershipAttribute.OnActionExecuting(ActionExecutingContext filterContext) in c:\Users\siddjain\Documents\Visual Studio 2012\Projects\MvcApplication1\Filters\InitializeSimpleMembershipAttribute.cs:21
System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously(IActionFilter filter, ActionExecutingContext preContext, Func`1 nextInChain) +69
System.Web.Mvc.Async.<>c__DisplayClass3b.<BeginInvokeActionMethodWithFilters>b__35() +21
System.Web.Mvc.Async.AsyncControllerActionInvoker.InvokeActionMethodFilterAsynchronously(IActionFilter filter, ActionExecutingContext preContext, Func`1 nextInChain) +489
System.Web.Mvc.Async.<>c__DisplayClass3b.<BeginInvokeActionMethodWithFilters>b__35() +21
System.Web.Mvc.Async.<>c__DisplayClass37.<BeginInvokeActionMethodWithFilters>b__31(AsyncCallback asyncCallback, Object asyncState) +191
System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +130
System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters, AsyncCallback callback, Object state) +197
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__1e(AsyncCallback asyncCallback, Object asyncState) +446
System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +130
System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext, String actionName, AsyncCallback callback, Object state) +302
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__17(AsyncCallback asyncCallback, Object asyncState) +30
System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +130
System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback callback, Object state) +382
System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +130
System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +317
System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.BeginExecute(RequestContext requestContext, AsyncCallback callback, Object state) +15
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__2(AsyncCallback asyncCallback, Object asyncState) +71
System.Web.Mvc.Async.WrappedAsyncResult`1.Begin(AsyncCallback callback, Object state, Int32 timeout) +130
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +249
System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContext httpContext, AsyncCallback callback, Object state) +50
System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +16
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +301
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929
It is possible that the machine config is configured to use a local database connection that needs to be overridden. Try adding
<clear/>
<add name="LocalSqlServer" connectionString="... same as your UsersContext connection string"/>
at the start of your connection strings within your web config

Publish web on Azure. Operation could destabilize the runtime in MVC3

I published my web project to Azure and when I pull it up in the browser I see the error below.
I fixed the same error by disabling IntelliTrace, when I published my Web ROLE to windows azure. But I could not find where to disable it in Publish web settings.
http://www.windowsazure.com/media/devcenter/dotnet/dev-net-getting-started-039.png
[VerificationException: Operation could destabilize the runtime.]
FluentValidation.AbstractValidator`1..ctor() in c:\Projects\FluentValidation\src\FluentValidation\AbstractValidator.cs:36
Poll.Areas.Shared.Validators.Account.LogOnValidator..ctor() in D:\Code\Poll\Poll\Areas\Shared\Validators\Account\LogOnValidator.cs:15
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +113
System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
System.Activator.CreateInstance(Type type) +6
FluentValidation.Internal.InstanceCache.GetOrCreateInstance(Type type, Func2 factory) in c:\Projects\FluentValidation\src\FluentValidation\Internal\InstanceCache.cs:58
FluentValidation.Internal.InstanceCache.GetOrCreateInstance(Type type) in c:\Projects\FluentValidation\src\FluentValidation\Internal\InstanceCache.cs:37
FluentValidation.Attributes.AttributedValidatorFactory.GetValidator(Type type) in c:\Projects\FluentValidation\src\FluentValidation\Attributes\AttributedValidatorFactory.cs:48
FluentValidation.Mvc.FluentValidationModelValidatorProvider.GetValidators(ModelMetadata metadata, ControllerContext context) in c:\Projects\FluentValidation\src\FluentValidation.Mvc3\FluentValidationModelValidatorProvider.cs:75
System.Web.Mvc.<>c__DisplayClass7.<GetValidators>b__6(ModelValidatorProvider provider) +21
System.Linq.<SelectManyIterator>d__142.MoveNext() +234
System.Linq.d__142.MoveNext() +397
System.Web.Mvc.HtmlHelper.GetUnobtrusiveValidationAttributes(String name, ModelMetadata metadata) +297
System.Web.Mvc.Html.InputExtensions.InputHelper(HtmlHelper htmlHelper, InputType inputType, ModelMetadata metadata, String name, Object value, Boolean useViewData, Boolean isChecked, Boolean setId, Boolean isExplicitValue, IDictionary2 htmlAttributes) +794
System.Web.Mvc.Html.InputExtensions.HiddenHelper(HtmlHelper htmlHelper, ModelMetadata metadata, Object value, Boolean useViewData, String expression, IDictionary2 htmlAttributes) +124
System.Web.Mvc.Html.InputExtensions.HiddenFor(HtmlHelper1 htmlHelper, Expression1 expression, IDictionary2 htmlAttributes) +90
System.Web.Mvc.Html.InputExtensions.HiddenFor(HtmlHelper1 htmlHelper, Expression1 expression) +54
I fixed this problem by "Enable package manager restore". Right click on solution -> Enable package manager restore
If you think it's IntelliTrace, and you've enabled it, you can disable it by:
Right click on your Cloud Project
Select Publish
Go to Settings
Advanced
(Un)check the "IntelliTrace" checkbox
This dialog is only available when you chose the "Publish" action for the context menu.
You can continue to use IntelliTrace by taking a look at the top of your exception stack and add exception module in advanced settings. Explained here.

Resources