开发者

ASP.NET (C#) - vs PHP

开发者 https://www.devze.com 2023-02-17 15:05 出处:网络
Is it possible to create a login/registration system on my site without using any of the bulit-in stuff from ASP.NET - just like you can do in PHP? I\'ve almost completely forgotten everything I learn

Is it possible to create a login/registration system on my site without using any of the bulit-in stuff from ASP.NET - just like you can do in PHP? I've almost completely forgotten everything I learned a开发者_运维技巧bout ASP.NET - but I don't mind starting over again.

I'd rather roll my own login-registration system in ASP.NET than use an existing one. I seem to learn better this way.


You sure can. .Net comes with many useful features, but you still have an option to roll your own. Its just a framework, you can extend it anyway you imagine.


You should take a look at WebMatrix.

It simplifies ASP.NET, including providing a cleaner implementation of the membership providers that you've used in the past, but also has the full power of ASP.NET under the hood. If you're trying to find a bridge between PHP and ASP.NET for simple projects, that's a great compromise.


Membership providers is one of the things in .NET that I moved away from when I started back in version 2.0. Although it provided the high-level functionality, it kinda removes you from having the control over low-level details. The .NET framework library is huge that you can use little bits of pieces of it to create your own custom functionality, which in your case is the login/registration system.


Is it possible to create a login/registration system on my site without using any of the bulit-in stuff from ASP.NET - just like you can do in PHP?

Well, it's a turing-complete programming language.* Ergo, yes. Yes you can. This seems like the actual question you're asking, and while you can do this, you shouldn't do this, unless you're in the business of writing ASP.NET login/authentication frameworks.

*ok, ASP.NET itself is not a language, it's a platform. All of the languages, however, compile to MSIL which is most definitely turing-complete, which means that you can indeed do the things that you wanted.

I've almost completely forgotten everything I learned about ASP.NET - but I don't mind starting over again.

How does that work again? If you're using Visual Studio and you think you know what it is you want to do, intellisense does all the work for you. And the C-like syntax of C# and the similar syntax of VB means that you really should be able to pick it back up really quickly. I'm not sure what you're trying to say here.

I'd rather roll my own login-registration system in ASP.NET than use an existing one. I seem to learn better this way.

This reads as "I'm too stubborn to get things done quickly, and I don't care if there are security loopholes".


I'd like to offer a bit of an alternative to rolling your own. I know the ASP.Net Membership model is painful if you need to have control over the low-level details. So, I've written my own authentication library with the goal of giving you full control over how it goes in the database, yet also keeping the secure bits out of reach. This means you can change how things work, without fear of making your site insecure.

My library is named FSCAuth. It's BSD licensed. It is aimed to be dead simple to suit to your needs, while being secure enough that even if your database got leaked it'd still take hackers a few decades to decode a password.

0

精彩评论

暂无评论...
验证码 换一张
取 消