2

I have just pulled one Asp.Net Core 2 Web API project from GitHub, and when I try to run the application via IISExpress it always throws HTTP 404 error. The build is always successful. I am running it from Visual Studio 2017 on my Windows machine.

enter image description here

Things I have tried:

  • Tried different browsers
  • Checked my proxy settings
  • Used .UseIISIntegration() in my Program.cs file

    public static IWebHost BuildWebHost(string[] args) =>
        WebHost.CreateDefaultBuilder(args)
        .UseStartup<Startup>()
        .UseIISIntegration()
        .Build();
    
  • Deleted the .vs folder from the app directory and tried again

Nothing seems to be working. Has anyone else faced this issue?

1 Answer 1

1

Finally, I found that this was the issue with Asp.Net code 2. When I run the application, it is actually loading the URL as localhost:49515 as a default launching URL and it was returning HTTP 404. This post helped me find the actual issue. When I try with any default API link localhost:49515/api/values, it is working fine.

You can always set the custom launch URL by following these steps.

enter image description here

Now run your application, it will open the new URL always.

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.