GeezerVison is showing github.com — 406 Not Acceptable with GET frames · Issue #140 · DICOMcloud/DICOMcloud
406 Not Acceptable with GET frames #140DescriptionExpected Behavior
Get frames API works with OHIF viewer.
Actual Behavior
API: http://localhost:44301/api/studies/xxx/series/yyy/instances/zzz/frames/1
Status code: 406 Not Acceptable
Steps to Reproduce the Problem
- I'm using dcm4che to sent my dicom file, seem be like ok
C:\Users\ngota\OneDrive\Documents\dcm4che-5.29.2\bin>stowrs --url http://localhost:44301/api/studies C:\Users\ngota\OneDrive\Documents\DICOM_FILES\dicom_viewer_0003\0003.DCM
Scanning files to send
..
..
Connected to http://localhost:44301/api/studies in 6ms
23:19:07.946 INFO - > POST http://localhost:44301/api/studies
23:19:07.948 INFO - > Accept : application/dicom+xml
23:19:07.948 INFO - > Content-Type : multipart/related; type="application/dicom"; boundary=myboundary
23:19:08.215 INFO - < HTTP/1.1 Response: 200 OK
23:19:08.215 INFO - < Server : Microsoft-IIS/10.0
23:19:08.216 INFO - < Cache-Control : no-cache
23:19:08.216 INFO - < X-AspNet-Version : 4.0.30319
23:19:08.216 INFO - < X-SourceFiles : =?UTF-8?B?QzpcVXNlcnNcbmdvdGFcT25lRHJpdmVcRG9jdW1lbnRzXFBBQ1NcRElDT01jbG91ZFxESUNPTWNsb3VkLldhZG8uV2ViQXBpXGFwaVxzdHVkaWVz?=
23:19:08.216 INFO - < Expires : -1
23:19:08.216 INFO - < Pragma : no-cache
23:19:08.216 INFO - < Content-Length : 1213
23:19:08.216 INFO - < Date : Fri, 17 Mar 2023 16:19:08 GMT
23:19:08.216 INFO - < X-Powered-By : ASP.NET
23:19:08.216 INFO - < Content-Type : application/dicom+xml; charset=utf-8
23:19:08.216 INFO - < Response Content:
23:19:08.217 DEBUG - <?xml version="1.0" encoding="utf-8"?>
<NativeDicomModel>
<DicomAttribute keyword="TransferSyntaxUID" tag="00020010" vr="UI">
<Value number="1">1.2.840.10008.1.2.1</Value>
</DicomAttribute>
<DicomAttribute keyword="ReferencedSOPSequence" tag="00081199" vr="SQ">
<Item number="1">
<DicomAttribute keyword="SOPClassUID" tag="00080016" vr="UI">
<Value number="1">1.2.840.10008.5.1.4.1.1.12.1</Value>
</DicomAttribute>
<DicomAttribute keyword="SOPInstanceUID" tag="00080018" vr="UI">
<Value number="1">1.3.12.2.1107.5.4.3.284980.19951129.170916.9</Value>
</DicomAttribute>
<DicomAttribute keyword="RetrieveURI" tag="0040E010" vr="UR">
<Value number="1">http://localhost:44301/wadouri?RequestType=wado&studyUID=1.3.12.2.1107.5.4.3.4975316777216.19951114.94101.16&seriesUID=1.3.12.2.1107.5.4.3.4975316777216.19951114.94101.17&objectUID=1.3.12.2.1107.5.4.3.284980.19951129.170916.9&&contentType=application/dicom</Value>
</DicomAttribute>
</Item>
</DicomAttribute>
<DicomAttribute keyword="RetrieveURI" tag="0040E010" vr="UR">
<Value number="1"></Value>
</DicomAttribute>
</NativeDicomModel>
Sent 1 objects (=0.551MB) in 0.273s (=2.018MB/s) in this http request and TCP connection
- DICOMcloud log is ok
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Request","time":"2023-03-17T16:19:07.9594295Z","tags":{"ai.cloud.roleInstance":"DESKTOP-ODVQOLT","ai.operation.id":"44dc5b7e73d60b439844f5f8e6e80f42","ai.operation.name":"POST /api/studies","ai.location.ip":"127.0.0.1","ai.internal.sdkVersion":"web:2.8.1-19196","ai.internal.nodeName":"DESKTOP-ODVQOLT"},"data":{"baseType":"RequestData","baseData":{"ver":2,"id":"|44dc5b7e73d60b439844f5f8e6e80f42.fe9f39a6_","name":"POST /api/studies","duration":"00:00:00.2587413","success":true,"responseCode":"200","url":"http://localhost:44301/api/studies","properties":{"DeveloperMode":"true","_MS.ProcessedByMetricExtractors":"(Name:'Requests', Ver:'1.1')"}}}}
-
Study store in my local DB

