locked
Uh oh, this is not good... RRS feed

  • Question

  • User120353699 posted

    I recently was forced into moving up the chain from having a web application targeting framework 2.0 to framework 3.5--my pc's hd crashed and i was presented by my company's desktop IT folks with Win7 instead of XP Pro--I was running reportviewer 2005 reports and couldn't edit them so I just took the plunge. 

    My previous environment was vwd2005 and am now using full blown vs2010 (as per Win7).  The web site is running on 2 load balanced IIS 6 machines that use sql server 2000 for sessionState.  I'm now seeing why it is a bad idea to be forced into such a situation without much ability to prepare for the fallout.  Prior to migration to 3.5 the web application ran for the most part without problems--a necessary tweak here and there.  Since then, I've gotten alot of errors on pages/controls that never had a problem previously and I am entirely at a loss as to what is going on with this application. That said, on to the problem.

    I have several pages that are throwing errors.  The errors do not always occurr and they seem to occurr at random times of day--and seemingly regardless of user load.  When the error on a particular page does occurr, a user experiences the error, use the back button and will retry as many as 3 times before the page runs as intended as if nothing was wrong.  To get a better idea of what was going on, it became necessary re-code my global.asax application_error in order to capture additional information so that I could get a better glimpse of what is going on with the errors.  Armed with this additional information, I attempt to reproduce the error by going into production site--and can't reproduce it.  I believe that is due to the randomness of the error occurrence. 

    Now for a bit more specific information on the errors.  On one page it may be a reportviewer throwing an error and on another page a dropdownlist and on yet another page a button click, each individual page throws an error with the same control.  But like I said previously and regardless of which control throws the error, the error occurs 2-3 times then the page runs fine.  Here are some of the errors:

     

    (a button):

     Query String POST: __EVENTTARGET=CreateDocsButton&__EVENTARGUMENT=&__

     The following error occurred: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at DBPages_ServiceRequest_SRScheduling.LinkButton_Click(Object sender, EventArgs e)
       at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)

     

    (a button on another page):

     Query String POST: __EVENTTARGET=ExportLink&__EVENTARGUMENT=&__

     The following error occurred: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at DBPages_ServiceRequest_OrderLists.Export_Click(Object sender, EventArgs e)
       at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e)
       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument)

    (a report viewer):

    Query String GET: OpType=SessionKeepAlive&ControlID=961054451a1f4f58bdd5f37d625ea8a1&Mode=true

     The following error occurred: Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired or could not be found
       at Microsoft.Reporting.WebForms.ViewerDataOperation..ctor()
       at Microsoft.Reporting.WebForms.HttpHandler.GetHandler(String operationType)

    (another report viewer):

     Query String POST:

     The following error occurred: Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired or could not be found
       at Microsoft.Reporting.WebForms.ViewerDataOperation..ctor()
       at Microsoft.Reporting.WebForms.HttpHandler.GetHandler(String operationType)

    (a drop down list):

     Query String POST: __EVENTTARGET=frmSR%24EditButton&__EVENTARGUMENT=&__LASTFOCUS=&__

     The following error occurred: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentOutOfRangeException: 'ddlActivity' has a SelectedValue which is invalid because it does not exist in the list of items.
    Parameter name: value
       at System.Web.UI.WebControls.ListControl.PerformDataBinding(IEnumerable dataSource)
       at System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e)



    (a gridview):

    Query String POST: __EVENTTARGET=gvContacts%24ctl04%24lbUpdate&__EVENTARGUMENT=&__LASTFOCUS=&__

     The following error occurred: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
       at System.Collections.ArrayList.get_Item(Int32 index)
       at System.Web.UI.WebControls.GridViewRowCollection.get_Item(Int32 index)
       at DBPages_Contacts.UpdateContact_Click(Object sender, EventArgs e)

    I don't know what else to provide; I think code would be a little much right now considering the scope of the problem, not to mention that the problem doesn't occur every time the page is used.  If anyone has any idea of where I would begin to look for the problem, it would be appreciated.  While my users can eventually complete their tasks and run the page, it would be a lot more helpful to them if they didn't have to try several times first.  I'm not even sure what questions to ask my IIS admin guy to look for in his logs or which logs to look at.

     

    Thanks,

    ejo

    Friday, October 15, 2010 2:33 PM

