Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Asp.Net Programming

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


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.

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.

You can also use other databases, like Access.

There's a sample Access Provider at :
http://download.microsoft.com/download/5/5/b/55bc291f-4316-4fd7-9269-...

More info on the Provider model is at :
http://msdn2.microsoft.com/en-us/asp.net/aa336558.aspx

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en espaol : http://asp.net.do/foros/
======================================

"jobs" <j@webdos.com> wrote in message

news:1181147559.007536.18510@p77g2000hsh.googlegroups.com...

On Jun 6, 12:52 pm, "Juan T. Llibre" <nomailrepl@nowhere.com>
wrote:

> 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!

-----------------------------------------------Reply-----------------------------------------------

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.

-----------------------------------------------Reply-----------------------------------------------

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.

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc