1
Answer

More than 1 applicaionid, roleid etc. old users can't login

Photo of r p

r p

16y
2k
1

Hi,
I am in the process of developing my website step by step.
I finished the first step for registration in the month of November and
I created a virtual directory called - 'NovemberSite' in my live server and also created a database called 'Novembar' 

then hosted the site. Users stared to register.

I finished the next stage in December and I deleted folder of 'NovemberSite'
and the database 'November' created another virtual directory called
'DecemberSite', then copied all the oldfiles from Novemberfolder and updated files to the DecemberSite.
I created a database called 'December' I moved the tables, stored procedures etc beginning with 'aspnet_'
to the December database from November database
using Database Publication wizard.

I did the same in Jan. I copied all the files of
DecemberSite folder and December database to JanuarySite folder and January database together with the
latest updations.
Now, recently, I got complaints from users who registered in November that they can't login to the site.
I opened the latest database -January and I could see the same role administrator is entered 3 times
(because each time when I chaged database I had to create roles.) in the aspnet_Roles.
I could see 3 different application names in the 'aspnet_Applications'(I used to modify application name
in the web.config file). I can see all the users who registered from Novermber in
aspnet_Users table
of January database. I think when I changed the folder and database,
the roleid and applicationid may have changed and this may be the reason why
my users who registered in Novermber could not login.
Now, I am planning to create a final virtual directory - MYSITE and keep all the files in that directory
and a final database called MYDB and keep always registration in that folder. But,
How can I make application id, role id etc for all users as per the latest copy of the database?
Thanks

Answers (1)

0
Photo of Pradip Pandey
NA 6.9k 1.1m 12y
Hi Saurabh
 You can show your entry records on top on daily basis by using the concept of date, i mean to say that when you are trying to show the records, use order by <datefield> desc clause in your select query.

For question 2 refer this link
http://www.c-sharpcorner.com/UploadFile/satyapriyanayak/how-to-save-image-along-with-details-into-database-in-asp-ne/

Hope this will help you.