Deny access to all my .mdb in a directory  
Author Message
ZopoStyle





PostPosted: .NET Framework Data Access and Storage, Deny access to all my .mdb in a directory Top

how can I deny access to download to a .mdb file in a directory

and If I deny access my application can open it to read data

Thanks




.NET Development36  
 
 
Paul P Clement IV





PostPosted: .NET Framework Data Access and Storage, Deny access to all my .mdb in a directory Top


I'm not sure if I completely understand your question, but you can make the folder where the database resides read-only for all users (except for an administrator). This will prevent any files from being copied to the folder.

The Access database must then be opened for read-only access by your application.



 
 
ZopoStyle





PostPosted: .NET Framework Data Access and Storage, Deny access to all my .mdb in a directory Top

I mean by the web.config... Is there a way

 
 
Paul P Clement IV





PostPosted: .NET Framework Data Access and Storage, Deny access to all my .mdb in a directory Top


No, the web.config file does not provide this capability.

 
 
ZopoStyle





PostPosted: .NET Framework Data Access and Storage, Deny access to all my .mdb in a directory Top

But I can deny access to some .aspx file and make it ask form login form..can I use the same

 
 
Paul P Clement IV





PostPosted: .NET Framework Data Access and Storage, Deny access to all my .mdb in a directory Top


AFAIK this only applies to application specific resources served up by IIS:

How To Make Application and Directory-Specific Configuration Settings in an ASP.NET Application
http://msdn.microsoft.com/library/default.asp url=/library/en-us/cpgenref/html/gngrflocationelement.asp

You can try and see if something will work with an Access database but ultimately I think you will have to use NTFS permissions.