0

ドメイン「X」にいたときは Web アプリケーションにログインできましたが、最近「y」に移行しました。しかし、私の VS.Net 2003 コードは、ドメインを検証するために何もしません。私がデータベースに登録している限り、それは私を引き込みます。なぜ突然機能しなくなったのか、本当に驚いています。ネットワーク レベルでの Active Directory の設定が原因でしょうか?

参考までに、Windows ログイン ID (データベースに登録されているものと同じ) とドメイン パスワードを使用してログインします。

これがコードです。

login.aspx が読み込まれると、Authenticate() メソッドを呼び出します

            private void Authenticate()
            {
                try
                {
                    oBELogin = new EntityLogin(); //Property

                    oBELogin.UserId = Context.User.Identity.Name.Split('\\')[1].ToString(); //Here i used to get "domain name\login id".
                    dsLogin = (DataSet)oWFLogin.DBAuthentication(oBELogin,"Y"); //This is a web service call for authentication.  From there Database layer -> Stored procedure call.  Everything happens fine

                    if(dsLogin.Tables[0].Rows.Count>0)
                    {
                       //Code for session that works.                       
                        Response.Redirect("Page2.htm",false);
                    }
                }
                catch(System.Threading.ThreadAbortException excep) {}
                catch(System.IndexOutOfRangeException exOutOfRange)
                {
                  //Write IndexOutOfRangeException
                }

                catch(Exception ex)
                {
                  //LDAP error
                }
            }

Webフォームで適切なログイン資格情報を提供しています。ドメイン固有の値を web.config に設定しましたが、それらはこのスコープのどこにも使用されていません。問題の詳細を教えていただければ幸いです。しかし、私が思うに、これは私が到達できる最大のものです。

詳細情報: このエラー メッセージをログ ファイルに記録できます。

8/14/2012 11:45:06 PM : System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Runtime.InteropServices.COMException (0x8007052E): Logon failure: unknown user name or bad password
   at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
   at System.DirectoryServices.DirectoryEntry.Bind()
   at System.DirectoryServices.DirectoryEntry.get_NativeObject()
   at WorkFlow.WorkFlowLogin.Login()
   at WorkFlow.WorkFlowLogin.LDAPAuthentication(EntityLogin oBELogin, String strURL, String strDomain)
   --- End of inner exception stack trace ---   at Web.Login.LDAPUserAuth()
   at Web.Login.btnLogin_ServerClick(Object sender, EventArgs e) Source = Web Url = http://localhost:8090/Web/WorkFlow/WorkFlowLogin.asmx
4

0 に答える 0