none
Access Database Engine 2010 Redistributable should not be called from an ASP.NET web application? RRS feed

  • Question

  • We have a .NET application that allows the user to upload account information via Excel spreadsheet.  I have written a simple WCF service that parses the data in an Excel spreadsheet into usable datasets using Microsoft.ACE.OLEDB.12.0.  I realized that it wasn't working once I deployed it to the server because I don't have an installation of Microsoft Office (including the required database engine) on the server running the service, so I simply installed the Microsoft Access Database Engine 2010 Redistributable provided at the Microsoft Download Center.

    The problem is that one of our infrastructure guys doesn't want that database engine installed on the server because of this section in the "Details" portion of the download page, stating that this engine is NOT intended:

    "To be used by a system service or server-side program where the code will run under a system account, or will deal with multiple users identities concurrently, or is highly reentrant and expects stateless behavior. Examples would include a program that is run from task scheduler when no user is logged in, or a program called from server-side web application such as ASP.NET, or a distributed component running under COM+ services."

    Why is this?  What issues might arise if we do call my WCF service using this engine from an ASP.NET application?  We need to know so that we can make a decision.  If we really shouldn't use it, is there an alternative that we could use to avoid the issues with this engine?




    • Edited by JaromP Monday, August 19, 2013 3:59 PM
    • Moved by Tony Chen CHN Tuesday, August 20, 2013 7:46 AM •_Programming/Code related
    Monday, August 19, 2013 3:58 PM

Answers

  • Hi JaromP,

    I think the comments you found about the access oledb provider is just like the following comments about  office automation in server-side applications (like ASP.NET, webservice, WCF ,etc...). Since the Office object model is based on COM which is not intended to use in multi-threading and concurrent environment.

    #Considerations for server-side Automation of Office
    http://support.microsoft.com/kb/257757/en-us

    #[Support Policy] Considerations for server-side Automation of Office
    http://blogs.msdn.com/b/chayu/archive/2011/11/10/support-policy-considerations-for-server-side-automation-of-office.aspx

    If you do need to parse or read information from Excel sheet in server-side application, you can consider the following options:

    1) If the excel sheet are of Office 2010 or later, we can try using Open XML SDK for manipulate it.

    #Open XML SDK 2.0 for Microsoft Office
    http://www.microsoft.com/en-us/download/details.aspx?id=5124

    #Working with Open XML and Excel
    http://msdn.microsoft.com/en-us/office/ee358824.aspx

    2) You can convert Excel sheet to CSV file (if the data in sheet is not complicated) and parse CSV content through .NET text/string manipulation APIs.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by JaromP Thursday, August 22, 2013 9:36 PM
    Tuesday, August 20, 2013 11:33 AM
    Moderator

All replies

  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Office, I'll move your thread to the MSDN forum for WFC

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    George Zhao
    TechNet Community Support



    Tuesday, August 20, 2013 6:34 AM
  • Hi JaromP,

    I think the comments you found about the access oledb provider is just like the following comments about  office automation in server-side applications (like ASP.NET, webservice, WCF ,etc...). Since the Office object model is based on COM which is not intended to use in multi-threading and concurrent environment.

    #Considerations for server-side Automation of Office
    http://support.microsoft.com/kb/257757/en-us

    #[Support Policy] Considerations for server-side Automation of Office
    http://blogs.msdn.com/b/chayu/archive/2011/11/10/support-policy-considerations-for-server-side-automation-of-office.aspx

    If you do need to parse or read information from Excel sheet in server-side application, you can consider the following options:

    1) If the excel sheet are of Office 2010 or later, we can try using Open XML SDK for manipulate it.

    #Open XML SDK 2.0 for Microsoft Office
    http://www.microsoft.com/en-us/download/details.aspx?id=5124

    #Working with Open XML and Excel
    http://msdn.microsoft.com/en-us/office/ee358824.aspx

    2) You can convert Excel sheet to CSV file (if the data in sheet is not complicated) and parse CSV content through .NET text/string manipulation APIs.


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by JaromP Thursday, August 22, 2013 9:36 PM
    Tuesday, August 20, 2013 11:33 AM
    Moderator