Exception Access denied , creating a new excel object in ASP.Net

H

Hemant shastri

In my web application i am reading the data from excel file and inserting the
records into the database.(In ASP.net C#)

for some users i am getting exception "Access denied" at the following line
of the code.
Excel.Application=new Excel.Application();
for some user it is working fine.
In IIS -->properties-->directory security-->Authentication mode is
"Integrated Authentication" , needed to find the login id of the user.
Web.config file identity impersonate option is also true.
How can i avoid this error message?
Please help...Thanks to all of you for investing the time and replying.
 
S

SpreadsheetGear

Microsoft does not support using Excel from a server application.

SpreadsheetGear for .NET is a 100% safe managed Excel compatible
spreadsheet component for .NET which works very nicely in server
applications, including ASP.NET - and perform much better than Excel.
It has an API which is similar to Excel and can be distributed royalty
free.

See www.spreadsheetgear.com for a free evaluation.

Joe Erickson
SpreadsheetGear
 
R

Rai Yawar Ijaz

Hi !
u have to use a different API when creating objects in ASP.NET
use Server.CreateObject

wityh regards
yawar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,145
Latest member
web3PRAgeency
Top