473,666 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:

<connectionStri ngs>

<remove name="LocalSqlS erver"/>

<add name="LocalSqlS erver" connectionStrin g="Data Source=.
\SQLEXPRESS;Int egrated Security=SSPI;A ttachDBFilename =|DataDirectory |
aspnetdb.mdf;Us er Instance=true" providerName="S ystem.Data.SqlC lient" /
>
</connectionStrin gs>

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 6698
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.co mwrote in message
news:11******** *************@p 77g2000hsh.goog legroups.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:

<connectionStri ngs>

<remove name="LocalSqlS erver"/>

<add name="LocalSqlS erver" connectionStrin g="Data Source=.
\SQLEXPRESS;Int egrated Security=SSPI;A ttachDBFilename =|DataDirectory |
aspnetdb.mdf;Us er Instance=true" providerName="S ystem.Data.SqlC lient" /
>>

</connectionStrin gs>

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\ANONY MOUS LOGON'.

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

<identity impersonate="tr ue" userName="dbser ver\dbuser"
password="dbpas s"/>

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\ANONY MOUS 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
destinationpage url.

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
1629
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 configured for local authentication. I have an aspnetdb database in my app_data folder configured with several users. Everything works fine when I run the application from my workstation. I've tried several attempts to copy the app to my w23k...
5
1471
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 setup roles/users .....? Can I do these steps:
8
6706
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 name="LocalSqlServer" connectionString="Data Source=.\SQL2005;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;user instance=true;Integrated Security=True;Initial Catalog=ASPNETDB;" providerName="System.Data.SqlClient" /> </connectionStrings>
0
1005
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 project to be deployed has a typical membership database created through the administrative interface ("App_Data/ASPNETDB.MDF"). For that dB to work on the webserver, does SQL Server Express Ed. have to be installed on the webserver as well?
4
3639
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 "aspnet_Users" table. But now I cannot run my application because of error in line: MembershipUser mu = Membership.GetUser(); System.Data.SqlClient.SqlException: Cannot open user default database. Login failed. Login failed for user 'PC\ASPNET'. A few...
2
2327
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 don't work. I am using the built in ASPNETDB.MDF database. I get the following 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...
4
2448
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 fine in the dev environment. Now I want to deploy but I want to transfer what's in the ASPNETDB.MDF db into my 2005 database so that I don't need to deploy SQLServer Express. I can import those tables into my man database but I can't seem to...
6
1623
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 of doing what I usually do which is store the username password in a db table then compare what the user enters from the text boxes to what's in the db, I thought I would try the login components from the toolbox.
6
9583
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 ======= Should ASPNETDB.MDF is necessary,
0
8445
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8551
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7386
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.