12

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?

Rafael
  • 2,413
  • 4
  • 32
  • 54

1 Answers1

21

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)

Waqar
  • 758
  • 4
  • 15
  • I already did that. But the questions in the wizard are the same of the parameters, it didn't throw an error, but the problem remains. As for the ASP NET Configuration, the problem is that with that tool I have no problems creating users, but I still can't do with the app itself. Besides, if I try to login with a user created with the ASP NET Configuration tool, I get the following error "Failed to generate a user instance of SQL Server due to a failure in impersonating the client. The connection will be closed." I have ASP Impersonation enabled in IIS (7.5) – Rafael Feb 06 '13 at 17:29
  • I'm still having problems with users managing, but you answered my question – Rafael Feb 07 '13 at 17:15
  • It's better to use cmd for this since it offers more customization than the windows form app for regsql. – Talha Imam Jan 21 '19 at 12:42