Salutare
Incerc sa fac upgrade la o aplicatie de la .NET 3.1(+Angular 13) la .NET 6
Initial fac upgrade clasic:schimb targe framework din 3.1 in 6+update packages.aplicatia se compileaza fara probleme dar cand o pun in productie de cele mai multe ori,la pornire,ramane
in load,verific in browser:0 erori in consola si 0 request-uri in tab-ul Network,dau refresh:porneste ok.nici clear browser cache nu ajuta.aceesi problema o raporteaza si clientii.
revin la .NET 3.1 si problema dispare
incerc alta metoda de upgrade:fac un proiect nou .NET6+Angular din VS2022 si atasez la el sursele din vechiul,se compileaza dar la login,primul request pe care Angular il face catre controller ul .Net vine cu eroarea:
Status Code: 404 Not Found
Request URL: https://localhost:44448/api/login
Request Method: POST
Referrer Policy: strict-origin-when-cross-origin
la pornire,in consola:
info: Microsoft.Hosting.Lifetime[14]
Now listening on: https://localhost:7146
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5146
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Development
info: Microsoft.AspNetCore.SpaProxy.SpaProxyLaunchManager[0]
No SPA development server running at https://localhost:44448 found.
info: Microsoft.AspNetCore.SpaProxy.SpaProxyMiddleware[0]
SPA proxy is not ready. Returning temporary landing page.
info: Microsoft.AspNetCore.SpaProxy.SpaProxyMiddleware[0]
SPA proxy is not ready. Returning temporary landing page.
info: Microsoft.AspNetCore.SpaProxy.SpaProxyLaunchManager[0]
SPA development server running at 'https://localhost:44448'
info: Microsoft.AspNetCore.SpaProxy.SpaProxyMiddleware[0]
SPA proxy is ready. Redirecting to https://localhost:44448.
in browser:
Launching the SPA proxy...
This page will automatically redirect to https://localhost:44448 when the SPA proxy is ready.
din Postman controller -ul raspunde dar pe portul default al aplicatiei .NET ,7146
in veche aplicatie care merge,in cosola:
Now listening on: https://localhost:5001
Now listening on: http://localhost:5000
Application started. Press Ctrl+C to shut down.
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
Request starting HTTP/2 GET https://localhost:5001/
info: Microsoft.AspNetCore.SpaServices[0]
> [email protected] start
> ngserve "--port" "5046"
Request URL: https://localhost:5001/api/login
Request Method: POST
Status Code: 200
Remote Address: [::1]:5001
Referrer Policy: strict-origin-when-cross-origin
si in proiectul base facut din VS2022,de la care am pornit upgrade ul,desi .NET porneste pe portul 7146, requestul din Angular cate controller il trimite,cu succes, pe acelasi port cu care porneste ng (44448)
multumesc pt orice indicatie