Wednesday, March 7, 2012

rda.Pull ACCESS DENIED

Folks,
I asked this in the SQL Server CE newsgroup but got no response.
I am trying to do an rda.Pull from a SQL Server 2005 (SP1) database to a
Pocket PC. This worked just fine from SQL Server 2000. However, I am now
getting an error: (HResult = -2147024891), which is a general Access Denied
error.
I know I have permission to access the table I am trying to Pull, because I
am able to execute an rda.SubmitSql that SELECTS COUNT(*) and stores the
result into a test table. This demonstrates that I have permission to
connect to the database and select from the table. But I do not have
permission to Pull the data.
If I try to perfom this test SELECT via rda.SubmitSql on a table to which I
do not have permission, I get a well-formatted exception, which details the
permision violation. However, the rda.Pull simply throws an exception with
an HResult =
-2147024891.
By the way, the value of tracking options makes no difference.
Any suggestions are gratefully appreciated.
/Joel Finkel
finkel@.sd-il.comThis problem was solved by changing the ACL for the user account by which
Anonymous Access to the web site is given. By default, this user is not
given Write access to the Virtual Directory. Once this user was given Write
access, the rda.Pull function worked.
Note: I use a specific account to provide Anonymous Access so that it can
map to a specific SQL Server Login. This Login is then be mapped to a
specific Database User that has the limited security rights to access only
those tables that are absolutely required.
I do not know if this is the best practice, and would like to know of a
better way to do this.
/Joel Finkel
finkel@.sd-il.com
"Joel Finkel" wrote:

> Folks,
> I asked this in the SQL Server CE newsgroup but got no response.
> I am trying to do an rda.Pull from a SQL Server 2005 (SP1) database to a
> Pocket PC. This worked just fine from SQL Server 2000. However, I am now
> getting an error: (HResult = -2147024891), which is a general Access Denie
d
> error.
> I know I have permission to access the table I am trying to Pull, because
I
> am able to execute an rda.SubmitSql that SELECTS COUNT(*) and stores the
> result into a test table. This demonstrates that I have permission to
> connect to the database and select from the table. But I do not have
> permission to Pull the data.
> If I try to perfom this test SELECT via rda.SubmitSql on a table to which
I
> do not have permission, I get a well-formatted exception, which details th
e
> permision violation. However, the rda.Pull simply throws an exception wit
h
> an HResult =
> -2147024891.
> By the way, the value of tracking options makes no difference.
> Any suggestions are gratefully appreciated.
> /Joel Finkel
> finkel@.sd-il.com
>

No comments:

Post a Comment