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

Posted on 2012-09-07
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

    Author Comment

    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


    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

    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

    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

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now