. NET site debugging through, after the publication of Excel import database error problem resolution

Source: Internet
Author: User
Tags administrator password import database

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.