开发者

Create App_Data and register Excel application on ASP.NET deployment? (IIS7)

开发者 https://www.devze.com 2023-03-07 13:58 出处:网络
I am deploying an ASP.NET MVC3 application in IIS7. I already deployed other applications but they never made use of the App_Data folder or any additional component such as the Interop library.

I am deploying an ASP.NET MVC3 application in IIS7. I already deployed other applications but they never made use of the App_Data folder or any additional component such as the Interop library.

I used the one click deployement and I sue the default application pool. When I launch the application I immediately get an error stating:

[web access] Sorry, an error occurred while processing your request.

[browse from IIS7] Could not find a part of the path 'D:\Data\Apps\OppUpdate\App_Data\Test.xlsx'.

Then I manually added the App_Data folder inside the deployment directory and the application starts regularly. Then when开发者_Python百科 it comes to the taks that uses the Interop library, I get the following error:

[web access] Sorry, an error occurred while processing your request.

[browse from IIS7] Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

Is there any way to automatically add the App_Data folder when using 1 click deploy? How can I register the Interop services?

Thanks you,

Francesco


Apparently the problem is linked with Server 2008. The Excel application to be executed on server side triggers the security popup which is now present in MS OS, such as Win 7 and Vista. This is the dialog it appears to the users everytime they run an application and warns them about the damages a not trusted application might bring to their PC. Obviously when the application, in this case Excel, is run by another application, in this case a web application,the dialog does not popup and the server does not get the authorization to run Excel.

The solution for this appalling BUG in Microsoft IIS & Excel is terrific:

Create directory "C:\Windows\SysWOW64\config\systemprofile\Desktop" Set Full control permissions for directory Desktop (for example in Win7 & IIS 7 & DefaultAppPool set permissions for user "IIS AppPool\DefaultAppPool")

source: http://forums.iis.net/t/1148371.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号