dbTalk Databases Forums  

Access Btrieve from .Net web service

comp.databases.btrieve comp.databases.btrieve


Discuss Access Btrieve from .Net web service in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Russ
 
Posts: n/a

Default 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
requester.

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
still fails!

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
Kerberos.

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


Reply With Quote
  #2  
Old   
Bill Bach
 
Posts: n/a

Default 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)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Pervasive.SQL Service & Support Classes ***
Chicago: June, 2004: See our web site for details!


Russ wrote:

Quote:
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
requester.

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
still fails!

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
Kerberos.

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


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.