-
Get studies, series, metadata is ok. But get frames have problem.
Client viewer: OHIF

I have try to resolve but not work. Any one have idea or solution? Thank for review. Activitytaivnn9 commented on Mar 17, 2023 My dicom file download from https://www.rubomedical.com/dicom_files/dicom_viewer_0003.zip, it works well with Radiant & Weasis,
I also try with Postman and have same status response code.
Here is DicomCloud log
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Request","time":"2023-03-17T16:59:22.9846635Z","tags":{"ai.cloud.roleInstance":"DESKTOP-ODVQOLT","ai.operation.id":"312f2279553ef04e9c8de597aae511a2","ai.operation.name":"GET /api/studies/1.3.12.2.1107.5.4.3.123456789012345.19950922.121803.6/series/1.3.12.2.1107.5.4.3.123456789012345.19950922.121803.8/instances/1.3.12.2.1107.5.4.3.321890.19960124.162922.29/frames/1","ai.location.ip":"::1","ai.internal.sdkVersion":"web:2.8.1-19196","ai.internal.nodeName":"DESKTOP-ODVQOLT"},"data":{"baseType":"RequestData","baseData":{"ver":2,"id":"|312f2279553ef04e9c8de597aae511a2.3c6e5c00_","name":"GET /api/studies/1.3.12.2.1107.5.4.3.123456789012345.19950922.121803.6/series/1.3.12.2.1107.5.4.3.123456789012345.19950922.121803.8/instances/1.3.12.2.1107.5.4.3.321890.19960124.162922.29/frames/1","duration":"00:00:00.1889790","success":false,"responseCode":"406","url":"http://localhost:44301/api/studies/1.3.12.2.1107.5.4.3.123456789012345.19950922.121803.6/series/1.3.12.2.1107.5.4.3.123456789012345.19950922.121803.8/instances/1.3.12.2.1107.5.4.3.321890.19960124.162922.29/frames/1","properties":{"DeveloperMode":"true","_MS.ProcessedByMetricExtractors":"(Name:'Requests', Ver:'1.1')"}}}}
The thread 0x36e0 has exited with code 0 (0x0).
Application Insights Telemetry (unconfigured): {"name":"Microsoft.ApplicationInsights.Dev.Metric","time":"2023-03-17T16:59:01.0000000Z","tags":{"ai.cloud.roleInstance":"DESKTOP-ODVQOLT","ai.internal.sdkVersion":"m-agg2:2.8.1-22898"},"data":{"baseType":"MetricData","baseData":{"ver":2,"metrics":[{"name":"Server response time","kind":"Aggregation","value":188.979,"count":1,"min":188.979,"max":188.979,"stdDev":0}],"properties":{"DeveloperMode":"true","_MS.MetricId":"requests/duration","_MS.IsAutocollected":"True","_MS.AggregationIntervalMs":"60000","Request.Success":"False"}}}}
Here is Postman request header

Here is DicomCloud debugger.
 Zaid-Safadi commented on Dec 8, 2023 This is because the accept header has the 'type' sub-media without quotes ""
OHIF now has a flag to fix this issue. You can test this by updating your Postman accept header to be:
multipart/related; type="application-octet-stream"; transfer-syntax=*
A new version of DICOMcloud in .net core will be rolled out soon which will support both format with and without ""
https://github.com/DICOMcloud/DICOMcloud/tree/aspnet-core
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|