ASP.net help.......

B&W

B&W

Soldato
Joined
3 Oct 2003
Posts
7,668
Location
Birmingham
Hi I need to code some solutions into my ASP.net based website which I am designing on MS Visual Studio 2005.

Note, the website will not go live.

Basically the website is similar to a game download/purchase site such as www.direct2drive.com



So I need the following:

1) User ID/Password for client login


I have done this and am using a file called web.config to store the password/usernames.

I was wondering how I would setup a database on the site consisting of the users details such as address. It would have to be accessible by the user, ie some kind of account management system.


2) Purchase and payment system. I will have games stored on the website.

I was thinking of having a paypal link where users would pay to a paypal account and obtain the information (ie gamename and price) from the actual site.

Once this is done then I will have to send a email to them giving them a username and a password so they could download the game. This user/pass would expire in 24 hours.

This does sound clumsy, however again I have no clue how to implement this. How would I password protect the directories?

3) Download of the games. I need some kind of system to download the games.

The thing is I am required to show that the system is capable of downloading media from a server. Would this be a simple case of just gettin the password/user and then downloading from that secure directory?


There are more things I must do, however these are the three most important.
 
If you use the built in Membership and Roles provider you will be able to achieve all of the above.

You can simply configure only certain roles to have access to certain folders of the website (the download archieve).

:]
 
Hi, I have managed to create a login page and the general site content and pages are all setup.

I need help with 2 things:

1) Registration, I want a easy and simple way to register users to the site

2) I NEED to put a password on a directory of the website? How do I go about doing this?
 
Ok I'll have a read of that, the reason why I asked is because I have very little time and am busy with many things (revision, courseworks, etc).

If someone could point me to the correct tutorial to implement password on a directory and enable user registration I would be very grateful.

Also for some reason my login isn't working properly, it always requires me to login and when it logs out it still says "you are logged in"....
 
Also due to restrictions on the PC I cannot use SQL server to register and store my users and there details.

what alternative can I use? There is access 2003 on here.
 
Well i have the password protected directory working. I need the user registration now.
 
I have problems with logging out, it just wont work. It keeps the user logged in. I'm sure I have the right code but somethings not working.


For my logout I have the following code in logout.aspx.vb:
Code:
Imports System.Web.Security
Partial Class Logout

    Inherits System.Web.UI.Page

    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) _
     Handles MyBase.Load
        Session.Abandon()
        FormsAuthentication.SignOut()
    End Sub


End Class

In logout.aspx I have:

Code:
<%@ Page Language="VB" MasterPageFile="~/site.master" AutoEventWireup="false" CodeFile="Logout.aspx.vb" Inherits="Logout" title="You have Logged Out" %>


<asp:Content ID="Content1" ContentPlaceHolderID="LoginContent" Runat="Server">
  
  

  
  
  <h1>
        Logout</h1>
    <p>
        You have been logged out of the system.</p>

<ul>
<li><a href="default.aspx">»Home</a></li>
<li><a href="game.aspx">»Games</a></li>
<li><a href="login.aspx">»My Account</a></li>
<li><a href="logout.aspx">»Logout</a></li>
<li><a href="contact.aspx">»Contact us</a></li>
<li><a href="faq.aspx">»FAQ</a></li>
</ul>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<asp:LoginView ID="LoginView1" runat="server">
</asp:LoginView>
</asp:Content>

The relevant code in site.master (pertaining to the logout):

Code:
<div id="navigation">

     <asp:ContentPlaceHolder ID="LoginContent" runat="server">

          <asp:LoginView ID="LoginView1" runat="server">

               <LoggedInTemplate>

                    Welcome back, <asp:LoginName ID="LoginName1" runat="server" />.

               </LoggedInTemplate>

               <AnonymousTemplate>

                    Hello, stranger. <asp:HyperLink ID="lnkLogin" runat="server" NavigateUrl="~/Login.aspx">Log In</asp:HyperLink>

               </AnonymousTemplate>

          </asp:LoginView>

          <br />

          <asp:LoginStatus ID="LoginStatus1" runat="server" LogoutAction="Redirect" LogoutPageUrl="~/Logout.aspx" />

          <br /><br />

     </asp:ContentPlaceHolder>
 
Back
Top Bottom