API 500 error from IIS hosted as Virtual Directory

I have 2 App’s for learning APi’s.1st hosted under Default Web Site which is working fine both Generating JWT token & accessing api’s as root/api/.
2nd hosted as Virtual Directory under Default Web Site which is like localhost/VD/.

But when i accessing api’s under 2nd i.e localhost/VD/ i can generated JWT token but can’t accessing anything under localhost/VD/api/list etc.Do i miss some setting or any change i have to done. Request some Help.

Make sure that you set it up as an web application. What error did you get? To verify, disable security and test for the API list page (api/list/table).

Thank you for replying.
Yep it is configured as Web application.
Then tried removing Security. This case i can’t generate JWT as postman asking for username & password.
({“errors”:{“Password”:[“The Password field is required.”],“Username”:[“The Username field is required.”]},“type”:“https: XXXX”,“title”:“One or more validation errors occurred.”,“status”:400,“traceId”:“|ec0c77aa-4e2565fe2c2b63cf.”})While accessing /list/[table]
Still getting same 500 Internal server error. (A generic error message, given when no more specific message is suitable.)****Error
Oops! Something went wrong.
No authenticationScheme was specified, and there was no DefaultChallengeScheme found. The default schemes can be set using either AddAuthentication(string defaultScheme) or AddAuthentication(Action configureOptions).****I also tried ValidateIssuerSigningKey, ValidateIssuer, ValidateAudience, ValidateLifetime to false
Finally i tried
[AllowAnonymous] in-place of [Authorize] in apicontroller.cs at HttpGet{table}.
This time i can able to get values. But this is not safe.

Do you have Windows Integrated Auth in virtual directory set-up?
Also, check Authentication Mode is set to Windows in Advanced Settings of the project in ANM.I have a project in development, and it is working OK as a VD in IIS with Windows Integrated Authentication, including some custom APIs

Ty. I am still learning programming.
My IIS is only showing Anonymous authentication & ASP.net Impersonation.
In IIS Authentication i was connected as local Admin & on Test Settings i was getting both username & path getting pass tick.
I think we need to be in Domain to get windows authentication???

Sorry with the confusion in above post.
I installed windows authentication from server manager.
After i enable it.
Still i am getting following error for correct [Table]
“type”: “https xxxxxxxx”,
“title”: “Unauthorized”,
“status”: 401,
“traceId”: "|28d8d848-40db5dce9cea9d96."and following for Wrong [Tablexx]
“success”: false,
“error”: “”,
“version”: “17.0.9”

disable other Auth providers in IIS site if you enabled Windows Integrated Auth.