Web Uploads and Filesystem Databases on DCMWEB
If you are getting error messages in your web application during file uploads or when trying to write to a file system database like .mdb or .yap, try following the steps.Enabling write access for file uploads/databases
- Map your course hosting folder.
- Create a folder for uploads/databases. Reserve this folder for uploaded files/database files in your application. Running scripts from this folder could be dangerous.
- Map your course folder.
- Right-click your uploads/databases folder and select "Properties".
-
Open the security tab and click on the "Edit" button.
- In the upper scroll window click on "IUSR".
-
Once "IUSR" has been selected, mark the checkbox label "Write" in the lower scroll window.
- Add write permissions for IIS_USRS as well.
- Click "OK".
- You may now upload files and write to databases with your application.
Databases in .NET
If you are trying to use a file system database in .NET, the database should be located in your App_Data folder. Use Server.MapPath to access the file. "~" is the root of your application. App_Data should have write permission set on in like the example above.
IObjectContainer db = Db4oEmbedded.OpenFile(Server.MapPath("~/App_Data/db4o.yap"));