All replies

  • User-364289655 posted

    It would be really helpful if you posted your code along with those errors

    Friday, October 15, 2010 4:50 PM
  • User120353699 posted

    I can appreciate that and I did comment that I didn't due to a lot of code considering the scope of the problem; here it is in the order of the original post.  Thanks for any insight you might be able to provide, PNasser!

    (a button):

        Protected Sub CreateDocs_Click(ByVal sender As Object, ByVal e As EventArgs)
            Dim ComplexSr As String
            Dim Connection As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
            Dim NewConnection As SqlConnection = New SqlConnection(Connection)
    
            Dim InsertQuery As String = "INSERT INTO [ECCScheduling] " & _
                                            "([SR_ID], [Install_Plan], [Timerequired], [fTime], [bTime], [UAT], [backout], [SpecialNotes], [ComplexChange]) " & _
                                            "VALUES " & _
                                            "(@SRID, @Install_Plan, @Timerequired, @fTime, @bTime, @UAT, @backout, @SpecialNotes, @ComplexChange)"
            Dim Insert As New SqlCommand(InsertQuery, NewConnection)
    
            If SrRow.Item("SrActivity_ID") = 2 Then
                ComplexSr = "No"
            Else
                ComplexSr = "Yes"
            End If
    
            Insert.Parameters.AddWithValue("SRID", SrRow.Item("ID"))
            Insert.Parameters.AddWithValue("Install_Plan", SrRow.Item("Install_Plan"))
            Insert.Parameters.AddWithValue("Timerequired", CType(frmScheduling.FindControl("txtTimerequired"), TextBox).Text)
            Insert.Parameters.AddWithValue("fTime", CType(frmScheduling.FindControl("txtfTime"), TextBox).Text)
            Insert.Parameters.AddWithValue("bTime", CType(frmScheduling.FindControl("txtbTime"), TextBox).Text)
            Insert.Parameters.AddWithValue("UAT", CType(frmScheduling.FindControl("UATCheckBox"), CheckBox).Checked)
            Insert.Parameters.AddWithValue("backout", CType(frmScheduling.FindControl("backoutCheckBox"), CheckBox).Checked)
            Insert.Parameters.AddWithValue("SpecialNotes", CType(frmScheduling.FindControl("txtSpecialNotes"), TextBox).Text)
            Insert.Parameters.AddWithValue("ComplexChange", ComplexSr)
    
            NewConnection.Open()
            Insert.ExecuteNonQuery()
            NewConnection.Close()
    
            Response.Redirect("SiteDoc.aspx?SiteID=" & SrRow.Item("Site_ID") & "&SrID=" & SrRow.Item("ID"))
    
        End Sub


    (a button on another page):

        Protected Sub Export_Click(ByVal sender As Object, ByVal e As EventArgs)
            'TODO Check out using SQL Server's FOR XML Clause to replace this garbage
    
            'we need to export the file to an excel document; 
            'because we can't connect directly to ms office library references, 
            'we have to build an xml file and use a transform to output and
            'that will let us fudge XL into opening the doc
            Dim Connection As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
            Dim NewConn As SqlConnection = New SqlConnection(Connection)
            'Dim SrQuery As String = "Select SiteData.*, SRData.* From SiteData Join SRData On SiteData.SiteID = SRData.Site_ID Where SRID = " & SRID
            Dim SrQuery As String = "Select SiteCode, Site, Country, Address1, Address2, Address3, City, State, Country, Zip, " & _
                                    "SitePOC, SitePOCTel, AltPOC, AltPOCTel, " & _
                                    "SR, LinkedSiteCode, TAP, TAPPhone, Complexity, InternationalVendorManagement " & _
                                    "From SiteData Join SRData On SiteData.SiteID = SRData.Site_ID Where SRID = " & SRID
            Dim GetSiteSr As New SqlCommand(SrQuery, NewConn)
            Dim Country, AltPoc, AltPocTel, SR As String
            Dim xOL As XmlDocument = New XmlDocument()
            Dim Attribute As XmlAttribute
            Dim root As XmlElement
            Dim pi As XmlProcessingInstruction
            Dim City, LaborN, LaborO As String
    
            xOL.AppendChild(xOL.CreateXmlDeclaration("1.0", "utf-8", Nothing))
            xOL.AppendChild(xOL.CreateElement("OrderList"))
            pi = xOL.CreateProcessingInstruction("xml-stylesheet", "type='text/xsl' href='../Documentation/XML/OL.xsl'")
            root = xOL.Item("OrderList")
            xOL.InsertBefore(pi, root)
    
            NewConn.Open()
            'get the site information
            Dim reader As SqlDataReader = GetSiteSr.ExecuteReader()
            reader.Read()
            Attribute = xOL.CreateAttribute("Ver")
            Attribute.Value = Ver
            root.Attributes.Append(Attribute)
            Attribute = xOL.CreateAttribute("VerDate")
            Attribute.Value = FormatDateTime(Now, DateFormat.ShortDate)
            root.Attributes.Append(Attribute)
            Attribute = xOL.CreateAttribute("SiteCode")
            Attribute.Value = reader("SiteCode")
            root.Attributes.Append(Attribute)
            Attribute = xOL.CreateAttribute("Site")
            Attribute.Value = reader("Site")
            root.Attributes.Append(Attribute)
    
            Attribute = xOL.CreateAttribute("Address1")
            'Build 1st address line
            If Not IsDBNull(reader("Address1")) Then
                Attribute.Value = reader("Address1")
            Else
                Attribute.Value = ""
            End If
            root.Attributes.Append(Attribute)
    
            'Build 2nd Address Line
            Attribute = xOL.CreateAttribute("Address2Address3")
            If Not IsDBNull(reader("Address2")) Then
                If Not IsDBNull(reader("Address3")) Then
                    Attribute.Value = reader("Address2") & ", " & reader("Address3")
                Else
                    Attribute.Value = reader("Address2")
                End If
            Else
                If Not IsDBNull(reader("Address3")) Then
                    Attribute.Value = reader("Address3")
                Else
                    Attribute.Value = ""
                End If
            End If
            root.Attributes.Append(Attribute)
    
            'Build City, State  ZIP
            Attribute = xOL.CreateAttribute("CityStateZip")
    
            If Not IsDBNull(reader("City")) Then
                City = reader("City")
            Else
                City = ""
            End If
    
            If Not IsDBNull(reader("State")) Then
                If Not IsDBNull(reader("ZIP")) Then
                    Attribute.Value = City & ", " & reader("State") & "  " & reader("ZIP")
                Else
                    Attribute.Value = City & ", " & reader("State")
                End If
            Else
                If Not IsDBNull(reader("ZIP")) Then
                    Attribute.Value = City & reader("ZIP")
                Else
                    Attribute.Value = City
                End If
            End If
            root.Attributes.Append(Attribute)
    
            Attribute = xOL.CreateAttribute("Country")
            If Not IsDBNull(reader("Country")) Then
                Attribute.Value = reader("Country")
                Country = reader("Country")
            Else
                Attribute.Value = ""
                Country = ""
            End If
            root.Attributes.Append(Attribute)
    
            Attribute = xOL.CreateAttribute("SitePOC")
            If Not IsDBNull(reader("SitePOC")) Then
                Attribute.Value = reader("SitePOC")
            Else
                Attribute.Value = ""
            End If
            root.Attributes.Append(Attribute)
    
            Attribute = xOL.CreateAttribute("SitePOCTel")
            If Not IsDBNull(reader("SitePOCTel")) Then
                Attribute.Value = reader("SitePOCTel")
            Else
                Attribute.Value = ""
            End If
            root.Attributes.Append(Attribute)
    
            'Alt POC is used later when we get the SR values; 
            'if Alt POC is empty, we will use the TAP
            If Not IsDBNull(reader("AltPOC")) Then
                AltPoc = reader("AltPOC")
            Else
                AltPoc = ""
            End If
    
            If Not IsDBNull(reader("AltPOCTel")) Then
                AltPocTel = reader("AltPOCTel")
            Else
                AltPocTel = ""
            End If
    
            Attribute = xOL.CreateAttribute("LinkedSiteCode")
            If Not IsDBNull(reader("LinkedSiteCode")) Then
                Attribute.Value = reader("LinkedSiteCode")
            Else
                Attribute.Value = ""
            End If
            root.Attributes.Append(Attribute)
    
            Attribute = xOL.CreateAttribute("AltPOC")
            If AltPoc.Length <> 0 Then
                Attribute.Value = AltPoc
            Else
                Attribute.Value = reader("TAP")
            End If
            root.Attributes.Append(Attribute)
    
            Attribute = xOL.CreateAttribute("AltPOCTel")
            If AltPocTel.Length <> 0 AndAlso AltPoc.Length <> 0 Then
                Attribute.Value = AltPocTel
            Else
                Attribute.Value = reader("TAPPhone")
            End If
            root.Attributes.Append(Attribute)
    
            'get the sr information
            Attribute = xOL.CreateAttribute("SR")
            Attribute.Value = reader("SR")
            SR = reader("SR")
            root.Attributes.Append(Attribute)
            Attribute = xOL.CreateAttribute("Complexity")
            If Not IsDBNull(reader("Complexity")) Then
                Attribute.Value = reader("Complexity")
            Else
                Attribute.Value = ""
            End If
            root.Attributes.Append(Attribute)
            Attribute = xOL.CreateAttribute("InternationalVendorManagement")
            If Not IsDBNull(reader("InternationalVendorManagement")) Then
                Attribute.Value = reader("InternationalVendorManagement")
            Else
                Attribute.Value = ""
            End If
            root.Attributes.Append(Attribute)
            reader.Close()
    
            'get the labor rates from the country table
            Dim CountryQuery As String = "Select * From SiteCountry Where Country = '" & Country & "'"
            Dim GetCountry As New SqlCommand(CountryQuery, NewConn)
    
            reader = GetCountry.ExecuteReader()
            reader.Read()
            If Not reader("LaborN").ToString.Length = 0 Then
                LaborN = reader("LaborN")
            Else
                LaborN = ""
            End If
            Attribute = xOL.CreateAttribute("LaborN")
            Attribute.Value = Replace(CType("$" & LaborN, String), ".0000", ".00")
            root.Attributes.Append(Attribute)
    
            If Not reader("LaborO").ToString.Length = 0 Then
                LaborO = reader("LaborO")
            Else
                LaborO = ""
            End If
            Attribute = xOL.CreateAttribute("LaborO")
            Attribute.Value = Replace(CType("$" & LaborO, String), ".0000", ".00")
            root.Attributes.Append(Attribute)
            reader.Close()
    
            'Get OBS Staging Contacts
            Dim obsPrimQuery As String = "Select ContactName, Office From Contacts Where ContactRole_ID = 19 and Active = 1"
            Dim GetObsPrim As New SqlCommand(obsPrimQuery, NewConn)
    
            reader = GetObsPrim.ExecuteReader()
            reader.Read()
            Attribute = xOL.CreateAttribute("ObsPrimary")
            Attribute.Value = reader("ContactName")
            root.Attributes.Append(Attribute)
            Attribute = xOL.CreateAttribute("ObsPrimaryTel")
            Attribute.Value = reader("Office")
            root.Attributes.Append(Attribute)
            reader.Close()
    
            Dim obsSecQuery As String = "Select ContactName, Office From Contacts Where ContactRole_ID = 23 and Active = 1"
            Dim GetObsSec As New SqlCommand(obsSecQuery, NewConn)
    
            reader = GetObsSec.ExecuteReader()
            reader.Read()
            Attribute = xOL.CreateAttribute("ObsSecondary")
            Attribute.Value = reader("ContactName")
            root.Attributes.Append(Attribute)
            Attribute = xOL.CreateAttribute("ObsSecondaryTel")
            Attribute.Value = reader("Office")
            root.Attributes.Append(Attribute)
            reader.Close()
    
    
            NewConn.Close()
    
            'get the name of the person creating the order list
            Dim ThisUser As CSP.User = System.Web.HttpContext.Current.User
            Attribute = xOL.CreateAttribute("OLCreator")
            Attribute.Value = ThisUser.LastName() & ", " & ThisUser.FirstName()
            root.Attributes.Append(Attribute)
    
            'add the order list equipment/services from the gridview datatable
            Dim OLItem, OLItemList As XmlElement
            For Each row As DataRow In dsOL.Tables(0).Rows()
                OLItem = xOL.CreateElement("OLItem")
                OLItemList = xOL.CreateElement("Stock")
                OLItemList.InnerText = row.Item("Stock")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("Activity")
                OLItemList.InnerText = row.Item("Activity")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("EquipOwned")
                OLItemList.InnerText = row.Item("EquipOwned")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("Manufacturer")
                OLItemList.InnerText = row.Item("Manufacturer")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("EHSN")
                OLItemList.InnerText = row.Item("EHSN")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("Qty")
                OLItemList.InnerText = row.Item("Qty")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("PartNumber")
                OLItemList.InnerText = row.Item("PartNumber")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("Description")
                OLItemList.InnerText = row.Item("Description")
                OLItem.AppendChild(OLItemList)
                xOL.DocumentElement.AppendChild(OLItem)
            Next
    
            Dim fpath As String = GetDirectoryPath(SiteCode, "OL", SR)
            fpath = IIf(OLType = 1, SR & "V" & Ver & ".xls", "SR" & SR & "V" & Ver & ".xls")
    
            'transform the xml doc to excel 
            Dim MyXsl As New Xsl.XslCompiledTransform()
            Dim oStream As MemoryStream = New MemoryStream()
            Dim xOLWriter As XmlWriter = XmlWriter.Create(oStream)
            Dim strURI As String = Server.MapPath("../Documentation/XML/OL.xsl")
    
            ExportLink.Visible = False
    
            MyXsl.Load(strURI)
            MyXsl.Transform(xOL.CreateNavigator(), Nothing, xOLWriter)
    
            Response.Clear()
            Response.Buffer = True
            Response.ContentType = "application/vnd.ms-excel"
            Response.Charset = ""
            Response.AddHeader("content-disposition", "attachment; filename=" & fpath)
            Response.BinaryWrite(oStream.ToArray())
            Response.End()
    
        End Sub
    
    


    (a report viewer):

     

    <script runat="server">
    
        Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
            ClientScript.RegisterHiddenField("__EVENTTARGET", "Button1")
        End Sub
    
        Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
            ReportViewer1.LocalReport.ReportPath = Server.MapPath("PendingEngineering.rdlc")
            ReportViewer1.LocalReport.DataSources.Add(New ReportDataSource("Reports_EngineeringWorkLists","ObjectDataSource1" ))              
        End Sub
    </script>

     

    (another report viewer--this one has no code, only markup):

     

    <%@ Page Language="VB" %>
    
    <%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <script runat="server">
    
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Circuit Provisioning</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div style="height:800px; width:auto">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" 
                Font-Size="8pt" InteractiveDeviceInfos="(Collection)" 
                ShowPrintButton="false" ShowRefreshButton="false"
                WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" 
                Height="100%" Width="100%" >
                <LocalReport ReportPath="Reports\WorkLists\CircuitProvisioning.rdlc">
                    <DataSources>
                        <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" 
                            Name="Reports_SiteAndSr" />
                    </DataSources>
                </LocalReport>
            </rsweb:ReportViewer>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
                SelectMethod="GetCircuitProvisioning" TypeName="ReportsTableAdapters.SiteAndSrTableAdapter">
            </asp:ObjectDataSource>        
        </div>
        </form>
    </body>
    </html>
    

     

    (a drop down list):

     

        Protected Sub frmSR_ModeChanged(ByVal sender As Object, ByVal e As EventArgs) Handles frmSR.ModeChanged
            'Ensures correct lists for drop down values
            'Insert records should have only the currently active values
            'Edit records should have access to all values, otherwise values that were current
            '   when the record was created but aren't now will cause an error
            'TODO Set drop downlists to only current values and use a function to add a 
            'TODO non-current value at runtime as the default list item so that if a change is 
            'TODO necessary, only a current item can be selected
            Dim m As FormViewMode = frmSR.CurrentMode
    
            If m <> 0 Then
                sdsDiversityType.SelectCommand = "SELECT DiversityType, ID FROM ADetailsList WHERE Len(DiversityType)<>0"
                sdsTTMSLAReason.SelectCommand = "SELECT SLAReasonCode, ID FROM ADetailsList WHERE SLAReasonType=1"
                sdsServiceQuoteReason.SelectCommand = "SELECT SLAReasonCode, ID FROM ADetailsList WHERE SLAReasonType=2"
                sdsSiteRelocationReason.SelectCommand = "SELECT SLAReasonCode, ID FROM ADetailsList WHERE SLAReasonType=3"
                sdsLinkedSite.SelectCommand = "SELECT ID, SiteCode FROM Site Order By SiteCode DESC"
                sdsVendorManagement.SelectCommand = "SELECT InternationalVendorManagement, ID FROM ADetailsList WHERE Len(InternationalVendorManagement)<>0"
                sdsIncrementalTime.SelectCommand = "SELECT IncrementalTime FROM ADetailsList WHERE Len(IncrementalTime)<>0"
                If m = 1 Then
                    If ParentSrID <> 0 Then
                        sdsActivity.SelectCommand = "SELECT Activity, ID FROM ADetailsList WHERE ID IN (39, 40, 42)"
                    Else
                        sdsActivity.SelectCommand = "SELECT Activity, ID FROM ADetailsList WHERE (Len(Activity)<>0) AND ID NOT IN (39, 40, 42)"
                    End If
                    sdsActivity.DataBind()
                    sdsParentSR.SelectCommand = "select ID, SR As ParentSR from sr where sractivity_id not in (39,40,42) and site_id = @SiteID order by sr"
                    sdsProject.SelectCommand = "SELECT Project, ID FROM ADetailsList WHERE (Len(Project)<>0)"
                    sdsProjMan.SelectCommand = "SELECT ContactName AS Name, ID FROM Contacts WHERE (ContactRole_ID=4) ORDER BY ContactName"
                    sdsTAP.SelectCommand = "SELECT ContactName AS Name, ID FROM Contacts WHERE (ContactRole_ID=6) ORDER BY ContactName"
                    sdsEngineer.SelectCommand = "SELECT ContactName AS Name, ID FROM Contacts WHERE (ContactRole_ID=2) ORDER BY ContactName"
                    sdsInstallEngineer.SelectCommand = "SELECT ContactName AS Name, ID FROM Contacts WHERE ((ContactRole_ID=7 Or ContactRole_ID=2)) ORDER BY ContactName"
                ElseIf m = 2 Then
                    sdsParentSR.SelectCommand = "select id, sr As ParentSR from sr where cancelleddate is null and billeddate is null and sractivity_id not in (39,40,42) and site_id = @SiteID order by sr"
                    sdsProject.SelectCommand = "SELECT Project, ID FROM ADetailsList WHERE (Len(Project)<>0 AND ActiveProj=1)"
                    sdsProjMan.SelectCommand = "SELECT ContactName AS Name, ID FROM Contacts WHERE (ContactRole_ID=4 AND Active=1) ORDER BY ContactName"
                    sdsTAP.SelectCommand = "SELECT ContactName AS Name, ID FROM Contacts WHERE (Active=1 AND ContactRole_ID=6) ORDER BY ContactName"
                    sdsEngineer.SelectCommand = "SELECT ContactName AS Name, ID FROM Contacts WHERE (ContactRole_ID=2 AND Active=1) ORDER BY ContactName"
                    sdsInstallEngineer.SelectCommand = "SELECT ContactName AS Name, ID FROM Contacts WHERE ((ContactRole_ID=7 Or ContactRole_ID=2) And (Active=1)) ORDER BY ContactName"
                End If
            End If
        End Sub


     

    (a gridview):

     

        Protected Sub UpdateContact_Click(ByVal sender As Object, ByVal e As EventArgs)
    
            Dim i As Integer = gvContacts.Rows(gvContacts.EditIndex).DataItemIndex
            Dim Active As Boolean = CType(gvContacts.Rows(i).FindControl("cbActive"), CheckBox).Checked
            Dim FName As String = CType(gvContacts.Rows(i).FindControl("txtFName"), TextBox).Text
            Dim LName As String = CType(gvContacts.Rows(i).FindControl("txtLName"), TextBox).Text
            Dim Office As String = CType(gvContacts.Rows(i).FindControl("txtOffice"), TextBox).Text
            Dim VirtualOffice As String = CType(gvContacts.Rows(i).FindControl("txtVirtualOffice"), TextBox).Text
            Dim Pager As String = CType(gvContacts.Rows(i).FindControl("txtPager"), TextBox).Text
            Dim FAX As String = CType(gvContacts.Rows(i).FindControl("txtFAX"), TextBox).Text
            Dim Home As String = CType(gvContacts.Rows(i).FindControl("txtHome"), TextBox).Text
            Dim Cellular As String = CType(gvContacts.Rows(i).FindControl("txtCellular"), TextBox).Text
            Dim Email As String = CType(gvContacts.Rows(i).FindControl("txtEmail"), TextBox).Text
            Dim ContactRole As Integer = CType(gvContacts.Rows(i).FindControl("ddlRole"), DropDownList).SelectedValue
            Dim ContactID As Integer = CType(gvContacts.Rows(i).FindControl("hfContactID"), HiddenField).Value
    
            'validated() tells us we have all our required info in the correct manner, if not validated()
            ' the function will display a label in red font
            If validated(FName, LName, Office, Email, ContactRole) Then
                Dim Connection As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
                Dim NewConn As SqlConnection = New SqlConnection(Connection)
                Dim sql As String = "UPDATE Contacts " & _
                                    "SET Active=@Active, ContactName=@ContactName, Office=@Office, " & _
                                    "VirtualOffice=@VirtualOffice, Pager=@Pager, FAX=@FAX, Home=@Home, " & _
                                    "Cellular=@Cellular, Email=@Email, ContactRole_ID=@ContactRole " & _
                                    "WHERE ID = @ID"
                Dim AddContact As New SqlCommand(sql, NewConn)
    
                AddContact.Parameters.AddWithValue("ID", ContactID)
                AddContact.Parameters.AddWithValue("Active", Active)
                AddContact.Parameters.AddWithValue("ContactName", LName & ", " & FName)
                AddContact.Parameters.AddWithValue("Office", Office)
                AddContact.Parameters.AddWithValue("VirtualOffice", VirtualOffice)
                AddContact.Parameters.AddWithValue("Pager", Pager)
                AddContact.Parameters.AddWithValue("FAX", FAX)
                AddContact.Parameters.AddWithValue("Home", Home)
                AddContact.Parameters.AddWithValue("Cellular", Cellular)
                AddContact.Parameters.AddWithValue("Email", Email)
                AddContact.Parameters.AddWithValue("ContactRole", ContactRole)
    
                NewConn.Open()
                AddContact.ExecuteNonQuery()
                NewConn.Close()
                gvContacts.EditIndex = -1
                gvContacts.DataBind()
            Else
                Exit Sub
            End If
        End Sub


     

    Friday, October 15, 2010 5:28 PM
  • User120353699 posted

    I could really use some assistance with this.  If there is anything else that someone would like to see--markup, whatever--I'll be more than happy to provide it.  The 1 common denominator for all these problems is upgrading from framework 2.0 to 3.5, but I have yet to run accross anything that even broaches this kind of problem.  The one common symptom is that it takes several attempts to run the affected pages before they execute.

     

    It isn't site wide, as there are many pages that run without any issue.  This is really causing some problems for users on a site that prior to upgrading to 3.5 had no issues.

     

    thanks and best regards,

     

    ejo

    Wednesday, October 20, 2010 10:26 AM
  • User-364289655 posted

    The thing that is throwing me off is that after several tries it just works. Could you have old compiled code on the server? Have you tried to clean it all out and rebuild?

    Friday, October 22, 2010 3:11 PM
  • User120353699 posted

    So I followed your suggestion.  I cleared out everyting in my production site, rebuilt the whole thing and sent it back up to production.  That was about a week ago and I've been sitting on it to see what kinds of errors would be sent back.  Since then, I've seen a reduction in the number of errors, but am still getting some of them.

     

    For instance, the 2 reportviewers that are having difficulty with the expiring sessions.  This I find odd because I have about 30 reports my users run every couple days if not daily, but only 2 reports are having trouble.  The dropdownlist is also continuing to have problems.

     

    You wouldn't have any suggestions for a better means of tracing the problem, would you?  Particularly with the expiring sessions, do you know of an IIS log that would be helpful?

     

    One thing I have noticed, while going back through my web.config checking for problems there, I use the configsource attribute in a few areas of my web.config; i have this line:

    <compilation configSource="Config\compliation.config" />

    Then in my compilation.config file:

    <?xml version="1.0" encoding="utf-8" ?>
    	<compilation debug="true" strict="true" explicit="true">
    	   <assemblies>
    		<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    		<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    		<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    		<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
    		<add assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    		<add assembly="Microsoft.ReportViewer.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    		<add assembly="Microsoft.Build.Framework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    		<add assembly="System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    	   </assemblies>
    	   <buildProviders>
    		<add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    	   </buildProviders>
    	</compilation>


     

    Right at the where the compilation section of the config starts, I have a warning that the compilation element is not declared.  Since this section deals with my reportviewers, I was wondering if the warning might indicate where the problem is with those?

     

    Anyway, thanks for your continued assistance, PNassser!

     

    regards,

     

    ejo

     

    Monday, November 1, 2010 11:38 AM
  • User-311898710 posted

    Hi

    Have tried updating your Report Viewer component for the 2010 version?

    you can download it from:

    http://www.microsoft.com/downloads/es-es/confirmation.aspx?familyId=a941c6b2-64dd-4d03-9ca7-4017a0d164fd&displayLang=es

     

    Friday, November 5, 2010 1:27 AM
  • User120353699 posted

    Hi

    Have tried updating your Report Viewer component for the 2010 version?

    you can download it from:

    http://www.microsoft.com/downloads/es-es/confirmation.aspx?familyId=a941c6b2-64dd-4d03-9ca7-4017a0d164fd&displayLang=es

     

     

     

    I'm using the 2010 version of report viewer, as shown in the assemblies lines of the web.config.  In fact, that is when this all started--reports and the other controls failing until the 3rd attempt to run the page.  My system hd crashed, our IT dept. put Win7 on my new disk and due to Win7, forced to migrate from VS2005 to VS2010.  The old reportviewer 2005 reports then had to be updated in order to work with VS2010.  Everything worked just fine prior to being forced into changing to VS2010.

     

    You know though, now that I think about it, the Win7 upgrade also forced my local machine's IIS to go from IIS 5.5 to IIS7 while IIS6 is what is on the production servers.

    Friday, November 5, 2010 1:52 PM
  • User-311898710 posted

    humm, sounds very strange... I would try to create a test environment in a virtual machine running IIS 6 and Win 2003, installing the same applications with the same conditions. It at least could repeat the error and we could to identify the possible causes. 

    Friday, November 5, 2010 5:38 PM
  • User120353699 posted

    Well, the good news is that we have a 3 tier structure: development, staging and production.  Each environment is the same, with the exception that development allows debugging (for cold fusion developers, anyway).  I still can't replicate the problems.  However, due to some sql server patching that occurred a couple nights ago, I did get some errors that were slightly changed with respect to the reports.  I posted an update here for the error details: http://forums.asp.net/t/1611800.aspx

     

    Essentially, the error I typically see just says the asp.net session has expired; during the sql server maintenance the error changed to sql server session db not available--but all the server variables, etc are the same.  What that tells me is that typically, the session connects fine to the session db, but during or after the call, something is coming back corrupted.  And i wonder if that isn't a hint to what the other items that are causing errors may be experiencing--viewstate corruption perhaps?  Any way, any thoughts that help resolve this would be greatly appreciated!

     

    As you may guess, this is driving me crazy and my users aren't all that happy with it either.

     

    Thanks,

     

    ejo

    Friday, November 12, 2010 12:02 PM
  • User120353699 posted

    Ok, still struggling with this so i thought i'd post some updates and hope someone has an idea of what could be going on with all this stuff.  I made some changes to some of the things that were giving me problems, but the overall effect has not changed--some pages throw an error on the first 2 or 3 attempts to run the page, then will execute just fine.  I'm posting the new errors and entire code/markup to see if someone can see something I can't.

     Markup:

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="OrderLists.aspx.vb" Inherits="DBPages_ServiceRequest_OrderLists" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Order Lists</title>
          <style type="text/css">
                @import url("../../CSS/styles/MasterCardLCMStyle.css");    /* Specific to MasterCard LCM use */
                @import url("../../CSS/styles/Forms.css");          /*Site Form CSS */
          </style>
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />  
    </head>
    <body>
        <form id="form1" runat="server">
        <div id="CommandHeader">
            <ul class="nav-bar">
                <li><asp:HyperLink ID="SRLink" runat="server" Text="Go Back to SR" ></asp:HyperLink></li>
                <li><asp:LinkButton ID="MakeOLLink" runat="server" Text="Make OL" OnClick="MakeOL_Click" OnClientClick="return CsvFileCheck();" ></asp:LinkButton></li>
                <li><asp:LinkButton ID="ExportLink" runat="server" Text="Export OL" OnClick="Export_Click" OnClientClick="PreExport();" ></asp:LinkButton></li>
            </ul>
        </div>
        <br />
        <br />
        <div>
            <asp:GridView ID="gvEditOL" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" 
                AutoGenerateColumns="False" ShowFooter="True" DataKeyNames="ID" Font-Size="Small" >
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#EFF3FB" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <EditRowStyle BackColor="#2461BF" ForeColor="White" Font-Size="Small" />
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField DataField="Stock" HeaderText="Stock" SortExpression="Stock" >
                    </asp:BoundField>
                    <asp:BoundField DataField="Activity" HeaderText="Activity" SortExpression="Activity" >
                    </asp:BoundField>
                    <asp:BoundField DataField="EquipOwned" HeaderText="EquipOwned" SortExpression="EquipOwned" >
                    </asp:BoundField>
                    <asp:BoundField DataField="Manufacturer" HeaderText="Manufacturer" SortExpression="Manufacturer" >
                    </asp:BoundField>                    
                    <asp:BoundField DataField="EHSN" HeaderText="EHSN" SortExpression="EHSN" >
                    </asp:BoundField>
                    <asp:BoundField DataField="Qty" HeaderText="Qty" SortExpression="Qty" >
                    </asp:BoundField>
                    <asp:BoundField DataField="PartNumber" HeaderText="PartNumber" SortExpression="PartNumber" >
                    </asp:BoundField>
                    <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" >
                    </asp:BoundField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:LinkButton id="lbDelete" runat="server" Text="Delete" CommandName="Delete" ></asp:LinkButton>
                            <asp:LinkButton id="lbEdit" runat="server" Text="Edit" CommandName="Edit" ></asp:LinkButton>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:LinkButton id="lbUpdate" runat="server" Text="Update" CommandName="Update" ForeColor="White"></asp:LinkButton>
                            <asp:LinkButton id="lbCancel" runat="server" Text="Cancel" CommandName="Cancel" ForeColor="White"></asp:LinkButton>
                        </EditItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <asp:Label ID="lblOLSelect" runat="server" Font-Bold="true"></asp:Label>
            <br />
            <asp:DropDownList ID="ddlOrderList" runat="server" DataSourceID="sdsSelectOL" 
                DataTextField="ListName" DataValueField="ListName" AutoPostBack="true" 
                AppendDataBoundItems="true" OnSelectedIndexChanged="ddl_Changed" >
                <asp:ListItem Text="Select an Order List"></asp:ListItem>
            </asp:DropDownList>
            <br />
            <asp:Label ID="CSVInstruct" runat="server" ForeColor="Red" ></asp:Label>
            <br />
            <asp:Label ID="lblMakeOL" runat="server" Text="Include this CSV File" Font-Bold="true"></asp:Label>
            <br />
            <input ID="GetCSV" type="file" runat="server" style="width: 390px" />
            <br />
            <br />
            <asp:SqlDataSource ID="sdsSelectOL" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                SelectCommand="SELECT DISTINCT [ListName] FROM [SRSrvcsEquipDefaults] WHERE ([ListType] = @ListType AND Len([ListName])<>0) ORDER BY [ListName]">
                <SelectParameters>
                    <asp:QueryStringParameter Name="ListType" QueryStringField="OLType" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
            <br />
        </div>
        </form>
    </body>
    </html>
    


    Code:

    Partial Class DBPages_ServiceRequest_OrderLists
        Inherits System.Web.UI.Page
    
        Private Shared SR As String
        Private Shared SRID As String
        Private Shared SRIndex As Integer
        Private Shared LinkedSite As String
        Private Shared OLType As String
        Private Shared Ver As String
        Private Shared dsOL As DataSet
        Private Shared SiteID As Integer
        Private Shared SiteCode As String
    
        Protected Sub Export_Click(ByVal sender As Object, ByVal e As EventArgs)
            'we need to export the file to an excel document; 
            'because we can't connect directly to ms office library references, 
            'we have to build an xml file and use a transform to output
            'this fudges excel's xslx doc format
    
            'Build connection and query: query uses For XML clause so we don't have to do the 
            'hard work of creating so many attributes and appending them all to the xmldocument
            Dim Connection As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
            Dim NewConn As SqlConnection = New SqlConnection(Connection)
            Dim SiteSrQuery As String = "Select * From OrderList Where SRID = " & SRID & " For XML Auto"
            Dim StageContactsQuery As String = "Select ContactName, Office, ContactRole_ID From Contacts Where ContactRole_ID in (19,23)"
            Dim xOL As XmlDocument = New XmlDocument()
            Dim Attribute As XmlAttribute
            Dim root As XmlElement
    
            NewConn.Open()
            'get the site information and load it into the xmldocument
            Dim GetSiteSr As New SqlCommand(SiteSrQuery, NewConn)
            Dim xreader As XmlReader = GetSiteSr.ExecuteXmlReader()
            Do Until xreader.EOF()
                xOL.Load(xreader)
            Loop
            xreader.Close()
    
            root = xOL.Item("OrderList")
    
            'add the staging contacts for the order list
            Dim GetStageContacts As New SqlCommand(StageContactsQuery, NewConn)
            Dim reader As SqlDataReader = GetStageContacts.ExecuteReader()
            While reader.Read()
                If reader("ContactRole_ID") = 19 Then
                    Attribute = xOL.CreateAttribute("StagePrimary")
                    Attribute.Value = reader("ContactName")
                    root.Attributes.Append(Attribute)
                    Attribute = xOL.CreateAttribute("StagePrimaryTel")
                    Attribute.Value = reader("Office")
                    root.Attributes.Append(Attribute)
                Else
                    Attribute = xOL.CreateAttribute("StageSecondary")
                    Attribute.Value = reader("ContactName")
                    root.Attributes.Append(Attribute)
                    Attribute = xOL.CreateAttribute("StageSecondaryTel")
                    Attribute.Value = reader("Office")
                    root.Attributes.Append(Attribute)
                End If
            End While
            reader.Close()
            NewConn.Close()
    
            'add document version and date
            xOL.InsertBefore(xOL.CreateXmlDeclaration("1.0", "utf-8", Nothing), root)
            Attribute = xOL.CreateAttribute("Ver")
            Attribute.Value = Ver
            root.Attributes.Append(Attribute)
            Attribute = xOL.CreateAttribute("VerDate")
            Attribute.Value = FormatDateTime(Now, DateFormat.ShortDate)
            root.Attributes.Append(Attribute)
    
            'get the name of the person creating the order list
            Dim ThisUser As CSP.User = System.Web.HttpContext.Current.User
            Attribute = xOL.CreateAttribute("OLCreator")
            Attribute.Value = ThisUser.LastName() & ", " & ThisUser.FirstName()
            root.Attributes.Append(Attribute)
    
            'add the order list equipment/services from the gridview datatable
            Dim OLItem, OLItemList As XmlElement
            For Each row As DataRow In dsOL.Tables(0).Rows()
                OLItem = xOL.CreateElement("OLItem")
                OLItemList = xOL.CreateElement("Stock")
                OLItemList.InnerText = row.Item("Stock")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("Activity")
                OLItemList.InnerText = row.Item("Activity")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("EquipOwned")
                OLItemList.InnerText = row.Item("EquipOwned")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("Manufacturer")
                OLItemList.InnerText = row.Item("Manufacturer")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("EHSN")
                OLItemList.InnerText = row.Item("EHSN")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("Qty")
                OLItemList.InnerText = row.Item("Qty")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("PartNumber")
                OLItemList.InnerText = row.Item("PartNumber")
                OLItem.AppendChild(OLItemList)
                OLItemList = xOL.CreateElement("Description")
                OLItemList.InnerText = row.Item("Description")
                OLItem.AppendChild(OLItemList)
                root.AppendChild(OLItem)
            Next
    
            Dim fpath As String = GetDirectoryPath(SiteCode, "OL", SR)
            fpath = IIf(OLType = 1, SR & "V" & Ver & ".xls", "SR" & SR & "V" & Ver & ".xls")
    
            'transform the xml doc to excel 
            Dim MyXsl As New Xsl.XslCompiledTransform()
            Dim oStream As MemoryStream = New MemoryStream()
            Dim xOLWriter As XmlWriter = XmlWriter.Create(oStream)
            Dim strURI As String = Server.MapPath("../Documentation/XML/OL.xsl")
    
            MyXsl.Load(strURI)
            MyXsl.Transform(xOL.CreateNavigator(), Nothing, xOLWriter)
    
            Response.Clear()
            Response.Buffer = True
            Response.ContentType = "application/vnd.ms-excel"
            Response.Charset = ""
            Response.AddHeader("content-disposition", "attachment; filename=" & fpath)
            Response.BinaryWrite(oStream.ToArray())
            Response.End()
    
        End Sub
    
        Protected Sub OLtoGrid()
            'build the connection to grab the selected order list
            Dim Connection As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
            Dim NewConn As SqlConnection = New SqlConnection(Connection)
            Dim OrderListQuery As String = "Select * From SRSrvcsEquipDefaults Where ListName = '" & ddlOrderList.SelectedValue & "'"
            Dim GetOrderList As New SqlCommand(OrderListQuery, NewConn)
    
            'Create the data table to load the selected order list into for editing before export
            Dim dtOL As DataTable = New DataTable()
            Dim colStock, colActivity, colEquipOwned, colManufacturer, colEHSN, colQty, colPartNumber, colDescription, colID As DataColumn
            Dim NewRow As DataRow
    
            colStock = New DataColumn("Stock")
            colActivity = New DataColumn("Activity")
            colEquipOwned = New DataColumn("EquipOwned")
            colManufacturer = New DataColumn("Manufacturer")
            colEHSN = New DataColumn("EHSN")
            colQty = New DataColumn("Qty")
            colPartNumber = New DataColumn("PartNumber")
            colDescription = New DataColumn("Description")
            colID = New DataColumn("ID")
    
            dtOL.Columns.Add(colStock)
            dtOL.Columns.Add(colActivity)
            dtOL.Columns.Add(colEquipOwned)
            dtOL.Columns.Add(colManufacturer)
            dtOL.Columns.Add(colEHSN)
            dtOL.Columns.Add(colQty)
            dtOL.Columns.Add(colPartNumber)
            dtOL.Columns.Add(colDescription)
            dtOL.Columns.Add(colID)
            dtOL.Columns("ID").Unique = True
            dtOL.Columns("ID").AutoIncrement = True
            dtOL.Columns("ID").AutoIncrementSeed = 1
            dtOL.PrimaryKey = New DataColumn() {dtOL.Columns("ID")}
    
            dsOL = New DataSet()
            dsOL.Tables.Add(dtOL)
    
            NewConn.Open()
            Dim reader As SqlDataReader = GetOrderList.ExecuteReader()
            If reader.HasRows() Then
                While reader.Read()
                    NewRow = dtOL.NewRow
                    NewRow("Stock") = reader("Stock")
                    NewRow("Activity") = reader("Activity")
                    NewRow("EquipOwned") = reader("EquipOwned")
                    NewRow("Manufacturer") = reader("Manufacturer")
                    NewRow("EHSN") = reader("EHSN")
                    NewRow("Qty") = reader("Qty")
                    NewRow("PartNumber") = reader("PartNumber")
                    NewRow("Description") = reader("Description")
                    dtOL.Rows.Add(NewRow)
                End While
                reader.Close()
            End If
    
            'If we are building an equipment order list, we may need 
            'to add items from an existing site; the CSV file is an 
            'output of vantive and contains the existing equipment
            '
            'Add CSV File to dsOL
            If OLType = 2 Then
                If GetCSV.PostedFile.FileName.Length <> 0 Then
                    Dim CSVReader As StreamReader = New StreamReader(GetCSV.PostedFile.InputStream)
                    Dim ColName(), ColValue(), line, header As String
                    Dim PN, Status, i As Integer
    
                    Do
                        line = CSVReader.ReadLine()
                        header = Replace(line, " ", "")
                        ColName = header.Split(",")
                        PN = Array.IndexOf(ColName, "PartNumber")
                        Status = Array.IndexOf(ColName, "Status")
    
                        If PN <> -1 AndAlso Status <> -1 Then
    
                            Do
                                line = CSVReader.ReadLine()
                                i = i + 1
    
                                If i = 1 Then
                                    'create a blank line between default OL and CSV items
                                    NewRow = dtOL.NewRow
                                    NewRow("Stock") = ""
                                    NewRow("Activity") = ""
                                    NewRow("EquipOwned") = ""
                                    NewRow("Manufacturer") = ""
                                    NewRow("EHSN") = ""
                                    NewRow("Qty") = ""
                                    NewRow("PartNumber") = ""
                                    NewRow("Description") = ""
                                    dtOL.Rows.Add(NewRow)
                                Else
                                    If Not line Is Nothing Then
                                        ColValue = line.Split(",")
                                        If ColValue(Status) = "Installed" Then
                                            'get the part information from our equipment list
                                            Dim PartDetailsQuery As String = "select description, manufacturer " & _
                                                                            "from equipment join equipmanufacturer on " & _
                                                                            "equipment.manufacturer_id = equipmanufacturer.id " & _
                                                                            "Where equipment = '" & ColValue(PN) & "'"
                                            Dim GetPartDetails As New SqlCommand(PartDetailsQuery, NewConn)
    
                                            'we expext to find the parts, but if we don't
                                            'set defaults to enter the new part into
                                            'the equipment table
                                            Dim strManufacturer As String = "Manufacturer not found"
                                            Dim strDescription As String = "Description not found"
                                            Dim FoundPart As Boolean = True
                                            Dim ManufacturerID As Integer = 0
                                            Dim intType As Integer = 0
    
                                            reader = GetPartDetails.ExecuteReader()
                                            If reader.HasRows() Then
                                                While reader.Read()
                                                    strManufacturer = reader("manufacturer")
                                                    strDescription = reader("description")
                                                End While
                                            Else
                                                FoundPart = False
                                            End If
                                            reader.Close()
    
                                            'Some items in csv may not have been entered in the equipment table and we
                                            'need to accommodate for values that can't be looked up
                                            '
                                            'Cisco equipment if replaced in the field will be appended with "="
                                            'even though we may have the non-field replaceable part
                                            '
                                            'if we detect an item here, we should add it to our catalogue
                                            If Not FoundPart Then
                                                Dim NewPartDetailsQuery As String = "select description, manufacturer, manufacturer_id, type " & _
                                                                                "from equipment join equipmanufacturer on " & _
                                                                                "equipment.manufacturer_id = equipmanufacturer.id " & _
                                                                                "Where equipment like '" & ColValue(PN) & "[=]'"
                                                Dim GetNewPartDetails As New SqlCommand(NewPartDetailsQuery, NewConn)
    
                                                reader = GetNewPartDetails.ExecuteReader()
                                                If reader.HasRows() Then
                                                    While reader.Read()
                                                        strManufacturer = reader("manufacturer")
                                                        strDescription = reader("description")
                                                        ManufacturerID = reader("manufacturer_id")
                                                        intType = reader("type")
                                                    End While
                                                Else
                                                    'known Cisco products start with...
                                                    If InStr(ColValue(PN), "Cisco") = 1 Then
                                                        strManufacturer = "CISCO SYSTEMS /3"
                                                        ManufacturerID = 3
                                                        strDescription = "Cisco Router/Chassis"
                                                        intType = 3
                                                    ElseIf InStr(ColValue(PN), "WS-") = 1 Then
                                                        strManufacturer = "CISCO SYSTEMS /3"
                                                        ManufacturerID = 3
                                                        strDescription = "Cisco LAN Switch"
                                                        intType = 2
                                                    ElseIf InStr(ColValue(PN), "AIM-") = 1 Then
                                                        strManufacturer = "CISCO SYSTEMS /3"
                                                        ManufacturerID = 3
                                                        strDescription = "Cisco ATM Interface Module"
                                                        intType = 6
                                                    ElseIf InStr(ColValue(PN), "HWIC") = 1 _
                                                            OrElse InStr(ColValue(PN), "VWIC") = 1 _
                                                            OrElse InStr(ColValue(PN), "WIC") = 1 Then
                                                        strManufacturer = "CISCO SYSTEMS /3"
                                                        ManufacturerID = 3
                                                        strDescription = "Cisco WAN Interface Card"
                                                        intType = 7
                                                    ElseIf InStr(ColValue(PN), "PWR-") = 1 _
                                                            OrElse InStr(ColValue(PN), "CAB-") = 1 Then
                                                        strManufacturer = "CISCO SYSTEMS /3"
                                                        ManufacturerID = 3
                                                        strDescription = "Cisco Cable"
                                                        intType = 1
                                                    ElseIf InStr(ColValue(PN), "MEM") = 1 Then
                                                        strManufacturer = "CISCO SYSTEMS /3"
                                                        ManufacturerID = 3
                                                        strDescription = "Cisco Memory"
                                                    ElseIf InStr(ColValue(PN), "PA-") = 1 Then
                                                        strManufacturer = "CISCO SYSTEMS /3"
                                                        ManufacturerID = 3
                                                        strDescription = "Cisco Port Adapter"
                                                        intType = 6
                                                    ElseIf InStr(ColValue(PN), "NP-") = 1 Then
                                                        strManufacturer = "CISCO SYSTEMS /3"
                                                        ManufacturerID = 3
                                                        strDescription = "Cisco Processor"
                                                        intType = 6
                                                    ElseIf InStr(ColValue(PN), "NM-") = 1 Then
                                                        strManufacturer = "CISCO SYSTEMS /3"
                                                        ManufacturerID = 3
                                                        strDescription = "Cisco Network Module"
                                                        intType = 6
                                                    Else
                                                        strManufacturer = "Manufacturer not found"
                                                        strDescription = "description not found"
                                                        ManufacturerID = 0
                                                        intType = 0
                                                    End If
                                                End If
                                                reader.Close()
    
                                                'Insert items not found and provide default values for the 
                                                'order  List if necessary
                                                Dim InsertPart As String = "INSERT INTO Equipment " & _
                                                                   "(Equipment, Description, Manufacturer_ID, Type, Format, Active) " & _
                                                                   "VALUES " & _
                                                                   "(@Equipment, @Description, @Manufacturer_ID, @Type, 0, 0)"
                                                Dim InsertConn As New SqlCommand(InsertPart, NewConn)
    
                                                InsertConn.Parameters.AddWithValue("Equipment", ColValue(PN))
                                                InsertConn.Parameters.AddWithValue("Description", strDescription)
                                                InsertConn.Parameters.AddWithValue("Manufacturer_ID", ManufacturerID)
                                                InsertConn.Parameters.AddWithValue("Type", intType)
                                                InsertConn.ExecuteNonQuery()
                                            End If
    
                                            NewRow = dtOL.NewRow
                                            NewRow("Stock") = ""
                                            NewRow("Activity") = "N"
                                            NewRow("EquipOwned") = "C"
                                            NewRow("Manufacturer") = strManufacturer
                                            NewRow("EHSN") = CStr(i - 1).ToString() + ".0"
                                            NewRow("Qty") = "1"
                                            NewRow("PartNumber") = ColValue(PN)
                                            NewRow("Description") = strDescription
                                            dtOL.Rows.Add(NewRow)
                                        End If
                                    End If
                                End If
                            Loop Until line Is Nothing
                        End If
                    Loop Until line Is Nothing
                    CSVReader.Close()
                End If
            End If
    
            NewConn.Close()
    
            gvEditOL.Visible = True
            MakeOLLink.Visible = False
            ExportLink.Visible = True
            CSVInstruct.Visible = False
    
            gvEditOL_Bind()
    
            lblMakeOL.Visible = False
            GetCSV.Visible = False
            lblOLSelect.Visible = False
            ddlOrderList.Visible = False
            ExportLink.Visible = True
        End Sub
    
        Protected Sub MakeOL_Click(ByVal sender As Object, ByVal e As EventArgs)
            OLtoGrid()
        End Sub
    
        Protected Sub gvEditOL_Bind()
            gvEditOL.DataSource = dsOL
            gvEditOL.DataBind()
        End Sub
    
        Protected Sub gvEditOL_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles gvEditOL.RowDeleting
            'we have to re-bind the data to the grid        
            dsOL.Tables(0).Rows(gvEditOL.Rows(e.RowIndex).DataItemIndex).Delete()
            dsOL.Tables(0).AcceptChanges()
            Call gvEditOL_Bind()
            gvEditOL.Visible = True
            ExportLink.Visible = True
        End Sub
    
        Protected Sub gvEditOL_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles gvEditOL.RowEditing
            gvEditOL.EditIndex = e.NewEditIndex
            gvEditOL_Bind()
            gvEditOL.Visible = True
            ExportLink.Visible = True
        End Sub
    
        Protected Sub gvEditOL_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles gvEditOL.RowUpdating
            ' Get the new values from the GridView controls
            Dim i As Integer = gvEditOL.Rows(e.RowIndex).DataItemIndex
            Dim strStock As String = CType(gvEditOL.Rows(e.RowIndex).Cells(0).Controls(0), TextBox).Text
            Dim strActivity As String = CType(gvEditOL.Rows(e.RowIndex).Cells(1).Controls(0), TextBox).Text
            Dim strEquipOwned As String = CType(gvEditOL.Rows(e.RowIndex).Cells(2).Controls(0), TextBox).Text
            Dim strManufacturer As String = CType(gvEditOL.Rows(e.RowIndex).Cells(3).Controls(0), TextBox).Text
            Dim strEHSN As String = CType(gvEditOL.Rows(e.RowIndex).Cells(4).Controls(0), TextBox).Text
            Dim strQty As String = CType(gvEditOL.Rows(e.RowIndex).Cells(5).Controls(0), TextBox).Text
            Dim strPartNumber As String = CType(gvEditOL.Rows(e.RowIndex).Cells(6).Controls(0), TextBox).Text
            Dim strDescription As String = CType(gvEditOL.Rows(e.RowIndex).Cells(7).Controls(0), TextBox).Text
    
            gvEditOL.EditIndex = -1
    
            ' Update the dataset using the new values
            dsOL.Tables(0).Rows(i).Item(0) = strStock
            dsOL.Tables(0).Rows(i).Item(1) = strActivity
            dsOL.Tables(0).Rows(i).Item(2) = strEquipOwned
            dsOL.Tables(0).Rows(i).Item(3) = strManufacturer
            dsOL.Tables(0).Rows(i).Item(4) = strEHSN
            dsOL.Tables(0).Rows(i).Item(5) = strQty
            dsOL.Tables(0).Rows(i).Item(6) = strPartNumber
            dsOL.Tables(0).Rows(i).Item(7) = strDescription
            dsOL.Tables(0).AcceptChanges()
    
            'rebind data to grid
            Call gvEditOL_Bind()
            gvEditOL.Visible = True
            ExportLink.Visible = True
        End Sub
    
        Protected Sub gvEditOL_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles gvEditOL.RowCancelingEdit
            gvEditOL.EditIndex = -1
            gvEditOL_Bind()
            gvEditOL.Visible = True
            ExportLink.Visible = True
        End Sub
    
        Protected Sub ddl_Changed(ByVal sender As Object, ByVal e As EventArgs)
            MakeOLLink.Visible = True
            If OLType = 1 Then
                MakeOLLink.Visible = False
                lblMakeOL.Visible = False
                GetCSV.Visible = False
                gvEditOL.Visible = False
                ExportLink.Visible = False
                OLtoGrid()
            Else
                lblMakeOL.Visible = True
                GetCSV.Visible = True
                CSVInstruct.Visible = True
                gvEditOL.Visible = True
                MakeOLLink.Visible = True
            End If
        End Sub
    
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
            If Not IsPostBack Then
                SRID = Request.QueryString("SRID")
                SRIndex = Request.QueryString("Index")
                OLType = Request.QueryString("OLType")
                Ver = Request.QueryString("Ver")
                LinkedSite = Request.QueryString("LinkedSite")
                SiteID = Request.QueryString("SiteID")
                SiteCode = Request.QueryString("SiteCode")
                SR = Request.QueryString("SR")
    
                Ver = Ver + 1
    
                If OLType = 1 Then
                    lblMakeOL.Visible = False
                    GetCSV.Visible = False
                    gvEditOL.Visible = False
                    MakeOLLink.Visible = False
                    ExportLink.Visible = False
                Else
                    lblMakeOL.Visible = False
                    GetCSV.Visible = False
                    gvEditOL.Visible = False
                    MakeOLLink.Visible = False
                    ExportLink.Visible = False
                    CSVInstruct.Visible = False
                    CSVInstruct.Text = "<br /><br />Steps to create a CSV file (if necessary): <br/><br/>" & _
                        "While logged into GPS Eclipse, use the menu path: file/open/inventory/asset...<br /><br />" & _
                        "1.  Use the siteid field to input the appropriate sitecode (ignore capitalization)<br />" & _
                        "2.  Status may be set to installed for smaller file, but is not necessary<br />" & _
                        "3.  Click 'search', or press the 'enter' key<br />" & _
                        "4.  Make sure the 'print to file' option is selected<br />" & _
                        "5.  Check the 'use comma seperated format' check box<br />" & _
                        "6.  Click 'print'<br />" & _
                        "7.  Click 'browse' and provide a path to download the file and include a file name<br />" & _
                        "8.  Make sure the file name includes the '.csv' extension, or alternatively, set the file type option as CSV<br />" & _
                        "9.  Click 'open'<br />" & _
                        "10. Click 'ok'<br />"
                End If
                lblOLSelect.Text = "Select an OL to Create"
                SRLink.NavigateUrl = "../ServiceRequest/SRData.aspx?Index=" & SRIndex & "&SiteID=" & SiteID & "&SiteCode=" & SiteCode & "&SrStatus=Open"
            Else
                lblOLSelect.Text = "Select an OL to Manage"
            End If
    
            Me.ClientScript.RegisterClientScriptInclude(Me.GetType(), "OrderListForm", ResolveClientUrl("~/Scripts/OrderLists.js"))
        End Sub
    
    End Class
    


     JS:

    // JScript File
    
    function PreExport() 
    {
        window.document.getElementById("ExportLink").style.visibility = "hidden";
        window.document.getElementById("gvEditOL").style.visibility = "hidden";
        return true;
    }
    
    
    function CsvFileCheck() 
    {
        var SrActivity = getQuerystring("Activity"); /* we don't need to do this for New SDP or Change Config Activities */
        var OlType = getQuerystring("OLType"); /* we don't need to do the csv check for SOLs */
        var csvFile = document.getElementById("GetCSV").value.length; /* check if we entered a file name */
    
            if (SrActivity != 17 && SrActivity != 2 && OlType == 2 && csvFile == 0 ) { 
                    alert("A CSV file is required for this SR Activity type.");
                    return false;
                }
                else {
                    return true;
                }
    }
    
    
    function getQuerystring(key, default_) 
    { 
        if (default_==null) 
        { 
            default_=""; 
        } 
        var search = unescape(location.search); 
        if (search == "") 
        { 
            return default_; 
        } 
        search = search.substr(1); 
        var params = search.split("&"); 
        for (var i = 0; i < params.length; i++) 
        { 
            var pairs = params[i].split("="); 
            if(pairs[0] == key) 
            { 
                return pairs[1]; 
            } 
        } 
        return default_; 
    }
    
    

    Errors:

     The following error occurred: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'For'. 
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) 
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) 
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) 
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() 
       at System.Data.SqlClient.SqlDataReader.get_MetaData() 
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) 
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) 
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) 
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) 
       at System.Data.SqlClient.SqlCommand.ExecuteXmlReader() 
       at DBPages_ServiceRequest_OrderLists.Export_Click(Object sender, EventArgs e) 
       at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) 
       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) 
       at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) 
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) 
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
       --- End of inner exception stack trace --- 
       at System.Web.UI.Page.HandleError(Exception e) 
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
       at System.Web.UI.Page.ProcessRequest() 
       at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) 
       at System.Web.UI.Page.ProcessRequest(HttpContext context) 
       at ASP.dbpages_documentation_orderlists_aspx.ProcessRequest(HttpContext context) 
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 
    


     

     The following error occurred: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'For'. 
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) 
       at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) 
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) 
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) 
       at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() 
       at System.Data.SqlClient.SqlDataReader.get_MetaData() 
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) 
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) 
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) 
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) 
       at System.Data.SqlClient.SqlCommand.ExecuteXmlReader() 
       at DBPages_ServiceRequest_OrderLists.Export_Click(Object sender, EventArgs e) 
       at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) 
       at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) 
       at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) 
       at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) 
       at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) 
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
       --- End of inner exception stack trace --- 
       at System.Web.UI.Page.HandleError(Exception e) 
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 
       at System.Web.UI.Page.ProcessRequest() 
       at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) 
       at System.Web.UI.Page.ProcessRequest(HttpContext context) 
       at ASP.dbpages_documentation_orderlists_aspx.ProcessRequest(HttpContext context) 
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 
    


    Monday, December 13, 2010 11:22 AM