We have an ASP.NET MVC project running on .NET Framework 4.6.1, we use Forms authentication with cookies. We need to migrate this project to .NET 5.0, however Forms authentication is no longer supported.
What would be the best approach/course of action in order to introduce an authentication process that could fit with this migration?
We have used this project https://github.com/synercoder/FormsAuthentication for ASP.NET Core 3.1 and it allows us to seamlessly share cookies of old ASP.NET’s Forms Authentication. You can certainly use it on .net 5.
Related
I am using ASP.NET Boilerplate with ASP.NET MVC, not Core. How do I test an MVC Controller where my application requires authentication first from a Single Sign On third party?
I can't find anything, so I have no code other than to reproduce basic Unit Tests (which aren't integration tests), but it's only copy and paste with nothing to do with this question. I don't use any async or spa, etc. Regular old ASP.NET MVC 4.6.
I have an application running on ASP.NET Core MVC. I am trying to deploy the application on Godaddy Windows based shared server, however it seems that ASP.NET Core applications cannot run straight away.
So I tried to upload a sample ASP.NET MVC project to Godaddy and it worked fine. I was wondering if I can migrate from ASP.NET Core MVC to ASP.NET MVC structure to deploy and run my existing application. Or if there is any workaround that can be done to run the core application itself.
Any help would be much appreciated.
Asp.net core application can run on Godaddy server. You did not mention what type of hosting it is. On shared hosting they install .net core as discussed here: https://uk.godaddy.com/community/Plesk-Hosting/Does-asp-net-core-is-supported-by-godaddy-on-shared-hosting/td-p/131238
If it is a VPS hosting then you can install it by yourself (download from Microsoft's site).
Moving from Asp.net core to MVC will be a backward move.
I made another project and didn't connect to the database yet. The database has configured with MVC5 patterns which include Membership provider and some depreciated functions such as SQLRoleProvider. It is working great on MVC5 project and I made a new ASP.NET CORE 3.1 project below MVC5 project. I can't use the current login function so I should make a new login function fit to the core version.
I am lost from here. Do I just put ```GetConnectionSTring`` as we do with EF? But I am not using EF but I use LLBLgen for dataaccess layer. How can I use the database to authenticate from the MVC5 version database?
I also wonder how I write a code for login in .Net Core loginController. I have to make a custom authentication because I am trying to access database which has been made by MVC5. Can you guys recommend anything that I can look up?
Is there any article or ideas how to use/move/intergrate social authentication from WebMatrix 2 to MVC 4. I've googled internet but didn't found any info about possibility to add references to WebMatrix namespaces/libraries to MVC project. I've read following article http://www.asp.net/webmatrix/tutorials/the-top-features-in-web-pages-2-developer-preview#oauthsetup and want to use WebMatrix.Security in MVC project
If you're looking to upgrade your project from simple ASP.NET Razor pages to a full MVC 4 project, I recommend moving from WebMatrix to Visual Web Developer:
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-web-developer-express
Everything you're trying to do here with the social auth libraries should work perfectly well in VS, and there are even a few NuGet packages that can make it easy. WebMatrix is meant to get you running with ASP.NET and Razor, but VS is going to give you a fuller experience.
Happy Coding!
here you will find a step by step solution to migrate webmatrix-webpages apps into asp.net mvc. check that you can find the login area - were you will figure out the social auth login too - in order to migrate it to mvc too.
information:
The Web Pages page-centric programming model supported by WebMatrix is a great way to get Web apps up and running. If you later decide that embracing ASP.NET MVC would give you more flexibility, you're covered. We’ll explain why you might choose to migrate and show you how to do it.
read the article: http://msdn.microsoft.com/en-us/magazine/hh148144.aspx
download code: http://archive.msdn.microsoft.com/mag201105ASPNET/Release/ProjectReleases.aspx?ReleaseId=5601
OAuth authentication on website now built-in, question closed
I can’t get a basic MVC site to work on my web server unless I’ve compiled it first in Visual Web Developer. If it doesn’t have a dll in the Bin, it says the Namespace can’t be found.
In classic asp.net I could just upload the files and the server would compile it at first run. Is this not the case in MVC? Essentially I’d like to build an MVC site without using Visual Web Developer.
That's cause ASP.NET MVC is not based on the Website model that many ASP.NET Web Forms apps were. It is based on the Web application model.
You can read about Web Application Projects here.
I've read about people migrating the Web Application to the Web site model in ASP.NET MVC but I don't recommended it.
Yes, you do need to compile an MVC site and deploy some DLLs in a bin folder when you deploy an MVC site
You can build MVC without Visual web developer... but why?