Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Working With The Error In Postman Client
WhatsApp
Debendra Dash
8y
19.1k
0
1
100
Article
I have been working in WEB API from a long duration of time, and while working with Web API I encountered a problem regarding the SSL connection, while trying to post data to the server. The error mainly says "
SSL Connections are being blocked: fix these by importing SSL Certificate in Chrome.
"
In this case what happened was, the request I sent to the server did not hit my respective Controller and Method due to a block in the SSL connection.
So here's what actually happened in this case.
Suppose I have a controller and I have written some methods and try to call this from Postman.
[AllowAnonymous]
[Route(
"Register"
)]
public
async Task < IHttpActionResult > Register(RegisterBindingModel model)
{
if
(!ModelState.IsValid)
{
return
BadRequest(ModelState);
}
var user =
new
ApplicationUser()
{
UserName = model.Email, Email = model.Email
};
IdentityResult result = await UserManager.CreateAsync(user, model.Password);
if
(!result.Succeeded)
{
return
GetErrorResult(result);
}
else
{
return
Ok();
}
}
Now I will try to call this method from Postman but it will show the following error.
Let's solve this problem by eliminating the blockage of the SSL connection. For this go to "Customize and Control Google Chrome."
Then go to Settings.
Click "Show advanced Settings".
Click Manage Certificates and after that Trusted Certificate.
Click on Import.
And then browse a self signed Certificate. In case you don't have a self signed Certificate click the link to know how to create a Certificate:
Create SSL Certificate By Makecert.exe
After that it shows the message successfully -- import Certificate, now Restore the change and try to send the request from Postman. Now it will act as expected and if we put a breakpoint it will redirect to the same "controller and Method" as follows.
So in this way we can solve this problem. Hope it will help you if you encounter this problem.
ASP.NET
PostMan
SSL Connection Blocked
WEB API
Up Next
Ebook Download
View all
A Guide to Mastering HTML5 CSS3 and JavaScript
Read by 4.1k people
Download Now!
Learn
View all
Membership not found