473,695 Members | 2,951 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp.net sqlmembershippr ovider integrated security

Hi all,
I've been debating for a while (basically since asp.net 2.0 came out) on
using the built in mebership classes to handle user management in my web
apps. I seem to keep coming upon roadblocks that keep me from jumping in.
Well this time is no different. While trying to use an asp.net
sqlmembershippr ovider to create a new user, I get the following error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Login failed for user 'DOMAIN\MACHINE NAME$'.
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.Sql Client.SqlExcep tion: Login failed for user
'DOMAIN\MACHINE NAME$'.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Login failed for user 'DOMAIN\MACHINE NAME$'.]
System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, Boolean breakConnection ) +739123
System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje ct
stateObj) +188
System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
bulkCopyHandler , TdsParserStateO bject stateObj) +1956
System.Data.Sql Client.SqlInter nalConnectionTd s.CompleteLogin (Boolean
enlistOK) +33
System.Data.Sql Client.SqlInter nalConnectionTd s.AttemptOneLog in(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTi meout, Int64
timerExpire, SqlConnection owningObject) +170
System.Data.Sql Client.SqlInter nalConnectionTd s.LoginNoFailov er(String
host, String newPassword, Boolean redirectedUserI nstance, SqlConnection
owningObject, SqlConnectionSt ring connectionOptio ns, Int64 timerStart) +349
System.Data.Sql Client.SqlInter nalConnectionTd s.OpenLoginEnli st(SqlConnectio n
owningObject, SqlConnectionSt ring connectionOptio ns, String newPassword,
Boolean redirectedUserI nstance) +181
System.Data.Sql Client.SqlInter nalConnectionTd s..ctor(DbConne ctionPoolIdenti ty
identity, SqlConnectionSt ring connectionOptio ns, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserI nstance)
+170
System.Data.Sql Client.SqlConne ctionFactory.Cr eateConnection( DbConnectionOpt ions
options, Object poolGroupProvid erInfo, DbConnectionPoo l pool, DbConnection
owningConnectio n) +359
System.Data.Pro viderBase.DbCon nectionFactory. CreatePooledCon nection(DbConne ction
owningConnectio n, DbConnectionPoo l pool, DbConnectionOpt ions options) +28
System.Data.Pro viderBase.DbCon nectionPool.Cre ateObject(DbCon nection
owningObject) +424
System.Data.Pro viderBase.DbCon nectionPool.Use rCreateRequest( DbConnection
owningObject) +66
System.Data.Pro viderBase.DbCon nectionPool.Get Connection(DbCo nnection
owningObject) +496
System.Data.Pro viderBase.DbCon nectionFactory. GetConnection(D bConnection
owningConnectio n) +82
System.Data.Pro viderBase.DbCon nectionClosed.O penConnection(D bConnection
outerConnection , DbConnectionFac tory connectionFacto ry) +105
System.Data.Sql Client.SqlConne ction.Open() +111
System.Web.Data Access.SqlConne ctionHolder.Ope n(HttpContext context,
Boolean revertImpersona te) +84
System.Web.Data Access.SqlConne ctionHelper.Get Connection(Stri ng
connectionStrin g, Boolean revertImpersona tion) +197
System.Web.Secu rity.SqlMembers hipProvider.Get PasswordWithFor mat(String
username, Boolean updateLastLogin ActivityDate, Int32& status, String&
password, Int32& passwordFormat, String& passwordSalt, Int32&
failedPasswordA ttemptCount, Int32& failedPasswordA nswerAttemptCou nt,
Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDat e)
+1121
System.Web.Secu rity.SqlMembers hipProvider.Che ckPassword(Stri ng username,
String password, Boolean updateLastLogin ActivityDate, Boolean
failIfNotApprov ed, String& salt, Int32& passwordFormat) +105
System.Web.Secu rity.SqlMembers hipProvider.Che ckPassword(Stri ng username,
String password, Boolean updateLastLogin ActivityDate, Boolean
failIfNotApprov ed) +42
System.Web.Secu rity.SqlMembers hipProvider.Val idateUser(Strin g username,
String password) +83
System.Web.UI.W ebControls.Logi n.OnAuthenticat e(AuthenticateE ventArgs e)
+160
System.Web.UI.W ebControls.Logi n.AttemptLogin( ) +105
System.Web.UI.W ebControls.Logi n.OnBubbleEvent (Object source, EventArgs e)
+99
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +35
System.Web.UI.W ebControls.Butt on.OnCommand(Co mmandEventArgs e) +115
System.Web.UI.W ebControls.Butt on.RaisePostBac kEvent(String eventArgument)
+163
System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
eventArgument) +7
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.832; ASP.NET
Version:2.0.507 27.832

