catalyst2 community forums  

Go Back   catalyst2 community forums > Support > Database Support

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 20-07-2007, 10:39 AM   #1 (permalink)
Registered User
 
Join Date: Aug 2004
Location: Leeds
Posts: 10
Problem connecting ASP.Net to 2005 Database

I have 2 connection strings in my config file. They contain the same connection information, but one has a connection for normal database connecting, and the other is for connecting to user/role/membership information.

I have moved all the user/role/membership info from the usual ASPNETDB.mdb, and set up membership info in my web.config file.

This all works locally. Also, when I connect locally and use the Live Database on catalyst2, it works fine.

However, when I make everything LIVE and connect from ASP 2.0 to the Database, I get the following error, when it attempts to check User information (User.IsInRole):

"
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 71:
Line 72: 'Check if logged in
Line 73: If User.IsInRole("Admin") Or User.IsInRole("User") Then

etc....
"

Anyone have any ideas what might cause this?
Buddha Brillian is offline   Reply With Quote
Old 20-07-2007, 01:35 PM   #2 (permalink)
Administrator
 
WhiskyFudge's Avatar
 
Join Date: Oct 2003
Posts: 1,484
Have you checked both of your connection strings are correct?
__________________
Jason Robbins
jason@catalyst2.com
WhiskyFudge is offline   Reply With Quote
Old 01-08-2007, 02:20 PM   #3 (permalink)
Registered User
 
Join Date: Aug 2004
Location: Leeds
Posts: 10
Hi.

It's OK, I made a temporary fix by checking for authenticated users, rather than checking .Net2 Role Membership.
Buddha Brillian is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 11:04 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.