Home All Groups Group Topic Archive Search About

I keep receiving a file/path access error.

Author
2 May 2005 9:53 PM
LeRoy Bainbridge
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.NET
and 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. Any one have any
idea as to why this is happening and possible solutions?



Thanks

Author
3 May 2005 11:56 AM
Nicole Calinoiu
A few questions:

1.  What is the exact error message?
2.  Is the file on a local disk or on another machine on the network?
3.  Does the code ever an attempt to replace or append to an existing file?
If so, is the file marked read-only?
4.  Does WindowsIdentity.GetCurrent return the account you expect when run
from within the web method that initiates the file-writing sequence?
5.  Does this user have permissions to create new files and modify existing
files in the target directory?
6.  If you run the old VB app under the same user context on the web server,
targeting the same file, does the same error occur?



Show quoteHide quote
"LeRoy Bainbridge" <lbainbr***@voltdelta.com> wrote in message
news:%23v7iZE2TFHA.3392@TK2MSFTNGP12.phx.gbl...
>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.NET
> and 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. Any one have
> any
> idea as to why this is happening and possible solutions?
>
>
>
> Thanks
>
>
Author
3 May 2005 1:21 PM
swat
I'll add another question to Nicole's list of questions:

7. Did you explicitly pass the user credentials to the web service by
setting the Credentials property on the web service?
Author
3 May 2005 1:55 PM
Nicole Calinoiu
If only basic and Windows authentication are enabled under the IIS settings,
the web method should never be invoked if appropriate credentials are not
received by the server.  Since an exception is being thrown from server-side
code (i.e.: server-side code is actually being run, problems or not <g>), it
seems safe to assume that the client is providing acceptable credentials.



Show quoteHide quote
"swat" <loka_1***@yahoo.com> wrote in message
news:1115126506.728401.186370@f14g2000cwb.googlegroups.com...
> I'll add another question to Nicole's list of questions:
>
> 7. Did you explicitly pass the user credentials to the web service by
> setting the Credentials property on the web service?
>