Permanent User Accounts

Due to the stateless nature of the HTTP protocol, file and directory operations in a Web application typically do not persist after a user session has ended.

However, for PowerBuilder .NET Web Forms applications, you can store user names in a database and persist data and files created by application users across Web Forms sessions. PowerBuilder .NET Web Forms can take advantage of the ASP.NET membership feature to maintain permanent user accounts and store files created or modified by application users.

The default ASP.NET membership provider is defined in the machine.config file that is typically installed in the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG directory. The machine.config file assigns SQL Server Express (.\SQLEXPRESS) as the default membership data source.

SQL Server Express

You can download the SQL Server 2005 Express Edition from the Microsoft download site at http://www.microsoft.com/downloads/details.aspx?familyid=220549b5-0b07-4448-8848-dcc397514b41&displaylang=en.

You might need to uninstall SQL Native Client before installing SQL Server 2005 Express. The SQL Server Express setup produces an error if it finds an incompatible version of SQL Native Client. The SQL Server Express setup includes a compatible version of SQL Native Client that it installs if it does not find an existing version of this driver on the server computer.

If you are not using SQL Server Express

You do not need to install SQL Server Express if you are using SQL Server for the permanent user database, but then you must replace the default connection string in the machine.config file or add a connection string to the web.config file for the Web Forms application. Changes to the machine.config file affect all .NET Web applications.
The connection string you add to the web.config file should have the following format for a remote database server using SQL Authentication:
<connectionStrings>
  <add name="MySQLServer" connectionString="Server=dbsevername; Database=aspnetdb; User Id=uid; password=pwd"  providerName="System.Data.SqlClient" />
</connectionStrings>
This connection string specifies a local SQL Server database with Windows Authentication (SSPI):
<connectionStrings>
   <add name="MyDbConn" 
     connectionString="Initial Catalog=MyDb;
       Data Source=MyServer;
       Integrated Security=SSPI;"/>
</connectionStrings>