473,396 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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.

Jun 6 '07 #1
4 6683
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/downlo...sproviders.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/
======================================
"jobs" <jo**@webdos.comwrote in message
news:11*********************@p77g2000hsh.googlegro ups.com...
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.

Jun 6 '07 #2
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!

Jun 6 '07 #3
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.

Jun 6 '07 #4
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.

Jun 6 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Carl M. | last post by:
Okay, I'm 18 hours into this now and am at a loss. What I've done is create an application on my local workstation using VWD Express using the membership/roles provider and SQL Server Express...
5
by: sloan | last post by:
Are there any "gotchas" on deploying the default Membership Provider (aspnetdb) to a hosting provider? I'm about to do it. And how does one get to the "auto configurer" .. that allows you to...
8
by: nick | last post by:
I have only SQL Server 2005 installed on my PC. And I tried to add the following rows in web.config to use SQL Server 2005 instead of Express: <connectionStrings> <clear /> <add...
0
by: geek-y-guy | last post by:
I have a "newbie" deployment question. I want to confirm what's involved in deploying a web created with Visual Web Developer Express Edition to a production Server2003/IIS 6 server. The...
4
by: R.A.M. | last post by:
Hello, I am learning ASP.NET. In web application I am programming now I decided to add a table "Users" to aspnetdb database (with extra data about users) and a trigger AFTER UPDATE of...
2
by: gihope | last post by:
I have searched everywhere for answers to this but none of the posts I have read have helped yet. My website works perfectly until I upload it onto a remote web host. When this happens the logisn...
4
by: GaryDean | last post by:
I have a 2.0 Website application in the dev environment that uses a SQL Server 2005 DB and also uses the authentication controls and classes that automatically use SQLServer Express. It all works...
6
by: greg.hart | last post by:
Hello all, Just wanted to get some clarification on something. I was setting out to create a login page for people to login and then be able to access certain aspects of the website. Instead...
6
by: Mr. X. | last post by:
I have visual studio 2008. My site has a plesk on it. I want to deploy my project, and save it on the host machine. Looking for solution for folowings, please : 1st solution =======...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.