Avatar of BrianFord
BrianFord
Flag for United States of America

asked on 

Data at the root level is invalid. Line 1, position 1

I hope I can explain this fully :)

I have a web service URL that accepts a JSON string from a 3rd party application but it is failing with the above error.

Two things to note:
1. if I configure the 3rd party app to send to a public testing URL (http://requestb.in) it seems to work just fine
2. If I copy the raw body and test it directly on my server, it also works perfectly and return a 200 response

However, when I configure the 3rd party app to send to my URL my service returns 500 response. I have added the application/json mime type to IIS.

I'm sure the issue is on my end but I'm at a loss as to how to troubleshoot this further

The attached image shows the test screen and the resulting 200 response
testing.png
Any help would be greatly appreciated
XMLMicrosoft IIS Web ServerJSON

Avatar of undefined
Last Comment
BrianFord

8/22/2022 - Mon