Connection string working for WinForm but not working for asp.net

-- -- 957 Reputation points
2024-04-02T22:11:38.78+00:00

Hi

In a net framewok WinForm app below connection string works in x86 and Any CPU active platforms.

connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Password=;User ID=Admin;Data Source=' S:\MyPath\MyDB.mdb';Mode=Share Deny None;"

However in asp.net classic same connection string in Visual Studio debug (IIS Express) comes out with errors as below;

x86: Could not load file or assembly 'xxxxxxx' or one of its dependencies. An attempt was made to load a program with an incorrect format.

Any CPU: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.

Same machines was used for both WinForm and asp.net classic.

How can I make the connection string work in asp.net classic?

Thanks

Regards

Microsoft 365 and Office Access Development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Olaf Helper 47,436 Reputation points
    2024-04-03T11:16:46.0133333+00:00

    **S:**MyPath\MyDB.mdb

    What for a drive is S:? A local drive, SAN or NAS? Do the IIS service account have access to?


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.