Security :: How To Keep All Files In One Folder But Programaticaly Decide Which Ones Can Be Seen
Jul 6, 2010
How can i decide wich images can be viewed and witch cannot?
Is it possible to keep all the files in one folder but programaticaly decide wich ones can be seen?
I dont want the user to be able to navigate and browse the folder with all the images, but i want some images from the folder to be viewable for anonymous users.
View 3 Replies
Similar Messages:
Jun 16, 2010
I have a folder with png images that are not shared or public (the folder is outside my application folder). Now I want my users to be able to view thoose images only if they are logged in (different users, different images). All images have a name that correspond to the users id. My idea is to stream thoose images into the asp:Image control, is that possible? How do I do that? Other (better) solutions?
View 6 Replies
Jul 1, 2010
I was following the tutorials from this two sites:
http://www.15seconds.com/issue/070104.htm
http://aspnet.4guysfromrolla.com/articles/020404-1.aspx
Following the first site, it had worked but when I´ve moved the pages and files to other folders and set the web.config file on this folder, now it won´t work at all!!!
The file is an *.swf object. I did put the asapi.dll to map the extension on the website root, I´ve put the
[Code]....
on the web.config new folder and on the web.config website´s root.
It won´t work!!! I can access the file directly!!! on the web.config of the folder that contains the file, there is a <deny users="*" /> line.
View 4 Replies
Dec 16, 2010
In my website I have a page to upload files. It works fine when I run the website on my local machine and also in visual studio in the server. But, I cannot upload files when I access the website through the browser. I have given all the pemissions I know to the upload folder like - ASPNET, Network Service and IUSR. I am using IIS 6. It is a dedicated hosting. I can access all the pages, but only the upload does not upload files to the folder and it goes to the error page (but I don't know what is the error).
View 1 Replies
Jan 4, 2010
I am building an ASP.NET 3.5 Web Application and I am NOT using the membership provider for security. In the application I have a role named Admin and all the files for this role are inside the Security folder in the project. Currently for all the pages inside the security folder I am checking to see if the logged in user's role is an Admin or not. This to me seems very redundant, can do something like "If the user is requesting a page inside the security folder then check his role".
View 1 Replies
Aug 11, 2010
I have a folder with username and password over it.I wanna make a page where i can access files under that folders in .net and be able to download them.How to code that in VB.net?
View 2 Replies
Mar 7, 2011
My restricted files are all stored in ~/Secured folder on the root. Authorized users have no trouble accessing aspx files in that folder. Recently I added a part of an application whose files I wanted to keep separate and created a ~/Secured/HR folder. I am getting a "resource not found" error trying to use any aspx file in HR folder even after user successfully logs in, as if the file does not exist at all. Here is my web.config security settings:
[Code]....
Do I need to configure security for that folder separately?
View 1 Replies
Sep 16, 2010
I have secured some files on my webserver by putting them into the App_Data folder in the root (I do not have the option to secure folders using the ASAPI filter)The user gets access to these files by requesting them through a handler, fx. by requesting ~/Handler.ashx?file=App_Data/MySubFolder/MyFile.jpgNow, I want to make all the content in a specific folder called "Members" (a single subdirectory of the App_Data folder) available only by passing a specific password. That is by requesting ~/Handler.ashx?file=App_Data/MySubFolder/MyFile.jpg&password=xxxxIn my Handler.ashx I have written some logic seeking if InStr(context.Request.QueryString("file"), "Members") = 0 before sending the file.If inStr <> 0 a password is required.Is this a good way to secure a folder in and its content? Is there a way of getting access anyway, like using some kind of "sub-directory" line in the path (the same way as you can request parent directory by using "../../Myfile.jpg)? I know there will be a problem if someone fx. legitimately tries to access the file App_Data/Members.jpg
View 15 Replies
Jun 24, 2010
I am using URL routing in asp.net application (not MVC) . I have Admin folder in my aaplication which has admin related aspx pages with seperate web.config. I have seperate login form for admin users which is placed in admin folder itself. My issue is whenever I hit [URL] (which I want to go to login form for admin)- it tries to authenticate and goes to login url mentioned in web.config of root folder.
Note: Admin folder has anonymous access in root config file. Also I have set default document in config of Admin folder. I have added following line in global.asax so that routing doesnt work for files in admin folder;
routes.Add(new
Route("admin/{*resource}",
new
StopRoutingHandler()));
I am really confused what is the issue? What I am missing?
View 6 Replies
Jan 29, 2010
I have a web app, which contains a folder Uploads, to which users (authenticated) upload their files (for some reason it has to be a folder in the root of the web app).I want to deny access to this folder and files to all non-authenticated users.
In my web.config I have:
[Code]....
and everything seems to work in development, but on a staging server it redirects non-authenticated users to login page ONLY from aspx pages, but not when entering the url to the file in Uploads folder.
View 5 Replies
Mar 29, 2010
Actually I want move files from one folder to another folder after reading files.So while moveing the files i want rename those file
My Code is :
[Code]....
showing some error also the folder using another process, How to rename while moving..
ex:ss.xls need to 20100429.xls
ss1.xls need to 201004291.xlx
it should increment file name
View 2 Replies
Oct 11, 2010
I can not able to open pdf file asp.net programaticaly. I can open the pdf file directly with no issue. When i open the pdf file as throght the folllowing code. I getting an message File does not begin with '%PDF in a message box with header as Adobe reader .
[code]....
View 1 Replies
Jun 24, 2010
I am trying to show a Gridview that lists information in a database based on a query. The query takes a parameter of a string, how do you define what this parameter is. An example of the screen I am stuck at is:http://static.asp.net/asp.net/images/dataaccess/07fig08cs.pngAn example of the code i want to use is:parameter for my object data source select query = OBDS_Query_ParameterOBDS_Query_Parameter = str;
Sorry Im not sure how to explain it...For instance if I have a query that GetAllProducts(String userName); How do i pass or define what userName is when using the data gridview. I am using an Object DataSource and linking the data Gridview to that. I can do this without the object data source and strictly melodramatically like this:
quartz_SongsTableAdapter songsAdapter = new quartz_SongsTableAdapter();
CurrentRole = "admin";
GridView1.DataSource = songsAdapter.GetSongForClient(CurrentRole);
GridView1.DataBind();
View 1 Replies
Jun 17, 2010
This is a pretty basic question. Since browsers have a culture setting that the web app uses to decide which locale to use, should I still have a "language" button for users to be able to override the culture? Why or Why Not? To me it doesn't make sense to have a button there if the user had already set their language in their system.
View 1 Replies
Mar 15, 2011
I know that varchar(n) in sql server specifies that a variable character of n bytes can be stored But what value of "n" should I choose if I have to store a string of say 100 character in that field. I am not able to decide the size of varchar when creating a table in database when I have to store a string of say 50 characters or string or 100 or say 1000 characters.
View 8 Replies
Jan 24, 2010
i have a label that get repeated in a repeater control.what i want is that it retrieves a data from database in the vb code behind,.
i have tried this on the aspx page:
[Code]....
View 10 Replies
Jun 1, 2012
I have 3 page  index.aspx and store.aspx and Electric.aspx
In index.aspx I have TB and button and this is my user’s table
Â
ID Behcode Name Description T_name
1 2222 Iron Test Store
4 3333 Laundry Test Electric
When user type their behcode in TB it go to store.aspx and fill this page with user’s information
This is my code I use query string
protected void ImageButton3_Click(object sender, ImageClickEventArgs e) {
Response.Redirect(store.aspx?behcode=" + Server.UrlEncode(txtNumeric.Text));
}
[Code]....
View 1 Replies
Jan 22, 2011
I have an application in which the admin can upload files and the visitors of a website can download those files. I want to add an option that will allow admin to delete unwanted files from that folder how can this be done usin asp.net(vb).
View 16 Replies
May 18, 2010
I want to count number of mdb file in the folder.The folder contains both mdb and ldb files.I want to count only *.mdb files.How to perform count operation.But i am use the following code.It gives total counts.
files = Directory.GetFiles(Apppath + "/backup/");
numFiles = files.Length;
int flname = numFiles + 1;
View 8 Replies
Jan 4, 2011
how i sepuse to run mvc 2 there ?
at the moment im just getting the files from the main folder and placed it on the wwwroot folder (for my domain)
View 9 Replies
Feb 19, 2011
write a script in Visual Basic.
i want to be able to scan a folder and its sub directories for all the files that exist in it. the results are then feed into a list box or any similar control
additional it would be great if the results are entered and also its path
eg:
File1 C:folder1folder2file1.exe
File2 C:folder1folder2dd.dll
File3 C:folder1explorer.exe
File4 C:folder1folder2folder3document.docx
File5 C:folder1
eadme.txt
View 2 Replies
Sep 8, 2010
i want to copy the entire folder along with its contents from the client machine to the server where the application is deployed. i am using asp.net 3.5.
View 3 Replies
Mar 7, 2011
in sql how i get a no of files from a folder
suppose i have D:/xlfiles/
i have 10 .xls files in this folder
View 4 Replies
Jan 21, 2011
how to get the count of the number of files, if the file already exists in folder in C#.
View 2 Replies
Jun 2, 2010
I need to browse a folder to store a files.Can you explain how do I create this procedure?
View 3 Replies