Wrox Programmer Forums
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 1st, 2005, 04:58 PM
Registered User
Join Date: Jun 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Logout problem

I'm using C# + ASP.NET + SQL SERVER 2005

In my testing application I just open and close immediately connection to database doing it in that way
SqlConnection cn= new SqlConnection("server=(local);uid=agent1;pwd="+passwd+";database=CRM");    
Next I try execute in query analyzer:
 EXEC sp_dropuser 'agent1'
and that cause exception :
Could not drop login 'agent1' as the user is currently logged in. (Microsoft SQL Server, Error: 15434)

Next I execute query

select * from dbo.sysprocesses
and there is still record with atributte 'loginame' equal to 'agent1'

What am I doing wrong !?

Thanks for every advice in advance...
Old July 8th, 2005, 05:44 AM
Authorized User
Join Date: Feb 2005
Posts: 91
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to ashokparchuri Send a message via Yahoo to ashokparchuri


   May i know how many users exists in your database..?

   the two steps are correct when u give cn.close the connection should be closed and the user will be logged out.

   i fell that u may be logged in as user agent1...make it sure...

hope this helps-Ashok Parchuri

Similar Threads
Thread Thread Starter Forum Replies Last Post
logout problem badboy1 ASP.NET 3.5 Basics 3 July 22nd, 2008 08:32 AM
Logout problem dayaananthanm ASP.NET 2.0 Professional 2 December 7th, 2006 04:57 AM
Logout Problem birari Classic ASP Basics 7 September 1st, 2006 12:22 AM
login logout problem... sunmeet122 Classic ASP Professional 2 April 15th, 2004 09:47 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.