The default Microsoft aspnet_regsql application outputs SQL queries designed for non-shared SQL Server installations where the executing account has broad permissions. It cannot be executed directly in a shared environment due to permission limitations. ASPnix has altered this output into a modified .sql file that can be safely run on your shared SQL Server database. This is the recommended way to install the database components required by ASP.NET Membership, Roles, Profile, and other providers.
To proceed, log in to your ASPnix billing account to download the modified script. After downloading and extracting the file, execute the SQL statements using SQL Server Management Studio (SSMS), MyLittleAdmin, or your usual database management tool. This will create all the necessary tables, views, stored procedures, and functions in your database.
#Prerequisites
- An active ASPnix account with an assigned SQL Server database
- Credentials to log in to the ASPnix billing portal
- A tool capable of executing T-SQL scripts against your database such as SSMS or the web-based MyLittleAdmin
- A current backup of your database in case of any unexpected issues
#Background on ASP.NET Application Services
Many ASP.NET applications depend on the System.Web providers for handling user authentication, maintaining roles, storing user profiles, and even session state in some configurations. These features rely on a SQL Server backend with a predefined set of database objects. The aspnet_regsql.exe is the official utility that generates the T-SQL needed to create these objects. Because shared hosting restricts certain commands like those affecting server logins or jobs, a customized version of the script is necessary. The modified script preserves the full schema while removing or adjusting any statements that would fail under typical shared-hosting permission models.
#Downloading the Modified aspnet_regsql Script
You must first log in to your ASPnix billing account as the download is restricted to customers. Once authenticated, follow the link in the knowledge base article to retrieve the modified .sql file. The file is typically provided in a compressed format for faster transfer. Extract the archive using any standard unzipping utility to access the SQL script ready for execution. Store this file securely as it contains the full schema definition. Do not attempt to use the original output from Microsoft's aspnet_regsql.exe; only the version provided by ASPnix is compatible with the shared SQL environment.
#Executing the Script Using Your Management Tool
Connect to your SQL Server database using the login details from your ASPnix account control panel. It is critical to target the user database created for your site and not the system master database. Load the extracted .sql file into the query window of your tool. Review the script briefly to confirm it matches expectations, then execute it. The process creates roughly a dozen tables with names beginning in aspnet_, along with associated stored procedures for all the provider functions. Monitor the output window for any error messages. Execution normally completes within one minute on a typical database.
USE YourDatabaseName;
GO
-- Paste the entire contents of the downloaded aspnet_regsql.sql here and execute
#Common Pitfalls and Troubleshooting
The most frequent issue is attempting to run the script without first selecting the correct database context, which can cause object creation to fail in the wrong location. Another potential problem is using an outdated version of the script or one not modified for shared hosting. If you see permission denied errors on CREATE statements, confirm that your database user has been granted the necessary rights such as db_ddladmin or equivalent. The ASPnix modified script is engineered to minimize such requirements. Avoid running the script multiple times on the same database unless you have first dropped the existing objects.
- Always select the target database before running the script
- Check the output for successful completion of all batches
- Contact ASPnix support with any persistent errors including the exact error text
#Verification and Related Configuration
Post-execution, refresh your database object list and confirm the presence of tables like aspnet_Users, aspnet_Membership, aspnet_Roles, and others. With the schema in place, update your application's web.config to point the providers at this database using an appropriate connection string. This completes the setup for using forms authentication and related features in your ASP.NET application. See our additional articles on web.config settings for Membership and Role providers for the next steps. A successful installation enables immediate use of the built-in ASP.NET provider classes without further database changes.
Comments
No comments yet