I have a website that works OK on my local machine when I test it within Microsoft Visual Studio's debugging mode. However now that I have copied it over to a remote server it is failing with an error message of:
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)
As far as I'm aware I have never used SQL Server with my webpage. All connections to databases are to Oracle with connection strings and providers set up in the webconfig file. The website does however use a login control to recognise authorised users. Does this mean I've unknowingly been using SQL Server (to support the login control) and I therefore need to install this on the remote machine? Or is it something simpler? Wondered if anybody had seen this error message before?
Hi,
The website does however use a login control to recognize authorized users.
As you mentioned in your post, you are using login controls to recognize authorized users. In ASP.NET, such controls like logins, createuserwizard and etc are parts of .Net Membership provider mechanism.
In your local side, I think the SQLExpress has been shipped in your Visual Studio, so it can support the membership to work. But after you deployed your application to your server, the membership still tries to find the database to support. Unfortunately, the database does exist on your server, so the error occurs.
Thanks.
Hi Nai-Dong, thanks for replying. I agree with your suggestion that the membership is tying and failing to read the database. The database MDF file is present and in the correct location. The permissions are set on this file as according to other forum posts I've read. I also installed SQLServer Express on the remote machine. I suspect that the membership is not picking up the SQLServerExpress install but I am not sure how to fix this. It's such a shame because the ASP.NET login controls and .Net membership provider are really neat and simple to use. Due to time restraints it's looking like I'm going to have to use my Oracle database to contain the login information and write code myself to enable authentication.
|||Hi,
Well, i just want to provide you some materials on membership which maybe helpful to you when you are going to use Membership in your next project.
About Membership Providershttp://msdn2.microsoft.com/en-us/library/aa478949.aspx
Membership introductionhttp://msdn2.microsoft.com/en-us/library/yh26yfzy.aspx
Settings on using Membershiphttp://msdn2.microsoft.com/en-us/library/ms731049.aspx
Besides, you can export all the datatables with schemas in ASPNETDB into your Oracle database, and change the membership provider, you also can use membership with a Oracle back-end database.
Hope that helps. Thanks.
||| Thanks Michael - greatly appreciated. I will certainly read through them. I like the idea of Oracle providing membership since I can connect to me Oracle db without any problems.
No comments:
Post a Comment