Compile and generate an Excel fileProgramIn Windows 20003, a component named {000209ff-0000-0000-c000-000000000046} in the com class factory failed to be retrieved because of the following error: 8000401a. Error. "The main solution on the internet is:
1. http://support.microsoft.com/kb/288366
2,The solution is as follows:
1:Install the Excel software for office on the server.
2:In"Start"->"Run"Input dcomcnfg.exe to start"Component Service"
3:Double-click"Component Service"->"Computer"->"My computer"->"DCOMConfigure"
4:In"DCOMConfigure"."Microsoft ExcelApplication", Right-click it, and then click"Attribute", Pop-up"Microsoft ExcelYing
Application attributes"Dialog Box
5:Click"Identifier"Label, select"Interactive User"
6:Click"Security"Tag, in"Start and activate Permissions"Click"Custom"And then click the corresponding"Edit"Button."Security"Add in the dialog box
One"Network Service"User (note that you must select the computer name) and assign it"Start locally"And"Local activation"Permission.
7:Still yes"Security"Tag, in"Access permission"Click"Custom"And then click"Edit", In the pop-up"Security"Add one in the dialog box"Network
Service"User, and then grant"Local access"Permission.
In this way, we have configured the corresponding Excel DCOM permissions.
Note: This is configured on win2003. on 2000 and XP, It is configured as an ASPnet user.
Because Excel is opened on the server, you should write a method to save the exported data on the server and pass it to the client.
Use this function to delete all Excel files generated on the server.
----------
None of the above two methods will work for my results.
References:
Simply record my solution:
1. Create a user account and set the user to be a power user or user;
2. Run dcomcnfg. In the DCOM component, find the Microsoft Excel application or Microsoft Excel document-properties-icon and select "specific user ", then, enter the account and password created earlier;
3. Add a fulcrum <identity/> to the Web. config configuration file;