C# - Grant Access To Write And Read From A Folder To Application?
Apr 22, 2010I need to allow my asp.net application to read and write from and to a folder.
View 2 RepliesI need to allow my asp.net application to read and write from and to a folder.
View 2 RepliesWe store backup archives in subfolders of a folder on one of the server's external USB drive. I would like to have an ASP.NET app read the contents of this folder so the manager can view the backup files to confirm backups are working and optionally delete these backup files when an old drive is reconnected so it can be used for the next weeks backups.
This backup folder is oubviously outside the server's webroot. Is there some way I can grant authority so the ASP.Net app can access this folder for this purpose? I would be using VS Web Express, so can't create any signed packages and such.
Server Error in '/' Application. Attempted to read or write protected memory. This is often an indication that other memory is corrupt.Description: An unhandled exception occurred during the execution of the current web request. review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[code]....
Is there anything missing in IIS 6.0 that prevents me from (Insert into table) using MS-Access?
Explain: The application works fine under Visual Studio 2008 IDE the insert into table works fine with no error, Also I tested with hosting provider and works fine with no problem. but now I have published the same exact app in a dedicated server windows 2003 with
IIS 6.0 .NET framework 2.0 with latest service pack I gave IIS_WPG write/modify access to the folder where MS-Access database is located and database but at the time of insert an error pop-up. I need to install in the Server or settings in the IIS to recognize my MS-Access db is it some office runtime that I am missing. (BTW I am using OLEDB connection string in my C# )
Using System.Data.OleDb;
I can retrieve data off of it with no problem but when I try to insert is when it fails I thought the problem was Access Rights but I do not think is the case.
I need to set folder permission programmaticcaly which is in my GoDaddy server. I have nearly 150 folders in my server so I cant change through server settings or IIS settings. I am using web application. My folder may go on increase in future.I have googled a lot of things.
1. Like Access Control List in System.SEcurity namespace
2.System.principl.security...
I cant able to change the file permission but not a directory.
I must allow all the users to write or move a file to the folder which is in read only mode. That should be done programmatically and should be dynamic.
i need vb code how to read and write an image to access data base
how to read it from dataTable object and store it in my application as image object
An associate wants to store an Access database in the App_Data folder of a website that lives on a local server and write new data to it daily from Microsoft Access on a client computer on the local network.Internet users will access the Access data from the website.
Is it possibe to write to an Access database in the App_Data folder of a website that lives on a local server using Microsoft Access? And also connect and read with ASP.Net?The internet connection is "Read Only".
I'm using Visual Studio 2008 on my local PC. My Code kept on network Drive. when i am trying to run it from my local machine i am getting below security exception.is there anyway i can Grant Permissions to network folder?
*Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I am developing a web application using asp.net 4.0, vb.net 4.0 and Sql-Server 2005 as backend. I want to implement read only or read/write permissions for a particular logged in user. Ex : I have a Purchase order page, now I want to assign only view permissions to a particular user and read/write permissions to another user. what would be the best way to do it ? Use authentication and authorization provided by .Net or implement custom authentication and authorization ?
View 2 RepliesI want to read write excel file in my application without installing the office on my server. Means my server don't have any excel (MS office) installation. Is it necessory to install the office on server to excute the program of read or write the excel file.
View 5 RepliesI have wav/mp3 files that I want to grant access to only users after signing into my webapp. I have the user credentials being checked through a mySQL db. I do not want the files to be able to be accessed by url. I have found that adding the mime type to the web.config section at
[Code]....
will disallow access to the files by url, but how can I allow access programmically to the files after signing in?? Currently using godaddy hosting.
I need to read a table from a dtgrid there is one code for example?
View 5 RepliesI have a web app that uses AD to authenticate the user which works great. But i received a request where a user that is outside of the Ad needs access to the application.
Is there a way to add this user manually (Maybe in web.config) to allow them to access the application?
I have an MVC 3 application which uses asp.net authentication. I have just created a custom errors controller and a couple of views for unknown errors and 404's. This works fine when I am logged into the application but if an internal server error happens during logon I would like to display the error/unknown view. However I just keep getting redirected back to the login as I am not authenticated.
I have added a location path for 'Views/Error' to my Web.config to allow access to all users but I am guessing it's the controller access that is causing the redirection.
Is there any way you can allow this in MVC or do I need to think of another solution? Just did not want to add a generic message to the login page as that's what my unknown error view is for.
i want to keep the database in the root folder of my application.what would be the connection string ?
View 1 RepliesI want to access all the files in a folder to add to a listbox and show to the user.
I know I can access a folder when it's a windows application. But in web application, is this possible? If yes, how?
Something like FolderBrowserDialog??
I want to grant access to some ressources located on server only for specified web pages, how could I do this?
For example I have an image www.mysite.com/images/image.jpg and something like <img src="www.mysite.com/images/image.jpg" /> should only work on site asp.net.
Is it possible with web.config or maybe with some C# code?
I would like to write an MVC application that accesses multiple data stores (SQL Server, MySQL, Cloud based, etc.).Most of the examples I see use LINQ to SQL for their data access but I read somewhere that LINQ only supports SQL Server - it may have been an old post.I was wondering what the best way to access these different data stores would be. Can I use the Data Access Application Block from MVC to access these data stores?
View 4 RepliesI would like to read all content that's been written to the output stream. I'm attempting to do this using an HTTP module, and it seems like the obvious timing would be when handling the PreSendRequestContent event.
However, if the output stream seems to be set to write-only, as I can't read using a StreamReader. Is there a way I read and re-write the content without writing my own IIS module?
I'm working on an ASP.NET application that accesses Team Foundation Server 2010 and creates new work items. The application is running in the DefaultAppPool, using NetworkService as the identity. I'm getting the error below:
[UnauthorizedAccessException: Access to the path 'Cachev10' is denied.]
[code]....
We were able to work around the issue by turning the Cache folder into a network share and giving NetworkService full access to the share. I'd prefer not to have to do this, but it seems to be working correctly now.
I've a default.aspx page in my application's root folder. I added a a page in the root of inetpub that redirects requests to the default page. The idea is that the user need only enter the server name to get to the default page. How can I set things up so that all users have access to the default.aspx and that they only have access to the other pages once they've been authenticated?
I am using Windows Integrated Security and the users are being challenged and authenticated properly. I want them to be able to access Default.aspx without any challenges.
(On a side note which may answer this question, when using WIS does the user *allows* have to be challenged? Isn't it possible to pass through their Windows User and ID without the prompt?)
c: inetpubwwwroot
edirect.aspx (set as default document in IIS and simple executes Response.redirect("sites/mercury/default.aspx")
c:documents and settingsall usersdocumentswebsitesmercurydefault.aspx (home page for the site & server)web.config includes
[Code]....
I have a database with tons of SP. Is there a way to grant a new user access to all SP so the user can execute then?If the SP inserts data in a table do I have to grant the the user that executes the SP so he/she is allowed to insert data
View 2 RepliesI am ristrcting access to the Account folder using below:
<location path="Account">
<system.web>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
</system.web>
</location>
and access to the Default.aspx using
<location path="Default.aspx">
<system.web>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
</system.web>
</location>
but how do i restrict access to a specific file in the Account folder rather than the entire folder?
I tried the following but did not work
<location path="AccountChangePassword.aspx">
<system.web>
<authorization>
<deny users="?"/>
<allow users="*"/>
</authorization>
</system.web>
</location>
I have a class file stored in the app code folder. A certain page that I want to access is inside its own folder within the root and it is using the namespace within the class file in the app code folder. How do I tell the application where the file is? I'm sure I could put the code in a file inside my folder, but I'd rather not have duplicate code in two different files... unless there is a way to make a reference of some type.
View 1 RepliesI have an asp page that needs to download files off of a virtual directory.
I wanted to add the virtual directory to the Visual studio app.