Re: Disabling ASP.net 2.0 Membership



Can you post your web.config file?






"Paul Keegstra" <paulk@xxxxxxxxxxxxx> wrote in message
news:7EE4F4FF-AD6C-407B-98F0-A843FFBECD0B@xxxxxxxxxxxxxxxx
I checked out the article you referenced and implemented my own provider.

Didn't matter. I still get the same error despite removing the default
provider and the default connection string. What other causes are there
for
this error?

--
Paul


"sloan" wrote:

You can implement your own MembershipProvider.
http://www.15seconds.com/issue/050216.htm


Lets say you don't care about it. That's fine.
Just create your own, and leave all the method implementations as "throw
new
NotImplementedException"

The key is to add the config settings, to point to your (dumb/stubbed)
MyMembershipProvider.

That should get rid of your 2005 dependancy.

...

Since you have your own login information, you may want to actually
implement some of your own methods on your MyMembershipProvider.






There are two primary reasons for creating a custom membership provider.

a.. You need to store membership information in a data source that is
not
supported by the membership providers included with the .NET Framework,
such
as a FoxPro database, an Oracle database, or other data sources.

b.. You need to manage membership information using a database schema
that
is different from the database schema used by the providers that ship
with
the .NET Framework. A common example of this would be membership data
that
already exists in a SQL Server database for a company or Web site.




"Paul Keegstra" <paulk@xxxxxxxxxxxxx> wrote in message
news:62FD8645-1327-4FAE-8D66-1E04CAAF80B4@xxxxxxxxxxxxxxxx
Hi,

I am currently working on an asp.net 2.0 web site that is a
replacement of
a
classic asp web site. The current web site uses a Commerce Server
2002
database for storing user information. It does not currently use any
of
the
Commerce Server 2002 functionality with the exception of the user
authentication features.

I have written my replacement application to use a custom login form
and
custom connection string so that I can use the Commerce Server SQL
Server
database instance without modification. My login form works great
when
running the application locally through VS 2005. However, I get the
nasty
error below when I deploy the application to my development server
(which
does not have sql server 2005 express installed).

My environment is setup for SQL Server 2000 running on a separate
server
and
I have no intention of installing SQL Server 2005 software (express or
otherwise). I am not using the asp.net 2.0 membership features in the
least
and have tried to delete the default provider - which asp.net 2.0
won't
allow.

I also don't want to undertake a migration from my Commerce Server
originated membership database because what I have now meets all of my
needs.


How can I disable asp.net 2.0 membership functionality while still
using
forms authentication and get rid of the problem of the default
membership
provider attempting to connect to a SQL Server 2005 database that
doesn't
exist?

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: Named Pipes Provider, error: 40 - Could not open a
connection
to
SQL Server)
Description: An unhandled exception occurred during the execution of
the
current web request. Please review the stack trace for more
information
about
the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: 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: Named Pipes
Provider, error: 40 - Could not open a connection to SQL Server)

Source Error:


Line 44:
Line 45: sqlCmd.Connection = cn
Line 46: cn.Open()
Line 47: Dim reader As SqlDataReader =
sqlCmd.ExecuteReader()
Line 48: If reader.Read() Then


Source File: D:\Web Content\App_Code\DAL\SqlUserLogin.vb Line: 46

Stack Trace:


[SqlException (0x80131904): 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: Named Pipes Provider, error: 40 -
Could
not open a connection to SQL Server)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +734995



System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObjec
t
stateObj) +188
System.Data.SqlClient.TdsParser.Connect(Boolean&
useFailoverPartner,
Boolean& failoverDemandDone, String host, String failoverPartner,
String
protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire,
Boolean
encrypt, Boolean trustServerCert, Boolean integratedSecurity,
SqlConnection
owningObject, Boolean aliasLookup) +820



System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String
newPassword,
Boolean redirectedUserInstance) +628



System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentit
y
identity, SqlConnectionString connectionOptions, Object providerInfo,
String
newPassword, SqlConnection owningObject, Boolean
redirectedUserInstance)
+170



System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOpti
ons
options, Object poolGroupProviderInfo, DbConnectionPool pool,
DbConnection
owningConnection) +359



System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnec
tion owningConnection, DbConnectionPool pool, DbConnectionOptions
options)
+28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424

System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66

System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +496

System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82

System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
GLSC.UserLoginObjects.SqlUserLogin.Login(String AccountId, String
Password) in D:\Web Content\App_Code\DAL\SqlUserLogin.vb:46
GLSC.BusinessObjects.UserLogin.Login(String AccountId, String
Password)
in D:\Web Content\App_Code\BAL\UserLogin.vb:15
login_login.btnLogin_Click(Object sender, EventArgs e) in D:\Web
Content\login\login.aspx.vb:12
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument)
+107



System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePo
stBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+33
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+5102





--------------------------------------------------------------------------
------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;
ASP.NET
Version:2.0.50727.42


--
Paul





.