Click here to Skip to main content
15,388,904 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: how do I get total quantity from this code Pin
Richard MacCutchan28-Apr-22 21:32
mveRichard MacCutchan28-Apr-22 21:32 
GeneralRe: how do I get total quantity from this code Pin
wixily jnr29-Apr-22 8:17
Memberwixily jnr29-Apr-22 8:17 
Questionsending mail using asp classic Pin
Member 1557807313-Apr-22 12:41
MemberMember 1557807313-Apr-22 12:41 
Rant[REPOST] sending mail using asp classic Pin
Richard Deeming18-Apr-22 22:03
mveRichard Deeming18-Apr-22 22:03 
QuestionChrome Browser Extension API - access to the profile being used Pin
Andreas Mertens12-Apr-22 12:18
professionalAndreas Mertens12-Apr-22 12:18 
QuestionSend Email using Classic ASP Pin
Ram Teckchandani11-Apr-22 16:01
MemberRam Teckchandani11-Apr-22 16:01 
AnswerRe: Send Email using Classic ASP Pin
Richard MacCutchan11-Apr-22 22:01
mveRichard MacCutchan11-Apr-22 22:01 
QuestionWeb API Problem Pin
Kevin Marois2-Apr-22 10:19
professionalKevin Marois2-Apr-22 10:19 
I have a simple ASP.Net Web API on my home server. This is just for a Proof of Concept I'm working on.

There's one method on the controller called Login which takes a UserEntity:
[HttpPost]
public UserEntity Login(UserEntity user)
{
    return Repository.Login(user);
}
the repo:
public UserEntity Login(UserEntity user)
{
    var results = new UserEntity();

    if (user.UserName.ToLower() == "admin" &&
        user.Password.ToLower() == "admin")
    {
        results.UserName = user.UserName;
        results.Password = user.Password;
        results.IsLoggedIn = true;
    }

    return results;
}
So, if you pass "admin" and "admin", I create a new user entity with IsLoggedIn = true. Again, all I'm trying to do is make a simple call with a user object and get a repsonse.

I'm using Postman to test the API. If I make this POST call with HTTPS
https://192.168.1.2:65001/api/Login/Login
and pass this as the body:
{"UserName": "admin","Password": "admin"}
then it fails with "Could not get a response" and
Error: write EPROTO 1432630488:error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER:../../third_party/boringssl/src/ssl/tls_record.cc:242:

However, if I change the URL to HTTP then it works fine and I get back the expected result:
{
    "IsLoggedIn": true,
    "UserName": "admin",
    "Password": "admin",
    "Id": 0
}

I'm a bit lost here. Could someone help me figure this out?

Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: Web API Problem Pin
Richard Deeming3-Apr-22 21:40
mveRichard Deeming3-Apr-22 21:40 
QuestionE-Commerce platform in 2022 Pin
deepok130-Mar-22 22:31
Memberdeepok130-Mar-22 22:31 
AnswerRe: E-Commerce platform in 2022 Pin
Richard MacCutchan30-Mar-22 22:35
mveRichard MacCutchan30-Mar-22 22:35 
AnswerRe: E-Commerce platform in 2022 Pin
Kevin Marois2-Apr-22 22:28
professionalKevin Marois2-Apr-22 22:28 
GeneralRe: E-Commerce platform in 2022 Pin
deepok12-Apr-22 23:37
Memberdeepok12-Apr-22 23:37 
GeneralRe: E-Commerce platform in 2022 Pin
OriginalGriff2-Apr-22 23:41
mveOriginalGriff2-Apr-22 23:41 
GeneralRe: E-Commerce platform in 2022 Pin
deepok13-Apr-22 0:17
Memberdeepok13-Apr-22 0:17 
GeneralRe: E-Commerce platform in 2022 Pin
OriginalGriff3-Apr-22 0:23
mveOriginalGriff3-Apr-22 0:23 
GeneralRe: E-Commerce platform in 2022 Pin
deepok13-Apr-22 1:46
Memberdeepok13-Apr-22 1:46 
AnswerRe: E-Commerce platform in 2022 Pin
satya bharti31-May-22 23:23
professionalsatya bharti31-May-22 23:23 
Questioncompulsorily pass through the login.html Pin
ago24867-Mar-22 22:30
Memberago24867-Mar-22 22:30 
AnswerRe: compulsorily pass through the login.html Pin
Afzaal Ahmad Zeeshan28-Mar-22 11:27
mveAfzaal Ahmad Zeeshan28-Mar-22 11:27 
AnswerRe: compulsorily pass through the login.html Pin
Member 150787164-Jul-22 16:14
MemberMember 150787164-Jul-22 16:14 
QuestionSearch engines Pin
Calin Cali7-Mar-22 12:50
MemberCalin Cali7-Mar-22 12:50 
AnswerRe: Search engines Pin
jhonaa7-Mar-22 23:34
Memberjhonaa7-Mar-22 23:34 
AnswerRe: Search engines Pin
Richard MacCutchan7-Mar-22 23:53
mveRichard MacCutchan7-Mar-22 23:53 
GeneralRe: Search engines Pin
Calin Cali8-Mar-22 1:41
MemberCalin Cali8-Mar-22 1:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.