asmx service won't run using oledb, apparently jet won't run under 64bit

Posted on 2012-09-07
Medium Priority
Last Modified: 2012-09-10
Dear Experts,

I am trying to write my first web service ever.. it's supposed to open up an access database, import in the data and save it into a sql database. I have working code that will do this in a regular program, but the problem with the regular program is when I ftp'd the file up it wouldn't see it (filesystemwatcher) for some reason and wouldn't import it in.
So I thought, alright, let's make this a web service that I can call from our local computer at the office after it uploads the file and then the web service can automatically bring it in. Sounds good, right?

The last line in my code below is where it errs..
The error is:
The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine

I know that there is no 64 bit oledb library and I think that is why it is throwing the error.
I have done some research and determined that if I go into the iis manager I can cause the site to run entirely in 32 bit mode by enabling it. I really would rather the site run the way it is, since it runs so wonderfully, but maybe just make the asmx page itself run under 32 bit. Is this possible or does anybody have a more elegant solution?

Thanks! ~Jeffrey

Dim sAccessConnStr As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source='" & cAccessDBPath & _
            "';Persist Security Info=True;"
        Dim sSQLConnStr As String = System.Configuration.ConfigurationManager.ConnectionStrings _
        Dim sGetQry As String = "Select * From Daily_SalesData;"
        Dim sSaveQry As String = "Select * From dbo.Daily_SalesData;"
        Dim accessTable As DataTable, sqlDS As DataSet, sqlTable As DataTable
        Dim sqlAdapter As SqlDataAdapter, sqlBuilder As SqlCommandBuilder

        'Begin by reading in the table from access into a datatable
        Dim iRowsAffected As Integer, sStatus As String = ""
            sStatus = myFuncs.AddStringArg(sStatus, "Connecting to Access DB..", vbCrLf)
            Using accessConnection As OleDbConnection = New OleDbConnection(sAccessConnStr)
                Dim accessAdapter As OleDbDataAdapter = New OleDbDataAdapter(sGetQry, accessConnection)

Open in new window

Question by:JeffreyDurham
  • 3

Author Comment

ID: 38378343
I'm also trying to understand what application pools are and what they do. It seems like my entire website is running under the same application pool. But, does it make sense to perhaps separate my site from the asmx pages and somehow tell them to run under a separate application pool, where I can enable 32 bit? That way if my web service crashes the website doesn't? If I do this, can I keep them all in the same wwwroot folder as my website, just under a WebServices directory, maybe?
LVL 10

Accepted Solution

gaurav05 earned 2000 total points
ID: 38378799

If your webservice in 32 bit mode application then you have to

configure your .asmx webservice individually in iis..

and create separate application pool and assigned to that application.

After assigning that pool you can set 64-bit mode settings to FALSE in application pool .settings

Yes you can kept in same wwwroot folder, but under root folder you have to
create separate folder for webservice.

-Let us know...

Author Comment

ID: 38383569
Ok, so I guess I'm on the right track then. I'll try to figure out how to configure those things right now.
Does the asmx need to be compiled like a true application, or is it just like any other web page, where it's just a page in a folder somewhere?

Thanks! ~Jeffrey

Author Comment

ID: 38383656
Alright, I was able to set up an application pool and went to the advanced settings in IIS (I have 7.0) and set Enable 32-Bit applications to True. I also created a subdirectory and stuck the asmx page inside of it and went to the sites drop down in the IIS connections tab. I am now working on determining how to make my asmx an application and I think this'll work.

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses
Course of the Month14 days, 2 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question