{"action":"created","issue":{"url":"https://api.github.com/repos/scriptcs-contrib/scriptcs-webapi/issues/17","labels_url":"https://api.github.com/repos/scriptcs-contrib/scriptcs-webapi/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/scriptcs-contrib/scriptcs-webapi/issues/17/comments","events_url":"https://api.github.com/repos/scriptcs-contrib/scriptcs-webapi/issues/17/events","html_url":"https://github.com/scriptcs-contrib/scriptcs-webapi/issues/17","id":62706929,"number":17,"title":"Getting started with Web API using the pack does not work, part 2","user":{"login":"rickevry","id":1908341,"avatar_url":"https://avatars.githubusercontent.com/u/1908341?v=3","gravatar_id":"","url":"https://api.github.com/users/rickevry","html_url":"https://github.com/rickevry","followers_url":"https://api.github.com/users/rickevry/followers","following_url":"https://api.github.com/users/rickevry/following{/other_user}","gists_url":"https://api.github.com/users/rickevry/gists{/gist_id}","starred_url":"https://api.github.com/users/rickevry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rickevry/subscriptions","organizations_url":"https://api.github.com/users/rickevry/orgs","repos_url":"https://api.github.com/users/rickevry/repos","events_url":"https://api.github.com/users/rickevry/events{/privacy}","received_events_url":"https://api.github.com/users/rickevry/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-18T14:27:32Z","updated_at":"2015-03-18T15:21:07Z","closed_at":null,"body":"The TestController-example on the home page does work. When you call http://localhost:8080/api/test you get an error:\r\n\r\n<Error><Message>An error has occurred.</Message><ExceptionMessage>Type 'System.Dynamic.ExpandoObject' with data contract name 'ArrayOfKeyValueOfstringanyType:http://schemas.microsoft.com/2003/10/Serialization/Arrays' is not expected. Consider using a DataContractResolver or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.</ExceptionMessage><ExceptionType>System.Runtime.Serialization.SerializationException</ExceptionType><StackTrace>   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, Boolean verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType)\r\n   at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiTypeAtTopLevel(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle originalDeclaredTypeHandle, Type graphType)\r\n   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)\r\n   at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)\r\n   at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver)\r\n   at System.Runtime.Serialization.DataContractSerializer.WriteObject(XmlWriter writer, Object graph)\r\n   at System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content)\r\n   at System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at System.Web.Http.Owin.HttpMessageHandlerAdapter.&lt;BufferResponseContentAsync&gt;d__13.MoveNext()</StackTrace></Error>\r\n\r\n\r\n---------------------------------------- \r\ninstall ScriptCs.WebApi2\r\n---------------------------------------- \r\n\r\nscriptcs -install ScriptCs.WebApi2\r\nInstalling packages...\r\nInstalled: ScriptCs.WebApi2\r\nPackage installation succeeded.\r\nSaving packages in scriptcs_packages.config...\r\nCreating scriptcs_packages.config...\r\nAdded Microsoft.AspNet.WebApi.Client (v5.2.0, .NET 4.5) to scriptcs_packages.config\r\nAdded Microsoft.AspNet.WebApi.Core (v5.2.0, .NET 4.5) to scriptcs_packages.config\r\nAdded Microsoft.AspNet.WebApi.Owin (v5.2.0, .NET 4.5) to scriptcs_packages.config\r\nAdded Microsoft.AspNet.WebApi.OwinSelfHost (v5.2.0) to scriptcs_packages.config\r\nAdded Microsoft.Bcl (v1.1.9, .NET 4.5) to scriptcs_packages.config\r\nAdded Microsoft.Bcl.Build (v1.0.14, .NET 4.0) to scriptcs_packages.config\r\nAdded Microsoft.Net.Http (v2.2.22, .NET 4.5) to scriptcs_packages.config\r\nAdded Microsoft.Owin (v2.0.2, .NET 4.5) to scriptcs_packages.config\r\nAdded Microsoft.Owin.Host.HttpListener (v2.0.2, .NET 4.5) to scriptcs_packages.config\r\nAdded Microsoft.Owin.Hosting (v2.0.2, .NET 4.5) to scriptcs_packages.config\r\nAdded Newtonsoft.Json (v6.0.2, .NET 4.5) to scriptcs_packages.config\r\nAdded Owin (v1.0, .NET 4.0) to scriptcs_packages.config\r\nAdded ScriptCs.Contracts (v0.10.0, .NET 4.5) to scriptcs_packages.config\r\nAdded ScriptCs.WebApi2 (v1.0.0, .NET 4.5) to scriptcs_packages.config\r\nSuccessfully updated scriptcs_packages.config.\r\n\r\n---------------------------------------- \r\nrun script\r\n---------------------------------------- \r\n\r\nscriptcs test1.cs -modules mono\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/scriptcs-contrib/scriptcs-webapi/issues/comments/83019501","html_url":"https://github.com/scriptcs-contrib/scriptcs-webapi/issues/17#issuecomment-83019501","issue_url":"https://api.github.com/repos/scriptcs-contrib/scriptcs-webapi/issues/17","id":83019501,"user":{"login":"glennblock","id":141124,"avatar_url":"https://avatars.githubusercontent.com/u/141124?v=3","gravatar_id":"","url":"https://api.github.com/users/glennblock","html_url":"https://github.com/glennblock","followers_url":"https://api.github.com/users/glennblock/followers","following_url":"https://api.github.com/users/glennblock/following{/other_user}","gists_url":"https://api.github.com/users/glennblock/gists{/gist_id}","starred_url":"https://api.github.com/users/glennblock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennblock/subscriptions","organizations_url":"https://api.github.com/users/glennblock/orgs","repos_url":"https://api.github.com/users/glennblock/repos","events_url":"https://api.github.com/users/glennblock/events{/privacy}","received_events_url":"https://api.github.com/users/glennblock/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T15:21:07Z","updated_at":"2015-03-18T15:21:07Z","body":"I will take a look, thanks!\nOn Wed, Mar 18, 2015 at 7:27 AM RickEvry <notifications@github.com> wrote:\n\n> The TestController-example on the home page does work. When you call\n> http://localhost:8080/api/test you get an error:\n>\n> An error has occurred.Type 'System.Dynamic.ExpandoObject' with data\n> contract name 'ArrayOfKeyValueOfstringanyType:\n> http://schemas.microsoft.com/2003/10/Serialization/Arrays' is not\n> expected. Consider using a DataContractResolver or add any types not known\n> statically to the list of known types - for example, by using the\n> KnownTypeAttribute attribute or by adding them to the list of known types\n> passed to\n> DataContractSerializer.System.Runtime.Serialization.SerializationException\n> at\n> System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeAndVerifyType(DataContract\n> dataContract, XmlWriterDelegator xmlWriter, Object obj, Boolean\n> verifyKnownType, RuntimeTypeHandle declaredTypeHandle, Type declaredType)\n> at\n> System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithXsiTypeAtTopLevel(DataContract\n> dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle\n> originalDeclaredTypeHandle, Type graphType)\n> at\n> System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator\n> writer, Object graph, DataContractResolver dataContractResolver)\n> at\n> System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator\n> writer, Object graph, DataContractResolver dataContractResolver)\n> at\n> System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator\n> writer, Object graph, DataContractResolver dataContractResolver)\n> at\n> System.Runtime.Serialization.DataContractSerializer.WriteObject(XmlWriter\n> writer, Object graph)\n> at System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStream(Type\n> type, Object value, Stream writeStream, HttpContent content)\n> at\n> System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStreamAsync(Type\n> type, Object value, Stream writeStream, HttpContent content,\n> TransportContext transportContext, CancellationToken cancellationToken)\n> --- End of stack trace from previous location where exception was thrown\n> ---\n> at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task\n> task)\n> at\n> System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task\n> task)\n> at\n> System.Web.Http.Owin.HttpMessageHandlerAdapter.<BufferResponseContentAsync>d__13.MoveNext()\n> ------------------------------\n> install ScriptCs.WebApi2\n>\n> scriptcs -install ScriptCs.WebApi2\n> Installing packages...\n> Installed: ScriptCs.WebApi2\n> Package installation succeeded.\n> Saving packages in scriptcs_packages.config...\n> Creating scriptcs_packages.config...\n> Added Microsoft.AspNet.WebApi.Client (v5.2.0, .NET 4.5) to\n> scriptcs_packages.config\n> Added Microsoft.AspNet.WebApi.Core (v5.2.0, .NET 4.5) to\n> scriptcs_packages.config\n> Added Microsoft.AspNet.WebApi.Owin (v5.2.0, .NET 4.5) to\n> scriptcs_packages.config\n> Added Microsoft.AspNet.WebApi.OwinSelfHost (v5.2.0) to\n> scriptcs_packages.config\n> Added Microsoft.Bcl (v1.1.9, .NET 4.5) to scriptcs_packages.config\n> Added Microsoft.Bcl.Build (v1.0.14, .NET 4.0) to scriptcs_packages.config\n> Added Microsoft.Net.Http (v2.2.22, .NET 4.5) to scriptcs_packages.config\n> Added Microsoft.Owin (v2.0.2, .NET 4.5) to scriptcs_packages.config\n> Added Microsoft.Owin.Host.HttpListener (v2.0.2, .NET 4.5) to\n> scriptcs_packages.config\n> Added Microsoft.Owin.Hosting (v2.0.2, .NET 4.5) to scriptcs_packages.config\n> Added Newtonsoft.Json (v6.0.2, .NET 4.5) to scriptcs_packages.config\n> Added Owin (v1.0, .NET 4.0) to scriptcs_packages.config\n> Added ScriptCs.Contracts (v0.10.0, .NET 4.5) to scriptcs_packages.config\n> Added ScriptCs.WebApi2 (v1.0.0, .NET 4.5) to scriptcs_packages.config\n> Successfully updated scriptcs_packages.config.\n> ------------------------------\n> run script\n>\n> scriptcs test1.cs -modules mono\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/scriptcs-contrib/scriptcs-webapi/issues/17>.\n>\n"}}