Here's my configuration situation. I'm running .net 2.0 and sql server
2005. I'm using integrated security in my connection string similar to
"Data Source=SERVER;I nitial Catalog=DATABAS E;Trusted_Conne ction=True;". The
applicaiton in IIS is running as a network level user that has db_owner
access to the database in the connection string. The user is impersonated
in the web.config using "<identity impersonate="tr ue"/>". The rest of the
database access on the site works fine using the same connection string. I
only get the error above when trying to do the membership functionality. It
almost looks like when I use the classes that it drops the annonymous user
and goes back to using a machine level account.

Any help would be greatly appreciated.

Thanks,
Matt
Jun 27 '08 #1
1 2799
Anyone have any thoughts on this?

"Matt MacDonald" <ma******@hotma il.comwrote in message
news:%2******** *******@TK2MSFT NGP06.phx.gbl.. .
Hi all,
I've been debating for a while (basically since asp.net 2.0 came out) on
using the built in mebership classes to handle user management in my web
apps. I seem to keep coming upon roadblocks that keep me from jumping in.
Well this time is no different. While trying to use an asp.net
sqlmembershippr ovider to create a new user, I get the following error:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Login failed for user 'DOMAIN\MACHINE NAME$'.
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.Sql Client.SqlExcep tion: Login failed for
user 'DOMAIN\MACHINE NAME$'.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

Stack Trace:

[SqlException (0x80131904): Login failed for user 'DOMAIN\MACHINE NAME$'.]
System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, Boolean breakConnection ) +739123

System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje ct
stateObj) +188
System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior, SqlCommand
cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
bulkCopyHandler , TdsParserStateO bject stateObj) +1956
System.Data.Sql Client.SqlInter nalConnectionTd s.CompleteLogin (Boolean
enlistOK) +33

System.Data.Sql Client.SqlInter nalConnectionTd s.AttemptOneLog in(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTi meout, Int64
timerExpire, SqlConnection owningObject) +170
System.Data.Sql Client.SqlInter nalConnectionTd s.LoginNoFailov er(String
host, String newPassword, Boolean redirectedUserI nstance, SqlConnection
owningObject, SqlConnectionSt ring connectionOptio ns, Int64 timerStart)
+349

System.Data.Sql Client.SqlInter nalConnectionTd s.OpenLoginEnli st(SqlConnectio n
owningObject, SqlConnectionSt ring connectionOptio ns, String newPassword,
Boolean redirectedUserI nstance) +181

System.Data.Sql Client.SqlInter nalConnectionTd s..ctor(DbConne ctionPoolIdenti ty
identity, SqlConnectionSt ring connectionOptio ns, Object providerInfo,
String newPassword, SqlConnection owningObject, Boolean
redirectedUserI nstance) +170

System.Data.Sql Client.SqlConne ctionFactory.Cr eateConnection( DbConnectionOpt ions
options, Object poolGroupProvid erInfo, DbConnectionPoo l pool, DbConnection
owningConnectio n) +359

System.Data.Pro viderBase.DbCon nectionFactory. CreatePooledCon nection(DbConne ction
owningConnectio n, DbConnectionPoo l pool, DbConnectionOpt ions options) +28
System.Data.Pro viderBase.DbCon nectionPool.Cre ateObject(DbCon nection
owningObject) +424
System.Data.Pro viderBase.DbCon nectionPool.Use rCreateRequest( DbConnection
owningObject) +66
System.Data.Pro viderBase.DbCon nectionPool.Get Connection(DbCo nnection
owningObject) +496
System.Data.Pro viderBase.DbCon nectionFactory. GetConnection(D bConnection
owningConnectio n) +82
System.Data.Pro viderBase.DbCon nectionClosed.O penConnection(D bConnection
outerConnection , DbConnectionFac tory connectionFacto ry) +105
System.Data.Sql Client.SqlConne ction.Open() +111
System.Web.Data Access.SqlConne ctionHolder.Ope n(HttpContext context,
Boolean revertImpersona te) +84
System.Web.Data Access.SqlConne ctionHelper.Get Connection(Stri ng
connectionStrin g, Boolean revertImpersona tion) +197
System.Web.Secu rity.SqlMembers hipProvider.Get PasswordWithFor mat(String
username, Boolean updateLastLogin ActivityDate, Int32& status, String&
password, Int32& passwordFormat, String& passwordSalt, Int32&
failedPasswordA ttemptCount, Int32& failedPasswordA nswerAttemptCou nt,
Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDat e)
+1121
System.Web.Secu rity.SqlMembers hipProvider.Che ckPassword(Stri ng username,
String password, Boolean updateLastLogin ActivityDate, Boolean
failIfNotApprov ed, String& salt, Int32& passwordFormat) +105
System.Web.Secu rity.SqlMembers hipProvider.Che ckPassword(Stri ng username,
String password, Boolean updateLastLogin ActivityDate, Boolean
failIfNotApprov ed) +42
System.Web.Secu rity.SqlMembers hipProvider.Val idateUser(Strin g username,
String password) +83
System.Web.UI.W ebControls.Logi n.OnAuthenticat e(AuthenticateE ventArgs e)
+160
System.Web.UI.W ebControls.Logi n.AttemptLogin( ) +105
System.Web.UI.W ebControls.Logi n.OnBubbleEvent (Object source, EventArgs
e) +99
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args)
+35
System.Web.UI.W ebControls.Butt on.OnCommand(Co mmandEventArgs e) +115
System.Web.UI.W ebControls.Butt on.RaisePostBac kEvent(String
eventArgument) +163

