-
-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I access the "root" path? #760
Comments
Which samples don't work?
Il Ven 12 Lug 2024, 21:33 Bruno Silva ***@***.***> ha scritto:
… I'm creating a controller with some information and redirections that are
as "root". However, the DMVC response is always 404.
Sample:
` [MVCPath('/')]
TAboutController = class(TMVCController)
public
[MVCPath('/')]
[MVCHTTPMethod([httpGET])]
procedure Redirect;
// OR
[MVCPath]
[MVCHTTPMethod([httpGET])]
procedure Redirect;
[MVCPath('/about')]
[MVCHTTPMethod([httpGET])]
procedure AboutAPI;
end;
`
In short, this access doesn't work "http://localhost:52146/", this one
also doesn't work "http://localhost:52146/about"
I noticed that there are some examples implemented this way, but they
don't work either. So how can I do this?
—
Reply to this email directly, view it on GitHub
<#760>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAK4ZJCRHL66ZX4YXOJHAOTZMAVPVAVCNFSM6AAAAABKZPB2TOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQYDMMRRGUZTINY>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
the project "..\samples\authenticationauthorization" is an example, in this project we have the controller AppControllerU with the "procedure TApp1MainController.Index" which is a direct call to a "root" (http://localhost:8080/). In this situation, the return is "NotFound" Another example project is "..\samples\custom_exception_handling" which has the procedure TMyController.Index; as "root". It's important to mention that I'm using version 3.2.2(nitrogen) with Delphi 10.1 |
Both examples (the first one is no more contained in the project, howver I tested basic_demo_server which does almost the same thing) work in 3.4.2-magnesium-rc2. |
Unfortunately, the newer versions of DMVC do not work in Delphi 10.1. It is incompatible. I recently tested DMVC version 3.4.1. For example:
-It is also possible to see that there is a var declaration that is in a position that is not accepted by Delphi 10.1 |
We'll check ASAP.
Thanks
DT
Il Ven 6 Dic 2024, 15:11 Bruno Silva ***@***.***> ha scritto:
… Unfortunately, the newer versions of DMVC do not work in Delphi 10.1. It
is incompatible.
I recently tested DMVC version 3.4.1.
For example:
-
In MVCFramework.Cache, in TMVCCache.RemoveItem. the IsObjectInstance
does not exist in the call lItem.Value.IsObjectInstance. Because the
System.Rtti TValue does not have this property in Delphi 10.1
-
In MVCFramework.ActiveRecord, in TMVCTableMapRepository.AddTableMap
the TObjectDictionary cannot resolve the TryAdd function, because it does
not exist.
Captura.de.tela.2024-12-06.110822.png (view on web)
<https://github.com/user-attachments/assets/62256431-395b-44aa-8ed5-c2ed0bbe245e>
Captura.de.tela.2024-12-06.110355.png (view on web)
<https://github.com/user-attachments/assets/26655a18-3c69-43d9-932e-838d63eced91>
—
Reply to this email directly, view it on GitHub
<#760 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAK4ZJG4NJ2PBWMKQWM2W3L2EGWAJAVCNFSM6AAAAABKZPB2TOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRTGMZTKMRVHA>
.
You are receiving this because you were assigned.Message ID:
***@***.***>
|
I'm creating a controller with some information and redirections that are as "root". However, the DMVC response is always 404.
Sample:
In short, this access doesn't work "http://localhost:52146/", this one also doesn't work "http://localhost:52146/about"
I noticed that there are some examples implemented this way, but they don't work either. So how can I do this?
The text was updated successfully, but these errors were encountered: