You are not logged in.
Pages: 1
procedure TMvcApplication.Test(Ctxt: TRestServerUriContext);
var
CookieData: TCookieData;
begin
// There was an error in this place. Before, I could do it this way and it worked!
// After synchronizing the latest code, here are the issues.
if CurrentSession.CheckAndRetrieve(@CookieData, TypeInfo(TCookieData)) > 0 then;
end;
procedure TMvcApplication.Start(aRestModel: TRest);
begin
(aRestModel as TRestServerDB).ServiceMethodRegister('Test', Test, True, [mGET]);
end;
Offline
You are right, the core logic was changed.
We uncoupled the MVC process from TRestServer and TRestServerUriContext: we would like to add its feature directly at web server level (soon).
So inside a method-based service, there was no context information for the cookie any more...
I forgot about this valid use-case.
I have fixed this by defining a proper rendering class to consume the TRestServer information:
https://github.com/synopse/mORMot2/commit/f8171e604
Sorry for the inconvenience, and thanks for the report.
Offline
This URL is incorrect
http://localhost:8092/blog/mvc-info
Offline
Please define "incorrect".
On my side, it seems fine:
https://i.ibb.co/6crxNtFK/Screenshot-2025-08-06-at-17-58-47-IBlog-Application-Information.png
I did nothing. I used the "mvc-blog" example.
windows 11
Lazarus 4.0RC3 (rev lazarus_4_0RC3) FPC 3.2.2 x86_64-win64-win32/win64
#0 TWrapperContext.ContextFromRtti(nil, wUnknown, TRttiCustom($000000000169C3C0), '', '') at mormot.soa.codegen.pas:685
#1 TWrapperContext.ContextArgsFromMethod(nil, TInterfaceMethod (''; ''; ''; 0; []; []; 0; 0; 0; 0; nil; 0; 0; 0; 0; 0; 0; 0; 0; 0; []; 100398128; nil; (''); nil; (4, 0, 0, 0, 0, 0, 0, 0, 187, 179))) at mormot.soa.codegen.pas:886
#2 TWrapperContext.ContextFromMethod(TWrapperContext($0000000005FBF278), Failed to read data from register (while calculating location)) at mormot.soa.codegen.pas:938
#3 TWrapperContext.ContextFromMethods(TWrapperContext($0000000005FBF278), Failed to read data from register) at mormot.soa.codegen.pas:994
#4 ContextFromMethods(Failed to read data from register) at mormot.soa.codegen.pas:1128
#5 TMvcApplication.GetMvcInfo(TMvcApplication($0000000005FBF278), Failed to read data from register (while calculating location)) at mormot.rest.mvc.pas:2663
#6 TMvcRunWithViews.ComputeMvcInfoCache(TMvcRunWithViews($0000000005FBF278)) at mormot.rest.mvc.pas:2084
#7 TMvcRunOnRestServer.InternalRunOnRestServer(TMvcRunOnRestServer($00000000016018D0), TRestServerUriContext($0000000007499710), 'mvc-info') at mormot.rest.mvc.pas:2220
#8 TMvcRunOnRestServer.RunOnRestServerRoot(TMvcRunOnRestServer($0000000005FBF278), Failed to read data from register) at mormot.rest.mvc.pas:2298
#9 TRestServerUriContext.ExecuteSoaByMethod(TRestServerUriContext($0000000005FBF278)) at mormot.rest.server.pas:3264
Offline
Pages: 1