Solved

How do I solve (what I think) my excption handling issue that I'm having through goDaddy.com?

Posted on 2011-09-10
3
1,482 Views
Last Modified: 2012-05-12
I have developed a site locally using asp .net 4.0. "It works fine on my machine". I've uploaded all of my files to goDaddy. Now I'm running into a:

"The type ExceptionPolicyImpl has multiple constructors of length 2. Unable to disambiguate."

error as soon as i try to hit the default page. I have written my own exception handling class, (code included) that if I don't need, will be happy to remove it. Along with that class, i'm including my web.config file, and the path of execution that the code takes as it goes to the place, in my code, where i'm pretty sure the exception is being thrown and thus the reason i'm seeing the ExceptionPolicyImpl error. I also will be including the copied text of that error. This is also why (below) i'm asking for some way to maybe write to a file the execution path that the application takes on its way to this exception so that i can confirm exactly where the problem is.

My questions are:
 
-How do I verify that I'm correctly connected to my MSSQL 2008 db that is now located on the goDaddy server? (maybe some kind of logging that I can write out to a local file?)

-Is there some examples of just some general debugging that i can, once again, write to a local file, as i try to start browse to my site.

-Ultimately, how do I solve this ExceptionPolicyImpl issue

My tables and data are loaded to my database on goDaddy. I'm not sure if it is a config file issue, a database connection issue (which I doubt) or if I need to change my code (maybe remove the call to my custom exception handler class) please help...
the lines mentioned in the error (included in the attached file: "ExceptionPolicyImpl" are on a user control that fires up when the default page is hit. the entire routine is here: (just a few lines)

    public void BindData()
    {
        StudentListBaseList studentList;

        studentList = StudentListProcessor.GetAllSignedInStudents("", SearchArgs);

        BindData(studentList);

    }

//The StudentListProcessor class basically passes on the //parameter information and winds up in finally calling a //routine that I have copied and pasted below. In this routine
//there is a try catch, where within the catch is the call to //my custom exception handler class (file included) and this 
//is where i'm pretty sure my problem is but i just don't know
//how to solve it.

        public static StudentListBaseList GetStudentListBase(string studentID, StudentListSearchArgs searchArgs, bool countOnly)
        {
            StudentListBaseList studentListBaseList = new StudentListBaseList();
            StudentListBase studentListBase = new StudentListBase();
            STTDatabase db = new STTDatabase("SQLExpress");
            SqlCommand command = new SqlCommand();

            try
            {
                if (countOnly)
                    command.CommandText += StudentCommandList.GetSignedInStudents_Count;
                else
                    command.CommandText += StudentCommandList.GetSignedInStudents;

                using (SqlDataReader dr = db.ExecuteReader(command))
                {
                    while (dr.Read())
                    {
                        studentListBase = new StudentListBase();
                        studentListBase.AthleteUid = dr["StudentId"].ToString();
                        studentListBase.AthleteName = dr["AthleteName"].ToString();
                        studentListBase.TimeIn = (DateTime)dr["TimeIn"];
                        studentListBase.TeamName = dr["SportTeamName"].ToString();
                        studentListBase.LastName = dr["AthleteLastName"].ToString();
                        studentListBase.FirstName = dr["AthleteFirstName"].ToString();
                        studentListBaseList.Add(studentListBase);
                    }
                    dr.Close();
                }

            }
            catch (Exception ex)
            {
                
//PRETTY SURE THE PROBLEM IS HERE
//WOULD LIKE TO ADD SOME LOGGING TO CONFIRM
//THAT IT IS HAPPENING HERE                STTExceptionHandler.HandleGeneralException(ex);
            }

            return studentListBaseList;
        }

also, just for information, the line above that reads:

"StudentCommandList.GetSignedInStudents;" 

basically executes and returns an sql command. (see below)

        public static string GetSignedInStudents
        {
            get
            {
                string sql = "";
                sql =
                        @"SELECT *
                                    FROM 
                                        utinout uio 
                                            LEFT OUTER JOIN
                                        utathleteinfo uai ON uio.StudentID = uai.AthleteUid
                                            INNER JOIN 
                                        utsportteam ust ON uai.sportuid = ust.utsportteamuid
                                    WHERE
                                        uio.TimeOut IS NULL";
                return sql;
            }
        }

Open in new window

exceptionClass.txt
myWebConfigOnGoDaddy.txt
ExceptionPolicyImplError.txt
0
Comment
Question by:mikesExpertExchange
  • 2
3 Comments
 
LVL 1

Author Comment

by:mikesExpertExchange
ID: 36516406
the bind method (above) is in the code behind for a user control that is on my default page. so it is fired off (executed) as soon as the user tries to hit the default page...
0
 
LVL 15

Accepted Solution

by:
pateljitu earned 500 total points
ID: 36523415
Please try these suggestion in "class STTExceptionHandler"

 public static bool HandleGeneralException(Exception ex)
        {
            AppendKey(ex, "ExceptionTypeId", (int)ExceptionTypeList.General);
            bool retBoolean = ExceptionPolicy.HandleException(ex, "GeneralException");
            if (retBoolean)
               throw;
        }

OR
 public static bool HandleGeneralException(Exception ex)
        {
            AppendKey(ex, "ExceptionTypeId", (int)ExceptionTypeList.General);
           
           Exception e;
          return ExceptionPolicy.HandleException(ex, "GeneralException", out e);
        }
0
 
LVL 1

Author Closing Comment

by:mikesExpertExchange
ID: 36669296
thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Winforms -- Capture CTRL+SHIFT+D at the form not working? 3 25
Obtaining data on ASP 8 28
linq, c# 8 22
Google Maps with Webforms 1 11
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question