System.Web.UI.W ebControls.Butt on.System.Web.U I.IPostBackEven tHandler.RaiseP ostBackEvent(St ring
eventArgument) +7
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +33
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +5102

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.507 27.832;
ASP.NET Version:2.0.507 27.832

Here's my configuration situation. I'm running .net 2.0 and sql server
2005. I'm using integrated security in my connection string similar to
"Data Source=SERVER;I nitial Catalog=DATABAS E;Trusted_Conne ction=True;".
The applicaiton in IIS is running as a network level user that has
db_owner access to the database in the connection string. The user is
impersonated in the web.config using "<identity impersonate="tr ue"/>".
The rest of the database access on the site works fine using the same
connection string. I only get the error above when trying to do the
membership functionality. It almost looks like when I use the classes
that it drops the annonymous user and goes back to using a machine level
account.

Any help would be greatly appreciated.

Thanks,
Matt

Jun 27 '08 #2

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

Similar topics

1
2014
by: Tilted | last post by:
Hi I have an application which has been deployed and worked fine on all previous workstations, it is c# based and uses Crystal connecting directly to MSDE using stored procedures and the ConnectionInfo object. I design the report on the dev machine, connecting to a local install of MSDE, I don't use integrated security on any of these reports. Once deployed the ConnectionInfo object is used to overwrite the connection settings for...
1
27825
by: Srinivasa Reddy K Ganji | last post by:
Hi I have come across this type of code at many places. New SqlConnection("Data Source=(local);Initial Catalog=XYZ;Integrated Security=SSPI;") I assume that the database connection details are hidden here. What is "Integrated Security=SSPI"? Can anyone guide me how to set this up using c#. Also is it possible to set up this type of connections on web sites hosted
4
8539
by: Ravikanth[MVP] | last post by:
Hi It is possible that IIS and SQL Server can reside on Seperate Machines and you can use Integrated Windows Authentication to connect. Ravikanth >-----Original Message-----
4
6802
by: Andrew | last post by:
Hey all, I would like to preface my question by stating I am still learning ASP.net and while I am confident in the basics and foundation, the more advanced stuff is still a challenge. Ok. :)
5
4392
by: cdlipfert | last post by:
Our intranet is running under windows integrated security. We have domain users that want to access our intranet site via ssl vpn. SSL VPN can not authenticate against services that run under windows integrated security. In order to get around this issue it seems that we would need to create a login page on a separate site that runs under anonymous security. Then pass the users credentials to the site running under integrated security. ...
2
1384
by: Bob | last post by:
I would like to use integrated security for DB connection for my ASP.NET applications. Since these apps have different databases (SQL Server), I want each app to be able to access its own database. Say if I have 10 apps, I'd need 10 logins, one login for each DB. Now throw in the windows integrated security, I need 10 windows account. However, in order to run an ASP.NET app under a certain identity, it has to have its own application...
7
11244
by: Henry | last post by:
I am writing a Windows forms VB.Net/MS SQL application via VS 2003 that utilizes Crystal Reports. I want to be able to dynamically set the report data source at run time. I'm trying to change the the reports "integrated security" from TRUE to FALSE via the "Set Location" dialog in the report designer with no success. It is not intuitive (at least not to me.) I get the following error:
1
1198
by: et | last post by:
I created a web site using integrated security, and now I want it taken off. I have taken it off of everything in IIS, I have even re-created the project, brand new, nothing is in the project but webform1, and it still does not let me run it because it says integrated security is not turned on in IIS. Where is it hiding this little tidbit that the asp.net project thinks it needs integrated security? I've looked in the web.config.
2
2559
by: daz_oldham | last post by:
Hi All Bit of an odd one - very basically I created an app using the SqlMembershipProvider in VS.NET 2005, and I did it on a MS SQL 2005 server. However, I then find out that for other reasons, I cannot use MS SQL 2005 on the live database, so I transferred my database to my SQL 2000 box.
0
8619
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
8555
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
8817
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7651
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
6484
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
4336
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...
0
4571
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2258
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1970
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.