ASP.net Can't see uploaded spreadsheets

Hi. I upload data to an ASP.net web site. I have a Window 8 machine and can't see  the upload in the GridView
I am not sure what is suddenly causing this

    Protected Sub ButtonUploadFile_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ButtonUploadFile.Click
        Try

            If FileUploadExcel.HasFile Then
                Try

                    Dim sMinAndSecond As String = CStr(Minute(Now)) & CStr(Second(Now))
                    Me.Second_Minute_of_Upload.Text = sMinAndSecond 'workaround to stop file locking on the same name


                    FileUploadExcel.SaveAs(Server.MapPath("~/Temp/ExcelImport" & sMinAndSecond & ".xls"))
                    'FileUploadExcel.SaveAs(Server.MapPath("~/ExcelImport.xls"))

                    LabelUpload.Text = "Upload File Name: " & _
                        FileUploadExcel.PostedFile.FileName & "<br>" & _
                        "Type: " & _
                        FileUploadExcel.PostedFile.ContentType & _
                        " File Size: " & _
                        FileUploadExcel.PostedFile.ContentLength & " kb<br>"
                Catch ex As Exception
                    LabelUpload.Text = "Error: " & ex.Message.ToString

                    FileUploadExcel.Dispose() 'EXTRA ADDED IN DUE TO ERROR The process cannot access the file
                    'Release file from memory after uploading
                    FileUploadExcel.FileContent.Dispose()

                End Try
            Else
                LabelUpload.Text = "Please select a file to upload."
                FileUploadExcel.Dispose() 'EXTRA ADDED IN DUE TO ERROR The process cannot access the file
                'Release file from memory after uploading
                FileUploadExcel.FileContent.Dispose()
            End If
        Catch ex As Exception
            Response.Write(ex.Message)
        End Try

    End Sub

    Protected Sub ButtonView_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ButtonView.Click
        Try
            If Me.Label_LoggedIn.Visible = False Then
                Me.Label_LoginMessage.Text = "Please log in first!"
                Exit Sub
            Else
                Me.Label_LoginMessage.Text = ""
            End If

            'The ButtonView_Click event handler starts by hiding the PanelUpload and PanelImport Panels,
            ' while showing the PanelView interface (which is where the GridView is located).
            PanelUpload.Visible = False
            PanelView.Visible = True
            PanelImport.Visible = False
            PanelAll.Visible = False
            'Next, a new OleDbDataAdapter object is created and its SelectCommand is assigned the OleDbCommand object returned by the ExcelConnection function.
            ' Create a new Adapter
            Dim objDataAdapter As New OleDbDataAdapter()

            ' retrieve the Select command for the Spreadsheet
            objDataAdapter.SelectCommand = ExcelConnection()
            'The purpose of this OleDbDataAdapter object is to populate a DataSet with the contents of the Excel query; this DataSet is then bound to the GridView.
            ' Create a DataSet
            Dim objDataSet As New DataSet()

            ' Populate the DataSet with the spreadsheet worksheet data
            objDataAdapter.Fill(objDataSet)

            ' Bind the data to the GridView
            GridViewExcel.DataSource = objDataSet.Tables(0).DefaultView
            GridViewExcel.DataBind()
        Catch ex As Exception

            Response.Write(Err.Description)

        End Try
    End Sub
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lokesh B RDeveloperCommented:
Hi,

Change this lien and see the uploaded file in Temp Folder - > ExcelImport folder


FileUploadExcel.SaveAs(Server.MapPath("~/Temp/ExcelImport/" & sMinAndSecond & ".xls"))

Open in new window

1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
I think the issue might have something to do with my firewall or something like that on my new Windows 8 machine
0
Lokesh B RDeveloperCommented:
Hi,

Did you change the line and tried?

because you are missing the / at the end in your code.

"~/Temp/ExcelImport/"
0
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
Thanks very much
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.