By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,262 Members | 1,128 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,262 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Nov 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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

Nov 18 '05 #2

P: n/a
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_*******@hotmail.com> wrote in message news:Ok**************@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

Nov 18 '05 #3

P: n/a
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!
Nov 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.