Hi guys can you help me on this one, I'm only having this error when my site is deployed on IIS
Source Error:
Stack Trace:
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:
|
HERE IS MY PAGE_LOAD CODE:
- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- Dim DomainUser As String = System.Web.HttpContext.Current.User.Identity.Name.Replace("\", "/")
- 'Dim DomainUser As String = System.Security.Principal.WindowsIdentity.GetCurrent.Name.Replace("\", "/")
- Dim sUser() As String = Split(DomainUser, "/")
- Dim sUserId As String = ""
- 'Dim sDomain As String = sUser(0)
- If DomainUser <> "" Then
- sUserId = sUser(1)
- End If
- pubUser = sUserId
- 'pubUser = "ricerrae"
- userID.Text = pubUser
- 'UpdateUserStatusTemp()
- GetEmpInfo()
- LastLeave()
- PopulateHolidays(Val(lblMonth.Text))
- If Not Page.IsPostBack Then
- If dtEmp.Rows.Count > 0 Then
- employeeID = dtEmp.Rows(0)("EmpID")
- employeeName = dtEmp.Rows(0)("EmpName")
- employeeSupervisor = dtEmp.Rows(0)("MngrName")
- employeeDepartment = dtEmp.Rows(0)("LOBDesc")
- employeeLocation = dtEmp.Rows(0)("Location")
- employeeDoj = CDate(dtEmp.Rows(0)("DateJoined")).ToString("MMMM dd, yyyy")
- employeeApprover = dtEmp.Rows(0)("MngrName")
- empID.Text = employeeID
- empName.Text = employeeName
- supervisor.Text = employeeSupervisor
- dept.Text = employeeDepartment
- doj.Text = employeeDoj
- approver.Text = employeeApprover
- End If
- PopulateHolidays(Today.Month)
- If dtHoliday_reg.Rows.Count > 0 Then
- lblMonth.Text = Today.Month
- lblLeaveBal.Text = IIf(IsDBNull(dtEmp.Rows(0)("LeaveBal")), "00", dtEmp.Rows(0)("leaveBal"))
- End If
- If dtChkLeave.Rows.Count > 0 Then
- lblLastLeave.Text = dtChkLeave.Rows(0)("LastLeave")
- End If
- End If
- End Sub
PS: as you would notice, my code is in vb and i know this is a c# forum, so ill just convert my code or your answer. THANKS
Joem OrculloPosted May 4, 2016, 5:11 AM
Ravi PatelPosted May 4, 2016, 1:12 AM
Pradeep SahooPosted May 3, 2016, 11:10 PM