I'm extreamly new to programming actually learning on my own, college is not an option now. Need some help. I'm trying to write the code to add users to sql 2005 backend server, and a windows login form. so that certain area's of my program have restricted access. Can anyone help.

Dani AI

Generated

is learning and wants to add users to SQL Server 2005 and build a login form. provided a starter snippet, and correctly pointed out that showing existing code helps. Two practical routes are available: use the built-in ASP.NET membership system (easiest and safest for web apps), or implement a custom authentication table and logic (good learning, but needs careful security).

For ASP.NET 2.0 / VB 2005 projects, the SqlMembershipProvider removes much of the hard work: a supplied schema and APIs handle user creation, validation, role checks, password hashing and lockout. The typical flow is to provision the membership schema (aspnet_regsql), configure the provider in web.config, and call the Membership and Roles APIs rather than writing raw SQL for authentication. This approach reduces common mistakes around password storage and session handling.

If building custom auth instead, follow strict rules: store only salted, iterated password hashes (use a PBKDF2-style algorithm or equivalent), keep a per-user salt, never store plaintext passwords, and authenticate with parameterized queries or stored procedures to prevent SQL injection. Use least-privilege database accounts, prefer Integrated Security or a middle-tier service so client apps do not hold admin DB credentials, enforce HTTPS for credentials in transit, and perform server-side role checks for every restricted action. As advised, sharing sanitized snippets of current code and the connection method (Windows auth vs SQL auth) will yield faster, targeted help.

Recommended Answers

All 2 Replies

I'm extreamly new to programming actually learning on my own, college is not an option now. Need some help. I'm trying to write the code to add users to sql 2005 backend server, and a windows login form. so that certain area's of my program have restricted access. Can anyone help.

Showing your code might help. Read the forum rules. You need to show effort, and what better way than posting the code that you have tried so far?

We only give homework help to those who show effort

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.