2013-03-13 48 views
0

我的.net web應用程序有一個上傳excel文件的選項,該文件有大約1k條產品,當我在localhost上運行應用程序時,上傳工作正常,但在下面的錯誤結果,當它託管在IIS7 &由網絡上其它一些計算機訪問..在c#.net web應用程序中上傳excel文件導致出錯

錯誤

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

Exception Details: System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

我googld它,並發現了一些談論的32位或64位操作系統。

謝謝。

+0

似乎是權限問題.. – Pranav 2013-03-13 07:27:55

+0

@Pranav是否有任何可以完成 – Nikhar 2013-03-13 07:46:55

+1

嘗試給予DefaultAppPool的許可......查看此鏈接: - http://www.iis.net/learn/manage/配置安全/應用程序池身份 – Pranav 2013-03-13 08:00:43

回答

1

確保上傳文件夾具有完全權限以便從其他計算機上傳。首先向每個人發放許可。然後,您可以將其限制爲僅限IIS用戶。

+0

我給每個人「完全控制」,但同樣的錯誤。 – Nikhar 2013-03-13 07:42:56

1

聽起來對我來說,當你在服務器上實現你的應用程序時,你的開發機器上沒有安裝你的應用程序。無論您使用什麼上傳方式,如果它是第三方上傳控件或其他內容,您可能不會分發該文件。

另一種可能性是,您安裝應用程序的服務器是64位計算機,而您使用的上傳控件僅爲32位構建。你可能想在服務器設置爲32位的IIS 7

http://www.depotsystems.com/ds_mobile_webhelp/webhelp/index.htm#page=Enabling_32_bit_mode.htm

+0

謝謝,但我認爲這不是問題。 – Nikhar 2013-03-13 11:39:06

相關問題