web-folders

Securing a folder in ASP.NET web directory

心不动则不痛 提交于 2019-12-23 02:36:34
问题 I worked long time back on a website and it has been working fine, recently a problem has been reported, which I need to go through. In my site there is a folder named repository, which contains files like word and PDF documents and ideally only logged in users are allowed to download them but now it has been observed that anyone who is not logged into the website, can even also download them :( Is there any wayout to handle it without moving the folder out of the web directory? Like making

Securing a folder in ASP.NET web directory

烂漫一生 提交于 2019-12-07 22:29:29
I worked long time back on a website and it has been working fine, recently a problem has been reported, which I need to go through. In my site there is a folder named repository, which contains files like word and PDF documents and ideally only logged in users are allowed to download them but now it has been observed that anyone who is not logged into the website, can even also download them :( Is there any wayout to handle it without moving the folder out of the web directory? Like making that folder password protected and only my pages can access the content, any code sample or link will be

How can I enumerate network shares and web folders in C#?

拜拜、爱过 提交于 2019-12-01 22:10:04
问题 .Net provides us with a FolderBrowserDialog control to browse for folders. This is however a modal dialog box. I need to create a user control that I can drop onto my form. So, I have been looking at creating my own, where I need to get all local drives, mapped network drives, UNC shares and web folders (WebDAV/SharePoint). I am using Windows 7 and .Net 4.0. Local and Mapped Network Drives I can get the local drives from DriveInfo.GetDrives(). However, these are only showing me the drives

How can I enumerate network shares and web folders in C#?

这一生的挚爱 提交于 2019-12-01 19:36:42
.Net provides us with a FolderBrowserDialog control to browse for folders. This is however a modal dialog box. I need to create a user control that I can drop onto my form. So, I have been looking at creating my own, where I need to get all local drives, mapped network drives, UNC shares and web folders (WebDAV/SharePoint). I am using Windows 7 and .Net 4.0. Local and Mapped Network Drives I can get the local drives from DriveInfo.GetDrives(). However, these are only showing me the drives that are available/online. In Windows Explorer, you also see mapped network drives that are disconnected