System.Data.Common Assembly Error after Adding Npgsql to Custom Web Service

Hi everyone,

I’m working on a custom web service and tried integrating Npgsql. After encountering a "no namespace found" error, I took the following steps:

  1. Added the Npgsql.dll file to the Tearsoft.web/bin directory.
  2. Modified the web.config file with the following binding redirect:

    xml
     

  3. <dependentAssembly>
        <assemblyIdentity name="Npgsql" publicKeyToken="5d8b90d52f46fda7" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-8.0.5.0" newVersion="8.0.5.0" />
    </dependentAssembly>
  4. Restarted the IIS server.
  5. Flushed Redis via the Clio CLI.

After these steps, I'm now facing the following error: Could not load file or assembly 'System.Data.Common, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. (Screenshot attached for reference)

I've already checked assembly binding logging, but I’m unsure how to resolve this error. Any suggestions or help would be appreciated!
 

Additional Context:

  • Working with PostgreSQL using Npgsql in the custom web service.
  • I made changes to the web.config file after adding the Npgsql DLL.


    this is the current state for my local instance .
     

Thanks in advance!

Like 0

Like

0 comments
Show all comments