Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 November 16th, 2005, 06:22 PM
Registered User
 
Join Date: Nov 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default fail login sql server

OS : windows server 2003
DB : SQL server 2000

Would you help me?

case1

    string conn = "server=localhost; database=Dotnet; uid=sa; pwd=;";
    SqlConnection connection = new SqlConnection(conn);
    connection.Open();

This case1 is occurred Exception(System.InvalidCastException)

[InvalidCastException: ÁöÁ¤ÇÑ Ä³½ºÆ®°¡ À߸øµÇ¾ú½À´Ï´Ù.]
   ASP.control_test_aspx.Setmyname(Object src, EventArgs e) +133
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
   System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +1277



case2

    string conn = "server=localhost; database=Northwind; uid=sa; pwd=;";
    SqlConnection connection = new SqlConnection(conn);
    connection.Open();

This case2 is not occurred Exception. Login success.

Q1. I don't understand above state. Why case1 have CastExeption?

case3

    string conn = "server=localhost; database=Northwind; uid=Administrator; pwd=star_3327;";
    SqlConnection connection = new SqlConnection(conn);
    connection.Open();

This case3 can't login sql server(System.Data.SqlClient.SqlException).

[SqlException: 'Administrator' »ç¿ëÀÚ°¡ ·Î±×ÀÎÇÏÁö ¸øÇß½À´Ï´Ù.]
   System.Data.SqlClient.ConnectionPool.GetConnection (Boolean& isInTransaction) +472
   System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString options, Boolean& isInTransaction) +372
   System.Data.SqlClient.SqlConnection.Open() +384
   ASP.control_test_aspx.Setmyname(Object src, EventArgs e) +72
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
   System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18
   System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
   System.Web.UI.Page.ProcessRequestMain() +1277

Q2. Why case3 can't login?







Similar Threads
Thread Thread Starter Forum Replies Last Post
fail login sql database... junghyun baek ASP.NET 1.0 and 1.1 Basics 2 November 22nd, 2005 08:20 PM
Login Fail - Access a Crystal Report from . NET rsk Crystal Reports 0 August 17th, 2004 07:29 AM
login fail by user 'sa' in .net framework 1.1 sara_1981 BOOK: Beginning ASP 3.0 3 August 2nd, 2004 07:26 AM
Login fail Err when view report on Report Server dillig BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 July 22nd, 2004 05:31 AM
sa login fail...can't find where to fix it pdr1165 BOOK: ASP.NET Website Programming Problem-Design-Solution 3 March 24th, 2004 04:14 PM





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