Search code examples
iisasp-classicoledbvisual-foxpro

Microsoft OLE DB Provider for Visual FoxPro: Invalid path or file name


I'm able to connect to my VFP database when running my classic ASP site locally w/ Visual Studio and IIS Express but when I deploy to a server on IIS it get:

Microsoft OLE DB Provider for Visual FoxPro: Invalid path or file name

From a comment on this post, I see the problem is probably related to permissions but I've got the application pool running under a domain account that has access to the UNC where the DB resides.


Solution

  • I changed my authentication on anonymous access from IUSR to the Application pool identity and it started working.

    IIS Manager -> Website -> Authentication -> Anonymous Authentication -> Edit

    iis auth anonymous setting

    After changing that, the database access must be using the service account now. I guess there's a difference between ASP.NET and Classic ASP? 🤔


    References how I arrived at this answer

    I found this post which talked about anonymous access which got me thinking more about "classic asp run under service account". That Google search lead to me to this SO post:

    Classic ASP runs impersonating the user who is authenticated to the server in the HTTP session.