0

base64image econded string 500 internal error in asp.net core web api in hostinger server

We have deployed the Asp.net core Web API in hostinger VPS linux with ASP.NET Template and Nginx proxy server.

POST Api working fine in local development but not hostinger vps server when api categoryImage property contents base64image string in it and other api post works which don't have base64 image ecoded.

{ "categoryName": "string", "categoryImage": "string", //Base64 image string "categoryBanner": "string" //Base64 image string }

when we send the any string other base64 image string then it post action works fine.

Any suggestions will very helpful

We tried to put any other string than base64, try the see the logging. didn't find any any specific issue on it.

1 Answer 1

0

Since you are using linux machine, we can set MaxRequestBodySize like below.

builder.WebHost.ConfigureKestrel(options =>
{
    options.Limits.MaxRequestBodySize = 100 * 1024 * 1024; // Set the Max Size 100MB
});
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.