Access Btrieve from .Net web service - 05-15-2004 , 12:06 PM
Hope someone can help with this.. I'm running Pervasive 2000i on
Win2K domain controller. Both transactional and SQL engines are
running BUT I only use transactional. The only protocol used is
tcp/ip. All workstations are Win2k Pro.
There is no problem with Btrieve data access from normal windows
client programs - this has been working for years.
Now I have written a Web Service in VC++ .NET (mixed mode-managed and
unmanaged code). I have interfaced this web service to the Btrieve
requester though my old (working) DLL that wraps calls to the Btrieve
The Web service runs on one of the workstations (for now, later it
will run on a separate web server machine). When I try to open a
Btrieve file on the domain controller (across the lan, no firewall
between), I get error 94, permission problem. The user has admin
privileges on both the workstation and on the server. On the server,
examining the security log shows a logon failure.
If I don't turn on impersonation in the web.config file (remember this
is on the workstation), then the user name shown in the logon failure
is ASPNET. When I turn on impersonation the failure continues but the
user name changes to my logged in name and workstation. Adding a user
name and password to the impersonation line causes the domain of the
failed logon to change from the workstation to the server - But it
When impersonation is off, the web service also cannot open a simple
text file (with fopen for instance), and I get the logon failure for
user ASPNET. This is expected, but when I turn on impersonation,
either with or without a domain/user and password, I can access text
files in the same directory as the Btrieve file I am trying to open.
One additional thing I see that may be related is that the failed
logon shows the logon process for the Btrieve open attempt to be
Advapi, whereas when opening the text file the logon process is
Somehow, it seems I have to be able to tell Btrieve engine to use
proper credentials when logging in.
Any help please?
Thank you, Russ
Re: Access Btrieve from .Net web service - 05-17-2004 , 08:36 AM
My understanding is that any web service will inherit the user name of the
IIS process (IUSR_*). This may have changed in newer OS'es, though. Try
granting this user full Administrative rights for a short time (do NOT
leave this set permanently) and see if this fixes the rights issue.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
BillBach (AT) goldstarsoftware (DOT) com
*** Pervasive.SQL Service & Support Classes ***
Chicago: June, 2004: See our web site for details!