mvc-framework | A little MVC framework to help you in fast projects | Model View Controller library
kandi X-RAY | mvc-framework Summary
kandi X-RAY | mvc-framework Summary
A little MVC framework to help you in fast projects
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Build a WHERE clause
- Invoke controller action .
- Download file .
- Remove session data
- Handle error .
- Get the host name .
- Build section files .
- Loads a class .
- Get a config item
- Connect to the database
mvc-framework Key Features
mvc-framework Examples and Code Snippets
Community Discussions
Trending Discussions on mvc-framework
QUESTION
I am currently building my own PHP-Framework to gain some experience and am following this guide.
However I have some trouble by implementing the .htaccess-files. When I open my website it displays an 500 Internal Server Error.
My folder structure looks as follows:
...ANSWER
Answered 2021-Feb-16 at 16:23My docker-image is of php:7.2-apache
and as it seems mod-rewrite
wasn't enabled. Therefore after running the command a2enmod rewrite
my website worked again.
QUESTION
i hope somebody had a similar problem and can give be advice. I researched for quite some time but couldn't find a definitive answer.
My Set Up:
- 1 MsSQL Database (contains the Identity Tables of System.Web.Security)
- Many DLLs in .Net Framework (Using System.Web.Security for Log-In)
- Multiple different Programs/Apps calling the DLLs
- WebForms GUI in .Net Framework (Using System.Web.Security for Log-In)
What I want:
- Use IdentityServer4 in .net Core or .Net Framework
- Keep DLLs in .Net Framework
- Use WebApi in .Net Core
- Use a new GUI (f.ex. in Angular or Blazor)
- Use the Old GUI in WebForms in parallel to the new GUI (until the new GUI is finished)
My Problem: My DLLs and Applications use System.Web.Security for User-Management (login etc.). This namespace is not supported in .Net Core, but to change all my DLLs to .Net Core is not feasible for me, because this would result in too many changes. I would like to keep them in .NetFramework.
One of My main Questions:
- Can an App in .Net Core (f.ex. WebApi, IdentityServer4) and an App/Dlls in .NetFramework use the same Database for Identity (login, membership, etc.). In other word are "microsoft.aspnet.identity" and "microsoft.aspnetcore.identity" compatible (regarding the database) if used in different Apps/Dlls.
- Or do I have to use one of the Identity-Namespaces in all apps/dlls to be compatible? (and therefore MUST use the same Framework in all apps/dlls)
I hope this was short and clear enough to describe my problem. Please let me know if something was unclear.
Update I just found this Post Microsoft.AspNet.Identity and Microsoft.AspNet.Identity.EntityFramework in .NET Standard 2.0 Maybe using .Net standard in all DLLs might be an option. I will try this and see I it will work out for me. But I still don't understand if and how "microsoft.aspnet.identity" and "microsoft.aspnetcore.identity" works in a .Net Standard library.
Result: I was able to use "Microsoft.AspNetCore.Identity", "Microsoft.EntityFrameworkCore" in a .Net Standard 2.1 Library (Microsoft.EntityFrameworkCore is supported in .Net Standard 2.1 and net Core 3.0). So this is good News (I don't have to migrate all DLLs to .Net Core just for Identity. Migrating to .Net standard would be enough). But I can't reference that .Net Standard 2.1 DLL in a .Net Framework DLL/App because .Net Framework support it up to .Net Standard 2.0... So this does not fully solve the problem, but it seems to be the closest thing to what I want to do.
Update2
I am prepared to change a lot of code for this change. F.ex. the Authentication in the old WebApp so that it talks to the IdentityServer and removing everything related to System.Web(.Security) in all projects. One thing that still confuses me is "microsoft.aspnet.identity" vs "microsoft.aspnetcore.identity". Do I have to choose one of them for all projects or can I mix those namespaces (depending on the Framework of the projects) but just keep one database.
Update3 I marked an answer because it helped for answer my basic question ("it's not possible"). I will try to implement it and see it there surface more problems. But if someone has more ideas/experiences for this topic, please feel free to share it here.
Some of the sources I used:
- No plans to port System.Web.Security it into .Net Core: https://github.com/dotnet/core/issues/838
- Identity tables in Database have changed from 2012 to 2013: What's the diff between dbo.aspnet_Users and dbo.aspnetUsers?
- Discussion about Membership provider not being compatible to aspnet .core: https://github.com/aspnet/AspNetCore/issues/1501
- Video about migration with a lot of information: https://www.youtube.com/watch?v=shn3gL_UJ38
- Discussion about about Identity and .Net Core/Standard that is similar to my problem (But it didn't help, maybe is missed something): Identity in ASP.NET MVC Framework using Identity Core
- Guide to Migrate .Net to .Net Core: https://docs.microsoft.com/en-us/aspnet/core/migration/proper-to-2x/?view=aspnetcore-2.1
- "Microsoft.AspNet.Identity.Core" vs "Microsoft.AspNetCore.Identity": What is the difference between Microsoft.AspNet.Identity.Core and Microsoft.AspNetCore.Identity?
- IdentityServer4 can be in .NetFramework as well (does not have to .Net Core) https://leastprivilege.com/2017/01/15/platforms-where-you-can-run-identityserver4/ Thank you!
ANSWER
Answered 2019-Oct-18 at 13:45Despite both having ASP.NET in the name, ASP.NET Core is an entirely different framework than ASP.NET. People don't seem to realize that this isn't just like a making a version jump: you will have to rewrite your app.
ASP.NET Membership (System.Web.Security) is deprecated and 100% unsupported in .NET Core. That's not going to change and there is no workaround here. If you want to do auth in ASP.NET Core, you'll have to start from scratch.
Since you want to use Identity Server, anyways, you can still support your legacy Web Forms app, but you'll have to move all authentication to Identity Server, and then use Identity Server as your auth mechanism in the Web Forms app. Again, this is going to require making changes to the Web Forms app. There is no other option here.
On the Identity Server side, you may opt to forgo ASP.NET Identity. Identity Server is just the auth provider; it doesn't concern itself with user management. You can technically continue to use your old user tables, but you'd have to create custom profile and user store providers for Identity Server, to enable it to do the work it needs to do. Honestly, you're better off just starting over with Identity here, than doing a bunch of work to attempt to support a user management system that was deprecated long ago.
Long and short, nothing here is trivial. If you want to do what you're talking about, you are embarking on a major project, which will require a ton of effort and changing every piece of your app. That's just the way it is. If you're not prepared for that, then stick with what you have.
QUESTION
I have a jrxml report file designed in jasper studio:
...ANSWER
Answered 2019-Mar-12 at 11:59I found the solution in this stackoverflow question the steps as highlighted in the answer are:
- Send your datasource from the server as a parameter, and fill the report with a different one (can be empty).
- Declare a new parameter in the report of type JRBeanCollectionDataSource
- Set TableDatasource to use the $P{DS1} parameter.
- ...
In addition, i modified my report file field declarations and remove all jasper studio properties there.
After following this steps and modifying my report file and controller, it worked. Here is my new controller method:
QUESTION
I'm currently coding a blog to get experience with php(I've made an MVC-Framework), so I am still new to this.
I have two tables important for this question:
user(id, username, password, registrated)
comments(id, content, post_id, comment_author, date, editedAt, editedBy)
In the comments
-table comment_author
is yet not linked to the id of the user, because I was unsure how to actually do this.
A user can write as many comments as he likes, but a comment can only have one author.
comment_author
has the username
in it at the moment, but I know I need the id
(if the user gets deleted and someone else would registrate with this username, the comment would be his).
How should I now structure the tables?
1.) comments_author_id
in comments
-table, id
in user
as foreign key:
In this case I would have the id
of the Comment author in the comments
-table, but the user
would not know about the comments he has written. If I want to show the recent comments of the user on it's profile, could I get them with an inner-join
query then?
2.) make a new table user_comments(id, user_id, comment_id)
In this case user
and comments
wouldn't know about it's author/comments.
Also I have 'editedBy' in which the username of the last editing user is. Can I somehow link it with the username in the users
-table or should I also link it with the id
?
I am really lost with this question since I don't know much about databases; So I appreciate every help and advice I can get.
Please also let me know if I need to give any further information or change something for a better understanding.
...ANSWER
Answered 2019-Feb-11 at 09:33Best way is create a new table user_comments(id, user_id, comment_id)
. And if you want to track every changed/edit the comment or post it's will better if you create another table for that and if user can only edit then i think it's better to editedBy
fields not generate. The structure totally upto you what kind of tracking you want to be .
QUESTION
At the moment I am trying to get Roles configured using the RoleManager
, built into .NET Core 2.0, mvc-framework.
However I am getting the following error:
...ANSWER
Answered 2018-May-03 at 11:33An async void functions as a fire-and-forget method. The code will continue to run and dispose all objects before the async void is completed. Another way to handle this:
Make it an async Task
and call Wait()
;
QUESTION
Please go easy on me as I'm very new to MVC and web development in general.
I've inherited an ASP website which currently only has an 'OK' and 'Cancel' button. I need to break out 'OK' into two separate actions ('Add' and 'Remove'). 'Cancel' should still redirect the user back to the site homepage.
Here is the cshtml:
...ANSWER
Answered 2018-Nov-01 at 18:45The post you linked to is pretty old. You can now use html attributes to do all of the work, assuming your target environment supports them. By using this method, you can keep your existing parameters without any trouble.
First, you'll want an action on your controller for each button.
So, split SaveServiceWindow
into two actions, such as AddGroup
and RemoveGroup
.
QUESTION
I'm trying to implement my own extension for HtmlHelper that will output a link in a similar fashion to ActionLink.
I know I can do this easily with TagBuilder for instance, but I'd like to take advantage of the routing system ability to construct outgoing urls as described by Scott Guthrie in this vintage article.
My application is centered around organizations. One user may create an organization and an organization may have multiple locations. The main action takes place within a current location. I consider an organization to be a tenant in my application and the organization id is sent via the url.
Here's the route configuration for the above:
...ANSWER
Answered 2018-Sep-07 at 11:53There is already a RouteLink()
extension method that you can use for this. You pass it the link text and the name of the route definition, and an object (or a RouteValueDictionary
) for the parameters and it will generate the correct href
attribute. In your case, for the Tenant
route
QUESTION
Donut Caching and Donut Hole caching is not very clear to me. i read few article on this and those urls are
https://www.dotnettricks.com/learn/mvc/donut-caching-and-donut-hole-caching-with-aspnet-mvc-4 https://www.c-sharpcorner.com/UploadFile/chinnasrihari/Asp-Net-mvc-framework-donut-donut-hole-caching/ http://dotnet-helpers.com/mvc/donut-caching-with-asp-net-mvc/
1) when people use Donut Caching then they should use [DonutOutputCache(Duration=60)]
for action instead of [OutputCache(Duration=60)]
but if anyone check the links which i have pasted here then must notice people use OutputCache attribute instead of DonutOutputCache but this reason not clear to me.
2) if i need to cache partial view then i need to use OutputCache instead of DonutOutputCache or OutputCache actually will use DonutOutputCache internally.
3) if i mention cache location at client side then when another client from different pc visit my same cache page then what will happen? i guess if i maintain cache at client side then for next visitor again db trip will occur and cache the data and store at client side......am i right?
Sorry my English is not good. thanks so please some one clarify these above 2 points. thanks
...ANSWER
Answered 2018-May-16 at 15:091) The combination of Outputcache along with the ChildActionOnly attribute is akin to Donut HOLE caching. The hole of the donut is not rerendered, it is served from the cache. By using the ChildActionOnly attribute, then specifying the OutputCache attribute and time, you are saying cache this part of the donut hole on the server for the specified Duration. the donut hole it will serve from the cache. You have to use them both. Please see a good example: http://www.tugberkugurlu.com/archive/donut-hole-caching-in-asp-net-mvc-by-using-child-actions-and-outputcacheattribute
2) To cache a partial view output, we again use an OutputCache attribute to the action method IN THE CONTROLLER that returns partial view result. Please see http://techfunda.com/howto/275/cache-partial-view-output
3) When using OutputCacheLocation.Client the output cache is located on the browser client where the request originated. Each new visitor that comes in on their first request of the page has that page content cached in their browser.
QUESTION
I got errors (Not Showing CSS) in my project after deployed to server, it works fine in local .I found same questions like this and tried them all but still im unable to solved .
what i have tried :
Style bundling not working after IIS deployment (MVC 4)
BundleConfig not rendered after publish in IIS
ASP.NET MVC Bundle not rendering script files on staging server. It works on development server
ASP.NET MVC framework 4.5 CSS bundles does not work on the hosting
Why is my CSS bundling not working with a bin deployed MVC4 app?
Error:
CSS Shows In Server Like This
...ANSWER
Answered 2018-Feb-26 at 07:11For the fonts part you can use this in your web.config
QUESTION
I've got an Object I'd like to map to a JSON string with the DMVC-Framework's object mapper with the Delphi Berlin Starter Edition.
...ANSWER
Answered 2017-Mar-01 at 10:54As far as I'm concerned, this version of the framework mapper that does not support filling niether TList nor TStringList. It works fine though with TObjectList, where AClass is nothing but a wrapper for your strings.
See description here: https://danieleteti.gitbooks.io/delphimvcframework/content/chapterrenders.html
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mvc-framework
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page