Search code examples
apiodata

IIS 7.5 odata expand is null


I have two servers, the servers are the same windows version. When I do this call

https://10.197.68.32/portaleclientiapi/odata/v1/ticket('FINLU%235R000239')?$expand=attachments&$select=attachments

the reply is this

{
  "@odata.context":"https://10.197.68.32/mpssapi/odata/v1/$metadata#ticket(attachments)/$entity","attachments":[
]
}

but when I call the second server the answer is this

{
    "@odata.context":"https://10.197.68.33/portaleclientiapi/odata/v1/$metadata#ticket(attachments)/$entity"
}

the call is exactly the same, but change only the ip address 10.197.68.32 or 10.197.68.33 can someone tell me where is the problem? Both server have the same published website, I tried to copy files from the running ok server to the running bad server Thanks


Solution

  • put [EnableQuery] on the action or put [AutoExpand] on the property Attachment in the model