By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,224 Members | 1,120 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,224 IT Pros & Developers. It's quick & easy.

How to Enable Impersonation

P: n/a
I have been working my way through an ASP.NET tutorial and I find that any
code that attempts to update an Access table evokes the error: "Operation
must use an updateable query."

A search of the MSDN Knowledge Base turned up an article describing my
problem exactly and recommending that I

(a) Configure the ASP.NET worker proces to run under the SYSTEM account in
the <processModel> section of the Machine.config file.

or

(b) For security reasons, Microsoft recommends that you enable impersonation
on your ASP.NET application. This method works if the impersonated user has
necessary permissions to the computer and the database that you are accessing.

Unfortunately, I have been unable to find any information on how to
accomplish either of the above. I'm new to .NET and am still feeling my way
around. I'd greatly appreciate any advice.
Nov 19 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
That happens most commonly because the account ASP.NET
is using doesn't have write privileges to the directory where
the Access .MDB file is located.

An .LDB security file needs to be created in the same directory
where the .MDB file resides.

That will happen whether you impersonate or not,
since whichever account ASP.NET is running as
will need write permission to the directory.

Try giving the ASP.NET account write privileges to the directory
where the Access .MDB is located.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Sheldon Penner" <Sh***********@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
I have been working my way through an ASP.NET tutorial and I find that any
code that attempts to update an Access table evokes the error: "Operation
must use an updateable query."

A search of the MSDN Knowledge Base turned up an article describing my
problem exactly and recommending that I

(a) Configure the ASP.NET worker proces to run under the SYSTEM account in
the <processModel> section of the Machine.config file.

or

(b) For security reasons, Microsoft recommends that you enable impersonation
on your ASP.NET application. This method works if the impersonated user has
necessary permissions to the computer and the database that you are accessing.

Unfortunately, I have been unable to find any information on how to
accomplish either of the above. I'm new to .NET and am still feeling my way
around. I'd greatly appreciate any advice.

Nov 19 '05 #2

P: n/a
"Sheldon Penner" <Sh***********@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
A search of the MSDN Knowledge Base turned up an article describing my
problem exactly and recommending that I : : (b) For security reasons, Microsoft recommends that you enable impersonation
on your ASP.NET application. This method works if the impersonated user has
necessary permissions to the computer and the database that you are accessing. : : Unfortunately, I have been unable to find any information on how to
accomplish either of the above.


Option (a) was inadvisable because it gives ASPNET blanket power over your
system.

To enable impersonation for option (b), you just need to open the "web.config"
file in your web application and add an <identity> element under <system.web>
like this,

<identity impersonate="true" />

For more information, see the following help topics in the .NET Framework SDK,

http://msdn.microsoft.com/library/en...ersonation.asp
http://msdn.microsoft.com/library/en...itysection.asp
Derek Harmon
Nov 19 '05 #3

P: n/a
Thanks for your response, Derek. I have added a web.config file to the root
of the test application, as you advised, and I find that I still get the same
"...updateable query" message. However, if I specify my user name and
password in the identity tag, the data update succeeds without an error.

"Derek Harmon" wrote:
"Sheldon Penner" <Sh***********@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
A search of the MSDN Knowledge Base turned up an article describing my
problem exactly and recommending that I

: :
(b) For security reasons, Microsoft recommends that you enable impersonation
on your ASP.NET application. This method works if the impersonated user has
necessary permissions to the computer and the database that you are accessing.

: :
Unfortunately, I have been unable to find any information on how to
accomplish either of the above.


Option (a) was inadvisable because it gives ASPNET blanket power over your
system.

To enable impersonation for option (b), you just need to open the "web.config"
file in your web application and add an <identity> element under <system.web>
like this,

<identity impersonate="true" />

For more information, see the following help topics in the .NET Framework SDK,

http://msdn.microsoft.com/library/en...ersonation.asp
http://msdn.microsoft.com/library/en...itysection.asp
Derek Harmon

Nov 19 '05 #4

P: n/a
Thank you for your message, Juan. I tried your suggestion of giving the
ASP.NET account write privileges in the directory containing the mdb file,
but no dice, I continue to get the same error.

Derek Harmon wrote suggesting I create a web.config file and include an
identity tag containing 'impersonate="true"'. I find that this works if I
also specify my login name and password; otherwise, same old error.

"Juan T. Llibre" wrote:
That happens most commonly because the account ASP.NET
is using doesn't have write privileges to the directory where
the Access .MDB file is located.

An .LDB security file needs to be created in the same directory
where the .MDB file resides.

That will happen whether you impersonate or not,
since whichever account ASP.NET is running as
will need write permission to the directory.

Try giving the ASP.NET account write privileges to the directory
where the Access .MDB is located.


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Sheldon Penner" <Sh***********@discussions.microsoft.com> wrote in message
news:74**********************************@microsof t.com...
I have been working my way through an ASP.NET tutorial and I find that any
code that attempts to update an Access table evokes the error: "Operation
must use an updateable query."

A search of the MSDN Knowledge Base turned up an article describing my
problem exactly and recommending that I

(a) Configure the ASP.NET worker proces to run under the SYSTEM account in
the <processModel> section of the Machine.config file.

or

(b) For security reasons, Microsoft recommends that you enable impersonation
on your ASP.NET application. This method works if the impersonated user has
necessary permissions to the computer and the database that you are accessing.

Unfortunately, I have been unable to find any information on how to
accomplish either of the above. I'm new to .NET and am still feeling my way
around. I'd greatly appreciate any advice.


Nov 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.