ASP.net 4.5 / Forms Authentication - asp.net

I want to set up forms authentication in my asp.net site. I have created one from a blank template in visual studio. I already have a database setup but it doesnt have any user tables. All of the reference material that I am able to find online is either for very old asp versions (which I assume things have changed) or tell you to use the visual studio templates. I want to know how to add this stuff to my current project and am hoping someone has good reference recommendations.
Thanks!

Have a look at Jon Galloway's SimpleMembership, Membership Providers, Universal Providers and the new ASP.NET 4.5 Web Forms and ASP.NET MVC 4 templates

Related

ASP.Net Razor Identity

I am almost new to ASP.Net razor pages. Just one problem
I created a Visual studio project recently but I cant seem to find the pages
for Identity (Login, Create account etc)
Can someone pls tell me where they went or whatever.
I would really appriciate it.
If this is a .NET core or .NET 5/6 project then the Razor pages for Identity are in the DLL.
If you wish to customise these pages then you have to scaffold the Identity UI pages. This MS documentation should provide the steps to do this: https://learn.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity?view=aspnetcore-6.0&tabs=visual-studio

DotNetOpenAuth project + webform login with ASP.NET (VB.NET)

I have seen many DotNetOpenAuth project examples and many other very nice ASP.NET webform application with user management.
Unfortunately I could not find any example/project/chapter with the following aspects:
Uses DotNetOpenAuth (e.g. for login with OAuth, FB, Twitter).
No use of MVC or razor (Only ASP.NET 2 - 4.5 webforms).
Uses SQL server (or SQL Express) for user and membership storage.
Uses VB.NET and not c#.
Please don't suggest any project or pointer that can't match these 4 specific wishes, I have already checked these out the past weeks.
Please don't start a discussion on why this specific combination or that I should not use VB.net or should use MVC or other criteria mentioned :-)
The goal is to create an "empty" website with user login mechanisms already in place and have students concentrate on the stuff beyond the login part.

Customise new ASP.Net Web Security

In previous versions of Visual Studio I have on occasion had a need to change the Membership to my own custom one because of existing user tables and/or existing password policies. To do this I used the Membership Provider and changed accordingly.
I have just started looking at VS 2013 and new projects uses OWIN and ASP.Net Identity which I'm not familiar with yet. Does anyone know the best way to customise these as well in order to use existing tables and override login functions?
This article Migrating an Existing Website from SQL Membership to ASP.NET Identity should get you started.

LightSwitch-Like ASP.NET Application Framework

I have built several ASP.NET web applications in the past but have always struggled to get the application's basic structure in place. Building a framework using a combination of Silverlight/RIA services (or LightSwitch) is quite easy, but this makes your application not accessible through browsers that do not support Silverlight.
Is there any ASP.NET application framework with an HTML UI that provides the basic services that lightswitch provides?
By basic services I mean:
User Management
Themes
Standard way of displaying/editing basic records and master/detail records
see:
Integrating Visual Studio LightSwitch Application Into An Existing Website using IFrames
Check out http://www.evolutility.org/ or http://www.rapidwebdev.org/, both are opensource.

URL re-write and asp.net 3.5 webform

how could i do advance url re-write in asp.net3.5. when we post question in stackoverflow then our question is listed as hyperlink like below one.
What is dependency injection?
when we click on link then a dynamic page is show. so i want know if there is a hyperlink which have href like http://mysite.com/130794/what-is-dependency-injection
actualy i want that when user click on above link then user will be redirect to page where url will be shown in address toolbar like http://mysite.com/130794/what-is-dependency-injection. how could i achieve it without touching IIS. how to write the code. please help me with small sample to understand better. thanks
Thomas, check out ASP.NET Routing.
In a nutshell, ASP.NET Routing is a library that was introduced in the .NET Framework 3.5 SP1 that decouples the URL from a physical file. It is used heavily in ASP.NET MVC, but can also be used in WebForms applications. I have authored an article that discusses how to use ASP.NET Routing in an ASP.NET 3.5 SP1 WebForms application: Using ASP.NET Routing Without ASP.NET MVC. It includes a complete working demo you can download and try out on your computer.
From the article:
ASP.NET Routing is a library that was introduced in the .NET Framework 3.5 SP1 that decouples the URL from a physical file; it is used extensively in ASP.NET MVC web applications. With ASP.NET Routing you, the developer, define routing rules that indicate what route patterns map to what physical files. For example, you might indicate that the URL Categories/CategoryName maps to the ShowProductsByCategory.aspx ASP.NET page, passing along the CategoryName portion of the URL. The ASP.NET page could then display the products for that category. With such a mapping, users could view products for the Beverages category by visiting www.yoursite.com/Categories/Beverages rather than visiting the more verbose and less readable www.yoursite.com/ShowProductsByCategory.aspx?CategoryID=1.
While ASP.NET MVC is a great way to get started with ASP.NET Routing, the good news is that these two systems are independent of one another. It's quite possible to use ASP.NET Routing in a traditional ASP.NET Web Forms application. This article shows how to get ASP.NET Routing up and running in a Web Forms application. Read on to learn more!
To use ASP.NET Routing you'll need to be using ASP.NET 3.5 SP1 or ASP.NET 4. In fact, there were a number of enhancements to ASP.NET Routing in ASP.NET 4 to make it easier to use in a WebForms application, so if you can upgrade to ASP.NET 4 that might be helpful.
Happy Programming!

Resources