Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / June 2007

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jobs - 06 Jun 2007 17:32 GMT
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.
Juan T. Llibre - 06 Jun 2007 17:52 GMT
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-dbf9edbaada
8/sampleaccessproviders.vsi


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 español : http://asp.net.do/foros/
======================================
> Works great on my client when I test from vs.net 2005.
>
[quoted text clipped - 23 lines]
>
> Thanks for any help or information.
jobs - 06 Jun 2007 21:12 GMT
On Jun 6, 12:52 pm, "Juan T. Llibre" <nomailrepl...@nowhere.com>
wrote:
> re:
> !> There is no sql server install on the Web Server.
[quoted text clipped - 3 lines]
> 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!
jobs - 06 Jun 2007 21:27 GMT
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.
jobs - 06 Jun 2007 23:35 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.