web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Error invalid server error 500 when try to post the file via web api request

(0) ShareShare
ReportReport
Posted on by 28
Hi All,
 
i got the error invalid server error 500 when try to upload file bytes
 
 
Could anyone help me to correct the code that i missed?
 
Thanks,
it.dev
 
I have the same question (0)
  • Martin Dráb Profile Picture
    237,681 Most Valuable Professional on at
    Error invalid server error 500 when try to post the file via web api request D365fo x++
    The error code just tells you that something failed on the server, but as you see, it's not enough information to know what to fix. You'll need to find more details. I don't know what service you're calling, so I can't tell you what data it expects and where you can find logs.
     
    By the way, there is a problem in your code. You release resources of streamWriter only when things succeed, but not if an exception is thrown. The 'using' statement is easier to use and handle both cases.
  • Suggested answer
    Hana Xue Profile Picture
    Microsoft Employee on at
    Error invalid server error 500 when try to post the file via web api request
    Hi,
    There are many reasons for this problem, you can check the following two blogs about this issue. Hope these will help you.
    Error 500 on the server for D365 finance and operations (axonmymind.blogspot.com)
    HTTP 500 errors running Dynamics 365 for Finance and Operations in locally hosted onebox / development VM – Learning Dynamics 365 for Operations / X++ (tech.blog)
    If your problem is urgent, it is recommended that you open a ticket with Microsoft for better support.
    Best Regards,
    Hana

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 683 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 563 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 398 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans