File access problem with Web Service using COM Interop


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: File access problem with Web Service using COM Interop

  1. #1
    Join Date
    May 2005
    Posts
    2

    File access problem with Web Service using COM Interop

    I have been assigned the task of creating a Web Service wrapper around pre-existing Visual Basic ActiveX DLLs. I developed the service in ASP.NETand everything functions as expected, except one part.

    One of the tasks of the DLLs is to create a text file on the disk and write information to it. The DLL will work as expected when called by the original Visual Basic application but not when called by the ASP.NET Web Service. I keep receiving a file/path access error. Oh, and yes the path does exist on the disk. The Web Service is in VB.NET on v1.1 of the Framework. The service is running on IIS 5.1 on a Windows 2000 Server. The IIS security is Windows Authentication and Basic Authentication. The web.config is set to
    authentication mode Windows and identity impersonate true. Oh! and yes the ASPNET account has rights to access the directory. Any one have any idea as to why this is happening and possible solutions?

    Thanks

  2. #2
    Join Date
    Dec 2003
    Posts
    2,750
    If you're using impersonation then it should be the account (or accounts) that are being impersonated that would required sufficient permissions to access the file, and not the ASPNET account.
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  3. #3
    Join Date
    May 2005
    Posts
    2
    Paul,

    Yes, I'm using impersonation and the Impersonated user does have the necessary rights in the directory. This all works in the original VB6 application, but doesn't work when called by the .NET Web Service. The database functions work correctly the file access ones do not.

  4. #4
    Join Date
    Dec 2003
    Posts
    2,750
    Are the files you are trying to access on the web server (where you are authenticating)?
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center