views:

667

answers:

2

I have a website I've built in VS2005, C#, .NET 2.0. This website does transactions against an Access database. It works fine in development. The mdb file resides in App_Data

I have setup IIS on this machine to test the website as it would be deployed. I published the site to my IIS virtual directory. All went well.

Whenever I try to update, insert, or delete I get the above error "Operation must use an updateable query."

I have applied the following permissions to the App_data folder:

machinename/IUSR - modify
machinename/ASPNET - modify
NETWORK SERVICE - modify
domainname/myaccount - full

I even went crazy and gave the group EVERYONE full permissions, but that didn't work either.

In my web config I have the following line:

<identity impersonate="true"/>

This line is to impersonate my login account to provide access to the application.

I still cannot perform insert, update, or delete queries. Any ideas?

UPDATE:

Thanks for the response. I have read that article. I have also read about the first 4 pages of google results and all of them talk of permissions to the DB folder. I have followed all suggestions, with no results.

  1. My permissions are set as the MS article describes.
  2. The database is being opened in the correct mode, else it wouldn't work while testing.
  3. I'm not using ODBC, so that's out.
  4. I'm not using SQL server, so that's out too.
+1  A: 

The user (impersonated or the asp user) must have the permission to create files in the directory because Access creates a .ldb file.

Other possible reasons are described in the MS Knowledgebase

UPDATE: Did you check the effective permissions? Maybe inheritance comes into play here, because of an explicit deny.

H-Man2
Thank you. There was an explicit deny (for some reason) on the IUSR account which I found by viewing the effective permissions for that account. Once I fixed that up, I was good to go.
somacore
A: 

Thanks for the response. I have read that article. I have also read about the first 4 pages of google results and all of them talk of permissions to the DB folder. I have followed all suggestions, with no results.

  1. My permissions are set as the MS article describes.
  2. The database is being opened in the correct mode, else it wouldn't work while testing.
  3. I'm not using ODBC, so that's out.
  4. I'm not using SQL server, so that's out too.
somacore
Don't post an answer unless you are actually answering your own question. If you want to comment on someone else's answer, either update your question, or click 'add comment' below their answer.
George Stocker
My posted answer was relevant to the conversation and not meant for a comment.FAQComments should be used for meta-discussion about a post which does not contribute to the content of the post directly. They are sometimes used to point out factual errors in a post, or to discuss subjective issues.
somacore
Ironically, your comment admonishing me for nothing in particular, which was off topic and unnecessary, was within the FAQ guidelines for a comment.
somacore
Nag if you like, but the -1 was a bit much. Nullified.
CodeSlave