在wwwroot IIS7中的已发布应用程序中创建的文件夹 [英] Folders creating in published application in wwwroot IIS7

查看:49
本文介绍了在wwwroot IIS7中的已发布应用程序中创建的文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨极客,



虽然我多次试过并贴在这里,但我无法解决这个问题。

需要在我发布的应用程序中创建文件夹,该文件夹放在IIS7中的wwwroot中。但徒劳无功。无法在已发布的文件夹中创建文件夹和上传图片。



我错过了什么吗?此外,我也给了安全菜单中的写入权限。

Hi geeks,

Although I tried many times and posted here, but I couldn't solve this problem.
Need to create folders inside my published application which is placed in wwwroot in IIS7. But in vain. Couldn't able to create folders and upload images in published folder.

Did I miss anything ? Also I gave permissions for write in Security menu too .

string root = Server.MapPath("~");
string path = root+"\\Brands\\";
string brandname = addbrand.Text;
bool isExists = System.IO.Directory.Exists(Server.MapPath(@"~/"+path+"/"+brandname));
if (!isExists)
System.IO.Directory.CreateDirectory(Server.MapPath(@"~/" + path + "/" + brandname));
if (uploadimg.HasFile)
{
string FileName = Path.GetFileName(uploadimg.PostedFile.FileName);
uploadimg.SaveAs(@root+"/Images/" + FileName);
}





提前致谢

Sriram



Thanks in advance
Sriram

推荐答案

http://mvolo.com/creating-iis7-sites- applications-and-virtual-directories / [ ^ ]



http://stackoverflow.com/questions/9574356/how-to-publish-asp-website-using-iis7 [ ^ ]



试试这个链接



谢谢&问候

Rajeeshmenoth
http://mvolo.com/creating-iis7-sites-applications-and-virtual-directories/[^]

http://stackoverflow.com/questions/9574356/how-to-publish-asp-website-using-iis7[^]

Try thiz link

Thanks & Regards
Rajeeshmenoth


这篇关于在wwwroot IIS7中的已发布应用程序中创建的文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