asp.net导出Excel文件出错
ServerErrorin'/web'Application.------------------------------------------------------...
Server Error in '/web' Application.--------------------------------------------------------------------------------Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 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. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.运行环境 xp 企业版 IIS5 .net framework 2.0 office 2007 导出Excel文件时出现以上错误,求一个该问题的解决方案。 注:已经在组件服务里给 everyone、aspnet等多个用户分配了权限
展开
展开全部
asp.net导出excel有多种方法,最简单的是输出文件流到文本文件中,然后改后缀,但无法设置字符格式,像身份证之类的超过14个数字就会补零,如果数据量不大,可以使用gridview作中转来导出。。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
需要注册COM+组件! 在管理组里! 我以前也遇到过这种情况!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
这个组件太难捣鼓了, 建议换一种实现方式,可以采用组件NPOI,这个不安装那个com组件也可以导出EXCEL
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
留邮箱给你一个比较简单的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询