使用c#在asp.net上下载文件 [英] File upload in asp.net using c#
本文介绍了使用c#在asp.net上下载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I have to upload file in a particular folder on server
。
我尝试了什么:
我必须上传文件在服务器上的特定文件夹中,但没有赋予文件夹权限。
.
What I have tried:
I have to upload file in a particular folder on server without giving permissions to folder.
推荐答案
http://www.dotnetgallery.com/kb/resource13-How-to-upload- a-file-to-web-server-in-aspnet-and-store-file-path-into-data.aspx
这对你有所帮助。 />
或
类似线程在这里 [ ^ ]
http://www.dotnetgallery.com/kb/resource13-How-to-upload-a-file-to-web-server-in-aspnet-and-store-file-path-into-data.aspx
This will help you.
OR
Similiar Thread is here [^]
如果您在localhost上运行应用程序,则无需提供文件夹权限。但是,在网络托管服务器的情况下,您需要在给定的控制面板中设置适当的权限。
此外,不会给出上传文件的路径设置作为完整的道路。您必须使用server.mappath(〜/ yourfoldername /)来获取根路径。并使用此路径上传文件。
If you are running an application on localhost then no need to give folder permissions. But, in case of web hosting server, you will need to set proper permissions in a given control panel.
Also, the path set for upload file will not be given as full path. You have to use server.mappath("~/yourfoldername/") to get root path. And use this path to upload file.
这篇关于使用c#在asp.net上下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文