0

I have one web API I essentially copied from another. Both have app.UseHttpsRedirection() as well as app.UseHSTS() in their Program.cs. Both have Swagger redirect working (this is a local internal test site).

However, when I use Postman to try to fetch the original token, the original Web API returns a 307 and redirects the POST, but the other one returns a 302 and redirects to GET:

POST http://webapicore-dev.calfee.com/token 307  

POST https://webapicore-dev.calfee.com/token 200

POST http://recordsapps-dev.calfee.com/token 302

GET https://recordsapps-dev.calfee.com/token 405
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Mike
  • 629
  • 5
  • 18
  • There has to be difference between 2 projects. How can same projects act differently? Such as the depoly enviroment? – Qiang Fu Apr 24 '23 at 05:31
  • @QiangFu - I agree! I just can't seem to find any. I have looked at all the code between the two APIs, they are not only on the same server but in the same folder. – Mike May 01 '23 at 14:47
  • Is the port number also the same? – Qiang Fu May 02 '23 at 05:24
  • Yes, I have checked the IIS setup and they seem to be exactly the same. – Mike May 02 '23 at 12:27

0 Answers0