473,395 Members | 1,745 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,395 software developers and data experts.

SQL Membership Provider Problem

My ASP.Net application, that uses the SQL Membership Provider, runs fine on
my development box (server2003) as long as I use the standard provider.
But, in anticipation of deployment to other servers I am attempting to
register another provider instance.

I'm not sure this is the right deployment choice but I haven't found any
guidelines on how to best deploy apps using the SQL Membership provider.

I first attached C:\Inetpub\wwwroot\PTPEmployment\App_Data\ASPNETDB .MDF to
my local SQL Server instance and renamed the data base to PTPSecurity
(because that's a shorter name).

I then added the following to my web.config....

a connection string in the connection strings section.....
<add name="AUTHConnectionString" connectionString="Data
Source=DEVSERVER2003;Initial Catalog=PTPSecurity;Integrated Security=True"
providerName="System.Data.SqlClient"/>

and.....
<membership defaultProvider="SqlProvider">
<providers>
<clear />
<add connectionStringName="AUTHConnectionString" applicationName="/"
name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>

Now, the applications runs for some things and the asp.net website
configuration utility will run for some things. But both also get the
following error with some things withing the provider database are accessed.
For instance if I try to access roles in either the application or the
utility I get the error pasted below.

#1 can anyone tell my why this is happening and #2 how are we supposed to
deploy apps with the ASPNETDB.MDF database?

The following message may help in diagnosing the problem: Cannot open user
default database. Login failed. Login failed for user
'DEVSERVER2003\Administrator'. at
System.Web.Administration.WebAdminPage.CallWebAdmi nHelperMethod(Boolean
isMembership, String methodName, Object[] parameters, Type[] paramTypes) at
ASP.security_roles_manageallroles_aspx.BindGrid() at
ASP.security_roles_manageallroles_aspx.Page_Load() at
System.Web.Util.CalliHelper.ArglessFunctionCaller( IntPtr fp, Object o) at
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender,
EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at
System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,
Boolean includeStagesAfterAsyncPoint)

thanks,
Gary
Aug 19 '07 #1
2 2746
http://weblogs.asp.net/scottgu/archi...25/423703.aspx
<configuration>

<connectionStrings>

<remove name="LocalSqlServer"/>

<add name="LocalSqlServer" connectionString="Data
Source=localhost;Initial Catalog=appservicesdb;Integrated Security=True"
providerName="System.Data.SqlClient"/>

</connectionStrings>

</configuration>



"GaryDean" <Ga******@newsgroups.nospamwrote in message
news:ud**************@TK2MSFTNGP02.phx.gbl...
My ASP.Net application, that uses the SQL Membership Provider, runs fine
on my development box (server2003) as long as I use the standard provider.
But, in anticipation of deployment to other servers I am attempting to
register another provider instance.

I'm not sure this is the right deployment choice but I haven't found any
guidelines on how to best deploy apps using the SQL Membership provider.

I first attached C:\Inetpub\wwwroot\PTPEmployment\App_Data\ASPNETDB .MDF to
my local SQL Server instance and renamed the data base to PTPSecurity
(because that's a shorter name).

I then added the following to my web.config....

a connection string in the connection strings section.....
<add name="AUTHConnectionString" connectionString="Data
Source=DEVSERVER2003;Initial Catalog=PTPSecurity;Integrated Security=True"
providerName="System.Data.SqlClient"/>

and.....
<membership defaultProvider="SqlProvider">
<providers>
<clear />
<add connectionStringName="AUTHConnectionString" applicationName="/"
name="SqlProvider" type="System.Web.Security.SqlMembershipProvider" />
</providers>
</membership>

Now, the applications runs for some things and the asp.net website
configuration utility will run for some things. But both also get the
following error with some things withing the provider database are
accessed. For instance if I try to access roles in either the application
or the utility I get the error pasted below.

#1 can anyone tell my why this is happening and #2 how are we supposed to
deploy apps with the ASPNETDB.MDF database?

The following message may help in diagnosing the problem: Cannot open user
default database. Login failed. Login failed for user
'DEVSERVER2003\Administrator'. at
System.Web.Administration.WebAdminPage.CallWebAdmi nHelperMethod(Boolean
isMembership, String methodName, Object[] parameters, Type[] paramTypes)
at ASP.security_roles_manageallroles_aspx.BindGrid() at
ASP.security_roles_manageallroles_aspx.Page_Load() at
System.Web.Util.CalliHelper.ArglessFunctionCaller( IntPtr fp, Object o) at
System.Web.Util.CalliEventHandlerDelegateProxy.Cal lback(Object sender,
EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at
System.Web.UI.Control.LoadRecursive() at
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

thanks,
Gary

Aug 19 '07 #2
That sounds good.

Thanks for coming back and letting us know the result.

Have a good day!

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Aug 27 '07 #3

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

Similar topics

2
by: John | last post by:
Hi I was working fine with create user wizard and the default membership provider. I have now customised the membership provider as per attached web.config. The create user wizard picks up the...
9
by: Paul Keegstra | last post by:
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. ...
1
by: Amir Ghezelbash | last post by:
Hello all, I need help with sql server which i was wondering if someone can shed some light on my problem The problem: Hello all, I need help with sql server which i was wondering if someone...
2
by: Balaji | last post by:
Hi All, Can I use more than one membership provider for a given website? I understand only one of them could be default one. If yes, then how to programmatically access the other membership...
3
by: ryan.mclean | last post by:
Hello everyone, I am wondering, can the membership provider be changed at runtime? Perhaps the connectionStringName? I would like to use a different database based on the server the site is...
4
by: thomas | last post by:
Hello All, How to change the default Membership Provider during the runtime? I know I can reference any provider I want, e.g.: provider = Membership.Providers but the question is how to...
4
by: =?Utf-8?B?Q2hyaXMgQ2Fw?= | last post by:
I have been having some trouble with implementing a custom Membership Provider. We have a custom data store and business logic that pulls user information. I need some level of functionality...
1
by: Ben | last post by:
Hi, When an anonymous user has created an new account (with the CreateUserWizard control), i want to let asp.net generate a password and to send it to the address of the email provided by the...
6
by: Jonathan Wood | last post by:
Although this will be a challenge at my level of ASP.NET knowledge, I'm thinking I should implement my own membership provider class. Looking over the methods I must implement, a number of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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:
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.