Avatar of dcmorrell
dcmorrell
 asked on

command: Roles.GetUsersInRole causes: SQL Server Error

I get the error below.

it seems strange because I don't see how looking for the user's role has anything to do with SQL, seeing how I'm using checking users against an LDAP connected to active directory. Any ideas?
Server Error in '/' Application.
--------------------------------------------------------------------------------
 
An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
 
Exception Details: System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
 
Source Error: 
 
 
Line 20: 
Line 21:     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Line 22:         Dim someArray As Array = Roles.GetUsersInRole(User.Identity.Name)
Line 23:         Me.lbl_test.Text = someArray(0)
Line 24:

Open in new window

ASP.NETMicrosoft SQL ServerMicrosoft SQL Server 2008

Avatar of undefined
Last Comment
thecoon

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
udaya kumar laligondla

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
thecoon

what roleManager provider are you using?  What does your web.config look like, i.e. what is the connection string to this provider?
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy