UHCL Banner

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

  1. Map your course hosting folder.
  2. 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.
  3. Map your course folder.
  4. Right-click your uploads/databases folder and select "Properties".
  5. Open the security tab and click on the "Edit" button.
  6. In the upper scroll window click on "IUSR".
  7. Once "IUSR" has been selected, mark the checkbox label "Write" in the lower scroll window.
  8. Add write permissions for IIS_USRS as well.
  9. Click "OK".
  10. 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"));