通过asp.net vb上传Excel的问题 [英] Issue in Excel uploading through asp.net vb
本文介绍了通过asp.net vb上传Excel的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我正在尝试将excel文件上传到网格视图中。并获得以下权利相关的例外。请建议可能的解决方案:
Hi All,
I am trying to upload an excel file into a grid view. And getting the following rights related exception. Please suggest the possible solution:
system.unauthorizedaccessexception access to path 'webapplication1' is denied
Protected Sub btnUpload_Click(sender As Object, e As EventArgs) Handles btnUpload.Click
If FileUpload2.HasFile Then
Dim FileName As String = Path.GetFileName(FileUpload1.PostedFile.FileName)
Dim Extension As String = Path.GetExtension(FileUpload1.PostedFile.FileName)
Dim FolderPath As String = ConfigurationManager.AppSettings("C:/")
Dim FilePath As String = Server.MapPath(FolderPath + FileName)
*****FileUpload1.SaveAs(FilePath)
Import_To_Grid(FilePath, Extension, rbHDR.SelectedItem.Text)
End If
End Sub
提前致谢
Atul
Thanks in advance
Atul
推荐答案
参见同样的问题,希望你有一些想法自己解决它..
http://stackoverflow.com/questions/8821410/system-unauthorizedaccessexception-access-to-the-path-denied [ ^ ]
http://stackoverflow.com/questions/ 23405767 / system-unauthorizedaccessexception-access-to-path-google-apis-auth-is-deni [ ^ ]
See the same issues, hope you get some idea to resolve it yourself..
http://stackoverflow.com/questions/8821410/system-unauthorizedaccessexception-access-to-the-path-denied[^]
http://stackoverflow.com/questions/23405767/system-unauthorizedaccessexception-access-to-the-path-google-apis-auth-is-deni[^]
这篇关于通过asp.net vb上传Excel的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文