Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   How can I allow access for a "ASP.Net" user in Excel? (http://www.velocityreviews.com/forums/t88167-how-can-i-allow-access-for-a-asp-net-user-in-excel.html)

Michael Tkachev 10-07-2004 02:29 PM

How can I allow access for a "ASP.Net" user in Excel?
 
Hello,

I need to create an "Excel" file in the ASP.net. But a security system doesn't allow to do it.
What can I do? There is an exception heppens when I try to execute the following row:

Excel.ApplicationClass c = new Excel.ApplicationClass();

Exception Details: System.UnauthorizedAccessException: Access is denied.

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.


Who have any idias?
--
Sincerely yours,
Michael Tkachev.
..Net Developer


=?Utf-8?B?UHJhdmVlbiBL?= 10-07-2004 04:07 PM

RE: How can I allow access for a "ASP.Net" user in Excel?
 
Hi Michael,
I think its a problem of your component which you are using to create
the excel application. you are add the dll into the GAC, later on in the user
accounts in the control panel set the permissions for the users. If this
doesn't helps you out.

in the Start >> Run >> Type DComcnfg the DCOM configuration application
apprears in that select your component ie. microsoft APplication object and
in that right click, in the security tab, provide the permissions to that
components. that will solve your problem

"Michael Tkachev" wrote:

> Hello,
>
> I need to create an "Excel" file in the ASP.net. But a security system doesn't allow to do it.
> What can I do? There is an exception heppens when I try to execute the following row:
>
> Excel.ApplicationClass c = new Excel.ApplicationClass();
>
> Exception Details: System.UnauthorizedAccessException: Access is denied.
>
> 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.
>
>
> Who have any idias?
> --
> Sincerely yours,
> Michael Tkachev.
> ..Net Developer
>


Steve C. Orr [MVP, MCSD] 10-07-2004 06:27 PM

Re: How can I allow access for a "ASP.Net" user in Excel?
 
This article contains the information you need to work with Excel files from
ASP.NET:
http://www.aspnetpro.com/NewsletterA...200309so_l.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net


"Michael Tkachev" <m_tkachev@hotmail.com> wrote in message news:Ok4asnHrEHA.2580@TK2MSFTNGP15.phx.gbl...
Hello,

I need to create an "Excel" file in the ASP.net. But a security system doesn't allow to do it.
What can I do? There is an exception heppens when I try to execute the following row:

Excel.ApplicationClass c = new Excel.ApplicationClass();

Exception Details: System.UnauthorizedAccessException: Access is denied.

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.


Who have any idias?
--
Sincerely yours,
Michael Tkachev.
.Net Developer


Michael Tkachev 10-08-2004 09:00 AM

Re: How can I allow access for a "ASP.Net" user in Excel?
 
Hello,


Thank you very much. I read the article and the I downloaded an example,
but when I tryed to
run this example, an application returns the following exception:

Exception Details: System.Runtime.InteropServices.COMException: Old
format or invalid type library.

Source Error:
Line 34: object o = new object();
Line 35:
Line 36: a.Save(@"c:\1\11.xls");

what wrong here?
I'm using Windows-2000 pro, Office-XP.

Thanks

Michael




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Larry Neblett 09-28-2012 07:39 AM

Maybe my post will help someone. There is a useful .NET component Excel Jetcell that does not require ms excel installed in the server. So each developer can easily create Excel XLS XSLX files in his .net application.


All times are GMT. The time now is 07:58 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.