Recently made an Excel Import Database page, in VS2012 native debugging import xls\xlsx all passed smoothly, but in the Web environment import error!
The most likely reason for the information on the web is the problem with the permissions configuration of the Excel application in DCOM .
(DCOM is based on Component Object Model (COM), COM provides a set of interfaces that allow communication between clients and servers on the same computer)
Configuration steps (native win8.1 64Bit Office2010 64Bit):
1. Run-dcomcnfg-Component Services-computer-My Computer-dcom configuration-Find Micosoft Excel application or micosoft Excel application-right-click Properties;
2. Click on "Mark" tab-select "Interactive User";
3. Click on Security "tags"-click "Customize" on "Launch and activation Rights", then click on the corresponding "edit" button to add a "NETWORK SERVICE" user in the "Security" dialog box (note To select this computer name) and give it "local launch" and "Local activation" Permissions
4. Still the "Security" tab, click "Customize" on "Access", then click "Edit" to add a "NETWORK SERVICE" user to the "Security" dialog box, and then give "local access" permission;
Configuration Complete!! Open the Web test now! xlsx Import Successful !! But importing XLS is still a mistake!!!!!!
Continue to check the data, through the Webconfig in the simulation administrator rights, <identity impersonate= "true" username= "system Administrator" password= "system Administrator Password"/> the problem is still unresolved!
Finally on the Internet to see a 64-bit system under the ASP is not supported by ODBC Read Access database, you need to set the IIS application pool Advanced settings one item enabled 32-bit application: TRUE.
Think of using OLE DB to read Excel, try to enable the 32-bit application, problem solving!! xls import succeeded !
Experience: Under 32-bit systems, the issue of DCOM permissions is basically resolved, and 64-bit systems should also focus on IIS setup issues.
. NET site debugging through, after the publication of Excel import database error problem resolution