deploying aspnetdb membership .. error: 26 - Error Locating Server/Instance

J

jobs

Works great on my client when I test from vs.net 2005.

Howevever, when I deploy to the web server, I get this error: remotely
and local from the web server.

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)

My web config contains this:

<connectionStrings>

<remove name="LocalSqlServer"/>

<add name="LocalSqlServer" connectionString="Data Source=.
\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|
aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" /
</connectionStrings>

There is no sql server install on the Web Server. I used vs.net 2005
to create the site on my client.


Thanks for any help or information.
 
J

Juan T. Llibre

J

jobs

re:
!> There is no sql server install on the Web Server.

That's your problem.

You need, at least SQL Server 2000 or 2005 installed on the server,
whether the Express version or the full SQL Server 2005.


Thank you!. Okay, I created an aspnetdb database somewhere else using
that aspnet_reg utilitity , changed my web.config to use it, added
users/roles and it works fine from vs.net 2005 - I renamed the local
aspnetdb file to make sure.

I deploy to the web server, and was getting error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

so I added this to my web config (making sure that user has access to
the new database).

<identity impersonate="true" userName="dbserver\dbuser"
password="dbpass"/>

and now I'm back to the original error:

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)

I have other web sites on that web server accessing databases on that
sql 2005 database server with similar web.configs with no problems,
the difference is those websites are doing intranet windows
authentication and this site is using logon forms authentication .

Thanks for any more help or information!
 
J

jobs

Some more information here.. not sure what to make of it..


The error does not appear to happen on login page (where if I enter
the wrong password I get the expected error meaning [i think] that it
was able to shake hands with the database), but on the login's success
destination page where role secuirty for "all users" is set to allow
on it's directory.

and if i take the impersonate line out of the web.config i get the
error:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

if i enter an incorrect password and submit, but apparently on the
login page.
 
J

jobs

sorry. diregard comment about impersonate.. i took that out and it
works fine from vs.net and behales the same on the web server.. here's
the latest:

My aspnetdb is on a remote database - created with that aspnet_req*
utility.

I test my login page from vs.net on my client and it works great
taking me to the destination page with no problem.

However, after I deploy to the webserver I test the login from the web
server, and I can tell there is communication with the aspnetdb, as i
get the expected login error if I enter a bad password, but if i enter
the correct password, i get the below after about 10 seconds on the
destinationpageurl.

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)

That desitination page is under a directory that has "all users" =
allow.

For IIS directory security on the web site I've tried every
combination.

windows authentication, none, basic, removing annoymous.

It would appear the problem is when the web server tries to confirm I
have access to that destination page/directory.

Thanks again for any help or information.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,795
Latest member
YolandaCar

Latest Threads

Top