Re: Disabling ASP.net 2.0 Membership
- From: "Paul Keegstra" <paulk@xxxxxxxxxxxxx>
- Date: Thu, 9 Feb 2006 12:29:27 -0800
sure:
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<appSettings>
</appSettings>
<connectionStrings>
<add name="Conn2.ConnectionString"
connectionString="Server=myserver;Database=membershipdb;User
ID=tester;Password=pwd;Persist Security Info=false;"/>
<add name="Conn1.ConnectionString"
connectionString="Server=myserver;Database=testdb;User
ID=tester;Password=pwd;Persist Security Info=false;"/>
</connectionStrings>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
Visual Basic options:
Set strict="true" to disallow all data type conversions
where data loss can occur.
Set explicit="true" to force declaration of all variables.
-->
<compilation debug="true" strict="false" explicit="true"/>
<authorization>
<allow users="?"/>
<allow users="*"/>
</authorization>
<pages theme="Default">
<namespaces>
<clear/>
<add namespace="System"/>
<add namespace="System.Collections"/>
<add namespace="System.Collections.Specialized"/>
<add namespace="System.Configuration"/>
<add namespace="System.Text"/>
<add namespace="System.Text.RegularExpressions"/>
<add namespace="System.Web"/>
<add namespace="System.Web.Caching"/>
<add namespace="System.Web.SessionState"/>
<add namespace="System.Web.Security"/>
<add namespace="System.Web.Profile"/>
<add namespace="System.Web.UI"/>
<add namespace="System.Web.UI.WebControls"/>
<add namespace="System.Web.UI.WebControls.WebParts"/>
<add namespace="System.Web.UI.HtmlControls"/>
</namespaces>
</pages>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Forms">
<forms loginUrl="~/login/login.aspx" name="myAuthCookie" protection="All"
timeout="60" path="/"/>
</authentication>
<membership defaultProvider="MyMembershipProvider">
<providers>
<clear />
<add name="MyMembershipProvider"
type="GLSC.Membership.MyCustomMembershipProvider"
enablePasswordRetrieval="false"
enablePasswordReset="false"
requiresQuestionAndAnswer="false"
applicationName="/"
requiresUniqueEmail="false"
passwordFormat="Clear" />
</providers>
</membership>
<!--
The <customerrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.
<customerrors mode="RemoteOnly"
defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customerrors>
-->
</system.web>
<location path="coordinators">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
</configuration>
--
Paul
"sloan" wrote:
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.for
Didn't matter. I still get the same error despite removing the default
provider and the default connection string. What other causes are there
this error?new
--
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
notNotImplementedException"
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
suchsupported by the membership providers included with the .NET Framework,
thatas a FoxPro database, an Oracle database, or other data sources.
b.. You need to manage membership information using a database schema
withis different from the database schema used by the providers that ship
thatthe .NET Framework. A common example of this would be membership data
replacement ofalready 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
2002a
classic asp web site. The current web site uses a Commerce Server
ofdatabase for storing user information. It does not currently use any
andthe
Commerce Server 2002 functionality with the exception of the user
authentication features.
I have written my replacement application to use a custom login form
Servercustom connection string so that I can use the Commerce Server SQL
whendatabase instance without modification. My login form works great
nastyrunning the application locally through VS 2005. However, I get the
(whicherror below when I deploy the application to my development server
serverdoes not have sql server 2005 express installed).
My environment is setup for SQL Server 2000 running on a separate
won'tand
I have no intention of installing SQL Server 2005 software (express orleast
otherwise). I am not using the asp.net 2.0 membership features in the
and have tried to delete the default provider - which asp.net 2.0
usingallow.needs.
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
How can I disable asp.net 2.0 membership functionality while still
membershipforms authentication and get rid of the problem of the default
doesn'tprovider attempting to connect to a SQL Server 2005 database that
Whenexist?
An error has occurred while establishing a connection to the server.
thatconnecting to SQL Server 2005, this failure may be caused by the fact
connections.under the default settings SQL Server does not allow remote
connection(provider: Named Pipes Provider, error: 40 - Could not open a
theto
SQL Server)
Description: An unhandled exception occurred during the execution of
informationcurrent web request. Please review the stack trace for more
doesabout
the error and where it originated in the code.occurred
Exception Details: System.Data.SqlClient.SqlException: An error has
while establishing a connection to the server. When connecting to SQLServer
2005, this failure may be caused by the fact that under the defaultsettings
SQL Server does not allow remote connections. (provider: Named PipessqlCmd.ExecuteReader()
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 =
Line 48: If reader.Read() Thenfailure
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
may be caused by the fact that under the default settings SQL Server
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObjecnot
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
useFailoverPartner,t
stateObj) +188
System.Data.SqlClient.TdsParser.Connect(Boolean&
StringBoolean& failoverDemandDone, String host, String failoverPartner,
Booleanprotocol, SqlInternalConnectionTds connHandler, Int64 timerExpire,
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnectionencrypt, Boolean trustServerCert, Boolean integratedSecurity,SqlConnection
owningObject, Boolean aliasLookup) +820
newPassword,owningObject, SqlConnectionString connectionOptions, String
System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentitBoolean redirectedUserInstance) +628
redirectedUserInstance)y
identity, SqlConnectionString connectionOptions, Object providerInfo,String
newPassword, SqlConnection owningObject, Boolean
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOpti+170
DbConnectionons
options, Object poolGroupProviderInfo, DbConnectionPool pool,
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnecowningConnection) +359
options)tion owningConnection, DbConnectionPool pool, DbConnectionOptions
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection+28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnectionSystem.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +424
owningObject) +66
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnectionowningObject) +496
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnectionowningConnection) +82
Password)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
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePoin D:\Web Content\App_Code\BAL\UserLogin.vb:15eventArgument)
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
+107
+33stBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+5102System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
--------------------------------------------------------------------------
------
Version Information: Microsoft .NET Framework Version:2.0.50727.42;ASP.NET
Version:2.0.50727.42
--
Paul
- Follow-Ups:
- Re: Disabling ASP.net 2.0 Membership
- From: Steven Cheng[MSFT]
- Re: Disabling ASP.net 2.0 Membership
- References:
- Disabling ASP.net 2.0 Membership
- From: Paul Keegstra
- Re: Disabling ASP.net 2.0 Membership
- From: sloan
- Re: Disabling ASP.net 2.0 Membership
- From: Paul Keegstra
- Re: Disabling ASP.net 2.0 Membership
- From: sloan
- Disabling ASP.net 2.0 Membership
- Prev by Date: Re: App_Code folder
- Next by Date: Re: DataGrid - Edit, Update, Delete
- Previous by thread: Re: Disabling ASP.net 2.0 Membership
- Next by thread: Re: Disabling ASP.net 2.0 Membership
- Index(es):
Loading