Last post Sep 18, 2006 05:02 AM by NET.Bloke
Jun 14, 2006 07:46 AM|NET.Bloke|LINK
Jun 14, 2006 10:49 AM|jwadsworth|LINK
Hello and welcome,
In order to manage users and roles in the PWS kit over the web, you will need to implement new code and pages that handle that functionality. If you want, you can register and download from my site a small project that consists of just the user management
pages. Or you can download my full source code that already has the functionality built in.
Jun 14, 2006 11:21 AM|NET.Bloke|LINK
Jun 14, 2006 11:26 AM|NET.Bloke|LINK
Jun 14, 2006 11:32 AM|NET.Bloke|LINK
Jun 14, 2006 11:43 AM|jwadsworth|LINK
Jun 14, 2006 11:55 AM|NET.Bloke|LINK
Jun 14, 2006 05:22 PM|jwadsworth|LINK
I get that, but what if a user registers himself from a remote machine? How do I approve/reject his/her registration. Is adding your source code the only way to do it?
Yes, in order to manage users once they have registered on your site, you will need to implement user management pages. You can use my code, or there are other examples
on the web of how to do this.
I have your source code for User Management BTW. Should I just overwrite the existing files on the server?
If you have deployed my PWS project then you will not need to add the files from the UserManagement project. In fact, the user management in my PWS project is somewhat
different than what is in the UserManagement project.
If you wish to add what is in the UserManagement project to your existing PWS, you will need to follow these steps:
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
<!--SECURITY NOTE: The most secure passwordFormat is hashed. The hashed option only supports enablePasswordReset. If you need to enablePasswordRetrieval the most secure format is encrypted. Encypting your password requires
a pre-defined machine key. To enable these samples to run on all machines without machine key configuration we are using the clear password format-->
type="System.Web.Security.SqlRoleProvider, System.Web, Version=220.127.116.11, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Recreate the State table in the database for your PWS.
Jun 15, 2006 05:05 AM|NET.Bloke|LINK
Jun 15, 2006 11:31 AM|jwadsworth|LINK
Well, as I do not know anything about importing and exporting data, all I can tell you is that you will need to create a script of the table and then manually enter the data into the table online.
Jun 15, 2006 11:48 AM|NET.Bloke|LINK
Jun 15, 2006 01:28 PM|jwadsworth|LINK
Jun 15, 2006 02:26 PM|NET.Bloke|LINK
Jun 15, 2006 02:45 PM|jwadsworth|LINK
Well. I guess I should ask you a qestion first. Does your hosting provider support SQL Express?
Jun 15, 2006 02:50 PM|NET.Bloke|LINK
Jun 15, 2006 02:53 PM|NET.Bloke|LINK
Jun 15, 2006 03:30 PM|jwadsworth|LINK
Currently you have the original PWS kit on your Host. Is the database located inside the App_Data folder of your project online or is it attached separately to SQL Server?
<<<<<<<<< Ignore this post >>>>>>>>>>
Jun 15, 2006 03:42 PM|jwadsworth|LINK
Isn't it enough to just deploy the whole distro like I deployed the current PWS application? Why should my host attach the database for me? Is there a special procedure involved in it?
By backup of the database, do you mean a .BAK file? Please enlighten me a little more, as I'm completely new to databases, leave alone backing them up!
If you're not using SQL Express on your host, then the database that you currently have up there, from the original PWS Kit, will not work with my PWS kit. That is why I was saying you would need to either attach the database that came with my kit or create
a backup of it (yourdatabasename.bak) and restore it on your server. Which option you choose depends on what your host allows you to do with SQL and what is easiest for you.
Jun 15, 2006 03:56 PM|NET.Bloke|LINK
Jun 15, 2006 05:16 PM|jwadsworth|LINK
Hmmm...I don't have any data as such in my current database. I just created an Admin account locally before uploading the whole kit to the server. So what do you suggest I do? I don't mind starting anew with the database
that comes from your kit.
I don't think my host allows backup databases.
My original database was in the App_Data folder...
Ok, things are much clearer now. All you should need to do in order to deploy my site to your Hosting provider, is replace the whole PWS site on your Host with the one you downloaded from my site. Then cross your fingers and hope it all works like it should.
You should remove any zip files located in the root directory and remove the Design Files (Photoshop files) so the upload is not so large.
The fact that the database is located in the App_Data folder means your using SQL Server 2005 Express. I thought you were using SQL Server 2005 Standard or Enterprise. SQL Server 2005 Express allows for easy deployment where you don't have to use tools to
attach the database. The other versions of SQL require additional steps to deploy a data driven website.
I'd also like to know why the database from the original PWS kit will not work with yours, purely for academic purposes :)
The database from the original PWS is very different from the database included with my PWS. I have added many tables and stored procedures for storing and managing the site
and its content. I hope that is the type of answer you were looking for.
Jun 16, 2006 01:08 PM|NET.Bloke|LINK
Jun 16, 2006 02:03 PM|jwadsworth|LINK
Yes you should remove all the zip and photoshop files from the project before uploading so you don't use up unnecessary disk space on your server.
I agree that messenger would be more effective in communicating. However, I am very busy right now with several projects and would prefer to keep communications here or in email. That way I can respond when I have time. If you send me a private message we
can then switch our communication to email if you prefer. Keeping it here is fine with me as well.
Jun 17, 2006 07:44 AM|NET.Bloke|LINK
Jun 17, 2006 07:46 AM|NET.Bloke|LINK
Jun 17, 2006 08:19 PM|jwadsworth|LINK
I'd like to know from you what to do when the database space provided by the webhost comes up short in due course of time. I've noticed that some developers shift the database to their own machines. I want to explore how they do that, and any other alternatives
to conserve database space.
The database shouldn't grow too much since the images are not stored in the database.
I'd also like to discuss several other things, like using MySQL with ASP.NET applications, and the best way to "store" images in a database. All that's for later, but I indeed cherish the opportunity to interact with a fairly experienced developer and
learn some tricks of the trade!
Unfortunately will not be able to even discuss MySQL as I have never used it.
As to your question about SQL Express. I'm not sure if it gets installed with SQL Server 2005. If you are using Visual Web Developer then it probably got installed with that. It may get installed with Visual Studio 2005 as well. If you were able to download
the original PWS kit, with the database located in the App_Data folder, and you did not have to attach the database manually, then you have SQL Express installed.
Jun 18, 2006 08:13 AM|NET.Bloke|LINK
Jun 18, 2006 12:25 PM|jwadsworth|LINK
In the original PWS kit the images are stored in the database. In my modified PWS kit the images are stored in the Albums folder. If you look in the Albums folder you should notice a couple of folders named as numbers. Each album created through the web
page creates a folder inside the Albums folder. Then the images for each album are stored inside those numerically named folders.
Jun 18, 2006 03:59 PM|NET.Bloke|LINK
Jun 22, 2006 02:02 PM|NET.Bloke|LINK
Jun 23, 2006 05:01 AM|jwadsworth|LINK
In order to remove a theme you should only need to delete the theme from the App_Themes folder and delete the master associated with the theme. Of course you should always backup the site before trying one of my suggestions.
The only images you should delete in regards to the design files are the files in the Design Files directory. I would recommend deleting the photos in the Albums through the web interface. If you just delete photos out of the Album directories, there will
still be file path references in the database.
Jun 23, 2006 07:51 AM|NET.Bloke|LINK
Jun 23, 2006 05:59 PM|NET.Bloke|LINK
Jun 23, 2006 06:04 PM|NET.Bloke|LINK
Jun 26, 2006 12:00 AM|jwadsworth|LINK
The reason there are two connection strings is to allow a developer to have multiple web applications, each with their own database, all use the same membership database. This database structure is evident when examining the aspnet tables. You will notice
the aspnet_applications table as well as the ApplicationID associated with each user in the aspnet_users table.
Databases and connection strings are not my strong area. However, your issue might be resolved by changing the physical name of the database file. My guess, is that you had to add the Database=alksjd;flkajsdk because there was another database with the same
name being hosted on the same server as yours. Changing the name from Personal.mdf to say, Personal_yourinitials.mdf might solve the issue. Your host is going to be your best friend in dealing with this issue though. Hopefully you have a great host.
Jun 26, 2006 05:14 AM|NET.Bloke|LINK
Sep 15, 2006 11:50 AM|dtharby|LINK
Here is a small bit of sql that you can run against a database to create the State table that is needed for the User Management module :-
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
CREATE TABLE [dbo].[State](
[StateID] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Code] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
SET ANSI_PADDING OFF
I have just run this against SQL Server 2000/2005 and it appears to be okay.
Sep 17, 2006 02:36 AM|NET.Bloke|LINK
Sep 17, 2006 08:33 AM|dtharby|LINK
Once the table is complete then all you need to do is add some data....
The StateID is a incremental number, the State speak for itself (New York, Oregon (sorry if not correct but am UK resident and not too hot on US States)) and the Code is null in JW example but I would suspect that you could enter the State Code like VA.
1 Alabama NULL
2 Alaska NULL
3 Arizona NULL
4 Arkansas NULL
5 California NULL
6 Colorado NULL
7 Connecticut NULL
8 Delaware NULL
9 Florida NULL
10 Georgia NULL
11 Hawaii NULL
12 Idaho NULL
13 Illinois NULL
14 Indiana NULL
15 Iowa NULL
16 Kansas NULL
17 Kentucky NULL
18 Louisiana NULL
19 Maine NULL
20 Maryland NULL
21 Massachusetts NULL
22 Michigan NULL
23 Minnesota NULL
24 Mississippi NULL
25 Missouri NULL
26 Montana NULL
27 Nebraska NULL
28 Nevada NULL
29 New Hampshire NULL
30 New Jersey NULL
31 New Mexico NULL
32 New York NULL
33 North Carolina NULL
34 North Dakota NULL
35 Ohio NULL
36 Oklahoma NULL
37 Oregon NULL
38 Pennsylvania NULL
39 Rhode Island NULL
40 South Carolina NULL
41 South Dakota NULL
42 Tennessee NULL
43 Texas NULL
44 Utah NULL
45 Vermont NULL
46 Virginia NULL
47 Washington NULL
48 West Virginia NULL
49 Wisconsin NULL
50 Wyoming NULL
Hope this helps.
Sep 18, 2006 05:02 AM|NET.Bloke|LINK