This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

500 Error

Can anyone tell me what the HTTP 500 error is all about when creating an object? I've even tried using the JSON provided from the javascript sample file:

URL: mfilesserver/.../0.aspx

JSON:
{"PropertyValues":[{"PropertyDef":0,"TypedValue":{"DataType"
:1,"Value":"TEST SHEET"}},{"PropertyDef":22,"TypedValue"
:{"DataType":8,"Value":false}},{"PropertyDef":100,"TypedValu
e":{"DataType":9,"Lookup":{"Item":0}}}],"Files":[]}


Response Message:
<?xml version="1.0" encoding="utf-8"?>██<RESTError xmlns:x
sd="">www.w3.org/.../XMLSchema" xmlns:xsi="http://www.
w3.org/2001/XMLSchema-instance">██ <Status>500</Status>██
<URL>/objects/0</URL>██ <Method>POST</Method>██ <Exception
>██ <Name>InvalidOperationException</Name>██ <Message>
There was an error reflecting type 'MFiles.Web.Service.Struc
ts.Input.ObjectCreationInfo'.</Message>██ <InnerException
>██ <Name>InvalidOperationException</Name>██ <Mess
age>Cannot serialize member 'MFiles.Web.Service.Structs.Inpu
t.ObjectCreationInfo.ACL' of type 'MFiles.Web.Service.Struct
s.AccessControlList', see inner exception for more details.<
/Message>██ <StackText>Error reference ID: f917ecff-4c8
4-4f10-bb71-d2103eb54972</StackText>██ <InnerException>
██ <Name>InvalidOperationException</Name>██ <M
essage>MFiles.Web.Service.Structs.AccessControlList cannot b
e serialized because it does not have a parameterless constr
uctor.</Message>██ </InnerException>██ </InnerExcept
ion>██ </Exception>██ <Stack>Error reference ID: f917ecff-
4c84-4f10-bb71-d2103eb54972</Stack>██ <Message>There was an
error reflecting type 'MFiles.Web.Service.Structs.Input.Obj
ectCreationInfo'.</Message>██ <IsLoggedToVault>true</IsLogg
edToVault>██ <IsLoggedToApplication>true</IsLoggedToApplica
tion>██ <ExceptionName>InvalidOperationException</Exception
Name>██</RESTError>

  • Can you show all the headers on your HTTP request?

  • In JSON format:

    {"headers":{"X-Authentication":"JO1uuct1DUweHP5GaDBe8fI3oDVE
    rqKcEUZaL5uxsQtIfULfLLxlO_wI94FVP-RqiVRNsmti3bi4XeW-4CcVmCWt
    puqOjeBBYjk03o20oJSEaiW0iAlNOoAfS5UEdnDHIcXfK6KDG9o_aCqV_TCt
    ezliA1n5Tto6xN8AXrtD0V0-paiUqOwUHpVeHkbM06Txe-qMgZ3K5LE8G6nC
    80r8c1Gx_Pg4IDKspWzIcn_EK21XQr6z0W0QjOCp1NITmCVhhvmAtutmyCn7
    WGJy_N4fPaq0MVkdyRUGSAWLtydz-wyA18m447iIG3VUfN2gT76ulKQeAs8s
    Fn0IKY0AX5M6Mg","header":"Content-Type,application/json"}}

  • I'm not sure that's correct.  I've not seen headers in JSON format before, but it looks to me like your content-type header is not correct.  Should it be:

    {"headers":{"X-Authentication":"JO1uuct1DUweHP5GaDBe8fI3oDVE
    rqKcEUZaL5uxsQtIfULfLLxlO_wI94FVP-RqiVRNsmti3bi4XeW-4CcVmCWt
    puqOjeBBYjk03o20oJSEaiW0iAlNOoAfS5UEdnDHIcXfK6KDG9o_aCqV_TCt
    ezliA1n5Tto6xN8AXrtD0V0-paiUqOwUHpVeHkbM06Txe-qMgZ3K5LE8G6nC
    80r8c1Gx_Pg4IDKspWzIcn_EK21XQr6z0W0QjOCp1NITmCVhhvmAtutmyCn7
    WGJy_N4fPaq0MVkdyRUGSAWLtydz-wyA18m447iIG3VUfN2gT76ulKQeAs8s
    Fn0IKY0AX5M6Mg","Content-Type":"application/json"}}

    You may also want to set an accept-type header (to JSON) too.