Songs.Com

This website allows registered users to upload and download .mp3 songs. It allows searching for songs based on song title, singer and langauge.

The following are the topics of ASP.NET used in this project.

The following are the major operations in this application.

Steps to download, deploy and run this project

The following are the steps to be taken to run the existing part of the application. This project makes use of membership feature of ASP.NET.
  1. Download songs.rar and unzip it into any directory in your system. For example, if you extract to c:\ then it will create a directory c:\songs.
  2. Open Visual Studio.NET 2008 or Visual Web Developer 2008.
  3. Open the project from the directory into which you extracted project. For example, c:\songs
  4. Select Website->ASP.NET Configuration option
  5. Select Security tab
  6. Select Use the security Setup Wizard to configure security step by step.
  7. Select From Internet option in Step 2
  8. Click on Next button in the remaining screens and finally click on Finish.
  9. It create a database called ASPNETDB.MDF with required tables and other database components.
  10. Open the database in Server explorer or Database Explorer and create tables - SONGS with the following structure. The following tables show the structure of these tables.

    SONGS

    songid  int  
    title   varchar(50)
    singer  varchar(100)
    lang    char(1)
    addedon datetime,
    userid  uniqueidentifier 
    
    Note
  11. Create the following stored procedure in the database.
    
    CREATE PROCEDURE dbo.AddSong(@title varchar(50),@singer varchar(100),@userid uniqueidentifier,@lang char(1))
    AS
    insert into songs(title,singer,userid,lang,addedon) values (@title,@singer,@userid,@lang,getdate());
    RETURN @@identity;
    
    CREATE PROCEDURE dbo.RecentlyAddedSongs
    AS
    select top 10 songid,title,singer,
      lang = case lang
           when 'e' then 'Englsih'
           when 'h' then 'Hindi'
           else 'Telugu'
      end,
    addedon=convert(char(8),addedon,3), username 
    from songs s inner join aspnet_users u
    on(s.UserId=u.UserId)
    Order by songid desc
    
    
    CREATE PROCEDURE dbo.SearchSongs (@title varchar(50),@singer varchar(100),@lang char(1))
    as
    if @lang='a'
     select songid,title,singer, 
      lang=case lang
        when 'e' then 'Engslish'
        when 'h' then 'Hindi'
        else 'Telugu'
      end,
      addedon=convert(char(8),addedon,3), username
      from songs s inner join aspnet_users u
      on (s.UserId=u.UserId)
      where title like @title and singer like @singer order by songid desc
    else
      select songid,title,singer, 
        lang=case lang
          when 'e' then 'English'
          when 'h' then 'Hindi'
          else 'Telugu'
       end,
       addedon=convert(char(8),addedon,3),
       username from songs s inner join aspnet_users u
       on (s.UserId=u.UserId)
       where title like @title and singer like @singer and lang=@lang order by songid desc
    
    
    CREATE PROCEDURE dbo.DeleteSong(@songid int)
    as
    delete from songs where songid=@songid
    
    
    CREATE PROCEDURE dbo.GetMySongs(@userId uniqueidentifier)
    AS
      select songid,title,singer,
        lang=case lang
         when 'e' then 'English'
         when 'h' then 'Hindi'
         else 'Telgu'
        end,
        addedon=convert(char(8),addedon,3)
        from songs
        where userId=@userId
    
    
  12. In the Application Configuration Tool, go to Application Configuration
  13. Select Configure SMTP Email settings
  14. Enter Server name as localhost and From as admin@systemname.com. Replace systemname with the name of your system
  15. Click on Save button
  16. Go to Solution Explorer and make login.aspx the startup page.
  17. Run project from Visual Studio.NET 2008 or Visual Web Developer 2008.
  18. You should see login.aspx page.
  19. Create new user using registration page and then login with that user name
  20. Test the rest of the options.