Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use aspnet_regsql.exe

I'm having problems Creating Users in a Silverlight Business Application that uses the Local IIS Web Server.

If I use the Visual Studio Development Server I have no problems, but once I check "Use Local IIS Web Server" in the properties page and run the application, whenever I try to create a new user using "login->Register now" I get an "Unable to connect to SQL Server" error.

I found a similar problem as mine and the solution was to use aspnet_regsql in the command prompt.

If I have to use this tool, then I don't know how to use it:

aspnet_regsql.exe -S DBServerName -U DBLogin -P DBPassword -A all -d DBName

What should I enter in these parameters:

DBServerName: I guess it's ".\sqlexpress"

DBLogin and DBPassword: Kind of a login and password for the database?

DBName: If I'm not using any particular database, then what?

Please, what should I do here?

like image 262
Rafael Avatar asked Feb 06 '13 16:02

Rafael


People also ask

What Aspnet_regsql EXE is for?

The Aspnet_regsql.exe tool is located in the drive:\WINDOWS\Microsoft.NET\Framework\versionNumber folder on your Web server. Aspnet_regsql.exe is used to both create the SQL Server database and add or remove options from an existing database.

How can use SQL Server session state in ASP NET?

To implement ASP.NET SQL Server mode session state management, you must modify the <sessionState> element of your application's Web. config file as follows: Set the mode attribute of the <sessionState> element to SQLServer to indicate that session state is stored in SQL Server.


1 Answers

Navigate to the wizard(C:\Windows\Microsoft.NET\Framework[framework version]\aspnet_regsql) and launch it , you will be able to see a form appear and you can enter details here rather than using the command prompt.

Also within VS , from top menu select WEBSITE -> ASP.Net Configuration you should be able to see all your user and role details (you can tst the connectivity as this will pull of data based on your web.config/app.config settings)

like image 135
Waqar Avatar answered Sep 22 '22 11:09

Waqar