티스토리 뷰
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
쇠주는참이슬 2012. 5. 6. 23:30* ID를 대화형 사용자로 작성하는 경우 원격 세션이 끊어지면 작동하지 않는다.
특정사용자로 아이디를 설정해놓고 해야함.
*
If you add a reference to Microsoft Excel and then try to use it within your ASP.NET application you may receive the following error.
Server Error in '/excel' Application.
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
Example Application
The problem is that by default Microsoft Excel as a COM object can only activated by the following accounts:
- Administrator
- System
- Interactive
When you are running your ASP.Net account on Windows XP your web application is running as the ASPNET account.
The way to resolve this issue is to edit the DCOM configuration settings for the Microsoft Excel Application object.
Configure DCOM
- Go to the Start-Run menu item.
- Type in "DCOMCNFG" and hit enter.
- This should load the "Component Services" MMC (you can also load from Administrative Tools - Component Services"
- Expand "Component Services"
- Expand "Computers"
- Expand "My Computer"
- Select the "DCOM Config" item
- Select the "Microsoft Excel Application" item.
- Right click and select Properties
- Select the Security Tab and you should see the following:
- Under "Launch and Activation Permissions" select the "Customize" option.
- Click the "Edit" button
Windows XP
Windows 2003 Server
- Click the "Add" button to add a new account to the list.
- On the dialog that is displayed click the Locations button
(this is because by default your domain will be selected and we need a local account)
In this dialog scroll the list to the top (sometimes the first item is not visible) but scroll to the top and select the first item which is your computer name. In the list below "CCROWE" is the name of my computer.
- Click the OK button
- On the dialog that is displayed enter "ASPNET" as the account name (make sure location is set to the name of the computer that IIS is on) on Windows XP or if you are running on Windows 2003 Server you must enter the account that theApplication Pool is running as, by default "Network Service"
Windows XP
Windows 2003 Server
Note: A quicker way on Windows XP is to just enter the computer name and the account
so in my case that would be:
ccrowe\ASPNET - Click the OK button
- Now make sure you select the following options for the "ASP.NET Machine Account" or the account that is the application pool identity ( by default Network Service)
- Local Launch : Allow
- Remote Launch : [blank]
- Local Activation : Allow
- Remote Activation : [blank]
These settings can be seen below:
Windows XP
Windows 2003 Server
Click the OK button and test your web application again and it should work fine.
Note: Remember if you are running on Windows 2003 Server you must use the application pool identity as the account and not the ASPNET account.
'프로그래밍 > .NetFramework' 카테고리의 다른 글
BackgroundWorker, ProgressBar 활용 (0) | 2012.09.27 |
---|---|
ODBC 연결시 저장프로시저에 파라미터를 못넘길때. (0) | 2012.09.20 |
문자열확인 정규표현식 유효성 Regex (0) | 2012.04.25 |
Server에서 Microsoft.Interop.Excel.dll 설정 (0) | 2012.04.25 |
MessageBox의 버튼 텍스트 변경하기 (0) | 2012.04.25 |
- Total
- Today
- Yesterday
- drag&drop
- 자바스크립트
- WCF
- css3
- CSS
- json
- grid
- JavaScript
- rowspan
- ASP.NET
- Style
- 저장프로시저
- WebApi
- jQuery Mobile
- JS
- Mobile
- 프로시저
- SVG
- jquery chart
- MSSQL
- html5
- radius
- jQuery
- Chart
- IE
- Ajax
- 셀렉터
- Excel
- 제이쿼리
- workbook
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |