473,603 Members | 2,603 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 2795
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
2010
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
27821
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
8531
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
6793
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
4388
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
1378
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
11239
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
1195
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
2556
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
7996
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
8415
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
8060
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
8273
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
6735
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...
0
5441
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
3903
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...
1
1514
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1259
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.