An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
Hi @Samiullah Barki ,
Whether your application is an .NET application (asp.net core or asp.net 5,6) or a .NET Framework application (.NET Framework 1.0 - 4.8)?
My C# controller method was call by postman how to stop it from calling it.
To this issue, you can't prevent the API/MVC controller method called by the postman. You can reject the request based on the source IP or port, the headers including user agent, API keys or other credentials, but if your API can be accessed at all, then it can be accessed by postman or any other client using the same data.
To limit the way how people can access the data you can add API keys and user credentials, but the same user with the same API key and credentials will be able to access your API using any other software (like postman) and there is no way around it.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion