0
votes

I have an .aspx file with the .aspx.vb code behind page that is working just fine in Visual Studio 2010 but not in production.

Most disturbing is that the Page_Load (non PostBack) is only working with some of the lines. Here is the code from Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    Dim Shortages_Filter As String = ""
    If Not IsPostBack Then

  ' The next four lines work in localhost, but don't work in production
        Alert_Label.Text = "Not Postback"
        Shortages_Filter += "(num_Short_Qty > 0) "

        ddl_Shortages_List.Items.Insert(0, New ListItem("Shortages List Filter", "1=1"))
        ddl_Shortages_List.Items.Insert(1, New ListItem("Show Shortages List", Shortages_Filter))

  ' The next six lines work in both environments
        Pref_DataSource.FilterParameters.Add("User_Name_Param", Replace(System.Web.HttpContext.Current.Request.ServerVariables("LOGON_USER"), "BOUMATIC\", ""))
        Pref_DataSource.FilterParameters.Add("Current_Page_Param", Me.Page.Title)

        Common_Functions.Add_Date_Filters(ddl_Order_Date, "dat_Order_Date", "Order Date")
        Common_Functions.Add_Date_Filters(ddl_Request_Date, "dat_Request_Date", "Request Date")

        Order_Search.Text = Request.QueryString("Order_Num")
        Part_Num_Search.Text = Request.QueryString("Part_Num")

    Else
End If

Any thoughts?
Rob

1
Sounds like an older DLL version is in production. Make sure to compile completely (Ctrl + Shift + B) and upload again, and while doing so, pay attention if the bin folder's files are the same size...Hanlet Escaño
How was the code deployed to PRODUCTION? Did a new DLL get deployed or just the aspx.vb file? Is the same version of .NET Framework being used in the application pool on PRODUCTION?Karl Anderson
Genius!!! I'm a complete hack: I try, fail, and try again until it works... I've had no training here. I re-compiled (Ctrl + Shift + B). Thanks, Hanlet! Then, I copied all of the project's files and folders to my wwwroot home in the production server (thanks, Karl). I'm up and running!AKDad
@AKDad I will post my comment as an answer so that you can accept it (if it helped) :P.Hanlet Escaño

1 Answers

1
votes

Sounds like an older DLL version is in production. Make sure to compile completely (full build).

Hit Ctrl + Shift + B from Visual Studio, and upload again. While doing so, pay attention if the bin folder's files are the same size.