Using COM component in C# Web Service accessing remote network resources



Hi -

I have a web service which needs to use a C++ COM component. The ws runs
under an NT service account and allows impersonation. The directory security
allows anonymous access using the NT service account.

The ws uses the COM component to carry out some processing. When I try and
use the COM component inside the ws the call enters the component correctly
but has issues when I try and access network resources (it needs to load the
configuration from the network).

A file that I know exists on a network UNC path reports that it doesn't
exist (GetFileAttributes returns -1 (aka INVALID_FILE_ATTRIBUTES)). The
account has rights to the specified network directory and file.

If I write a simple C# application to call the same method in a C# console
application it works both when run under my NT account and also the NT
service account (using RUNAS).

Calling GetUserName inside the COM component reports ASPNET even though: i)
the service is run under the NT service account, ii) I've allowed
impersonation, iii) I've tweaked settings inside of DCOMCNFG to force the
COM component to run under the NT service account both under "COM+
applications\IIS in-process applications" and also in "DCOM config"
(although I cannot see why I'd need to do this; I know Word automation
requires this but that's another story).

Someone mentioned that threads could cause an issue but there is no
threading evident: the COM component implements a method and the ws calls it
using Interop.

Any help or other ides to try would be greatly appreciated?

TIA

- Andy


.



Relevant Pages

  • Re: Using COM component in C# Web Service accessing remote network resources
    ... component being loaded from a managed component which then needs to spin up ... base security being the ASPNET account. ... security allows anonymous access using the NT service account. ... to load the configuration from the network). ...
    (microsoft.public.dotnet.security)
  • Re: How do I copy a file using xp_cmdshell
    ... and SQL Server runs under the service account. ... Also, if you use UNC, make sure that the service account have permission on the share. ... The network name cannot be found. ... The path and filename ...
    (microsoft.public.sqlserver.programming)
  • Re: ADAM - Domain Service Account V.S. Network Service
    ... The advantage of using NetworkService is that all permissions are good by ... NETWORK SERVICE on a domain-joined box would be that there is an important ... instances of an ADAM instance using the same DNS name behind NLB and you ... service account so it can get the SPN for the DNS name. ...
    (microsoft.public.windows.server.active_directory)
  • Re: How to make my DC listen on the secure LDAP port (636)?
    ... I have a network device which needs to proxy a password change to my ... There is a service account I created ...
    (microsoft.public.windows.server.active_directory)
  • Re: restoring from network drive
    ... Try entering a UNC name for the name of the backup, ... Also note the MSSQLSERVER service account will need access to the network ... > The SQL service account has also been granted Local admin access on the PC ... drive - none of the mapped drives are available. ...
    (microsoft.public.sqlserver.server)