Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

190
Views
cannot access asp.net core api end-poit with next.js front-end 500 internal error reason: unable to verify the first certificate

I have a ASP.NET Core 5 web API app which works fine and can get and post data with Postman, but when I am trying to access it with my Next.js app I get 500 failed, reason: unable to verify the first certificate. When I try to get fake data from https://jsonplaceholder.typicode.com/users it works without any problem. Do I need especial permission on IIS express? I'm new to this. Here is my code for Next.js:

const myHeaders = new Headers();
myHeaders.append("Content-Type","application/json");

const requestOptions = {
    method: 'GET',
    headers: myHeaders,
    body: raw,
    redirect:'follow'
};

var raw = JSON.stringify({
    "title": "titanic",
    "releaseDate": "1998-10-05",
    "genre": "romance",
    "price": 11.99
})

export const getStaticProps = async () => {
    const res = await fetch(`https://localhost:44310/api/movies`)
    const data = await res.json()

    return {
        props: {movies:data}
    }
}


const Movies = ({movies}) => {
    return ( 
        <div>
            <h1>movies</h1>
            {movies.map(m => (
                <div key={m.id}>
                    <a>
                        <h4>{m.title}</h4>
                    </a>
                </div>    
            ))}
         
        </div>
     );
}
 
export default Movies;
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!