473,386 Members | 1,835 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Excel in WindowsForms: Access Denied

I am trying to open an Excel file from a C# Windows Forms application.

On the statement:
ExcelObj = new Excel.Application();
I get an "Access is Denied" error (System.UnauthorizedAccessException).

The curious thing is that this error occurs only on my home computer, but
not on my office computer where the application runs without problems. The
two computers are practically identical, both with Windows XP Pro. Clearly
there is something in my home computer that causes this error, but what can
it be?

Thanks for any help.
Ariel
--
==================================================
Ariel Dolan
ar******@netvision.net.il

Artificial Life and other Experiments
http://www.aridolan.com
==================================================
May 3 '06 #1
1 1205
Check the Launch and Activation permissions for the Excel COM controls in
dcomcnfg: http://www.devcity.net/Articles/239/2/article.aspx

-- scott
"Ariel Dolan" wrote:
I am trying to open an Excel file from a C# Windows Forms application.

On the statement:
ExcelObj = new Excel.Application();
I get an "Access is Denied" error (System.UnauthorizedAccessException).

The curious thing is that this error occurs only on my home computer, but
not on my office computer where the application runs without problems. The
two computers are practically identical, both with Windows XP Pro. Clearly
there is something in my home computer that causes this error, but what can
it be?

Thanks for any help.
Ariel
--
==================================================
Ariel Dolan
ar******@netvision.net.il

Artificial Life and other Experiments
http://www.aridolan.com
==================================================
Jul 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jon Rista | last post by:
Hello. I'm trying to automate Excel in a C# Windows Service. This windows service has to be able to access files on network shares, so it uses a domain account on a WinNT 4.0 domain server, rather...
1
by: sk | last post by:
Please forgive me if the same topic is already posted. But i havent found I have got an error while accessing the excel file as below. Can somebody reply if there is a solution Access is denied....
3
by: hari krishna | last post by:
hi, I am generating excel reports through vb.Net. After creating excel.application and the report is generated, each report leaves Excel in memory. I can see them in task manager in Process tab...
9
by: hari krishna | last post by:
hi, I want to send the data from dataset information to Excel through ASP.Net. there will be no XL installed on web server. web server is win 2000 server machine. I am using visual basic code in...
2
by: Ryan Ternier | last post by:
We've been using Excel for our web apps for quite some time. We're putting the apps on 2003 boxes now and have run unto an error with Excel. It just won't work <darn excel>. It gives us the...
8
by: jack | last post by:
Access is denied. 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...
12
by: D. Shane Fowlkes | last post by:
This most likely belongs in another forum but I thought I'd start here. I have a COM Object written in VB6. The DLL will access MS Excel and use it's Object Library to write a customized report...
2
by: kelvinweb | last post by:
Hi All, I don't why alert below error message when I am using "Excel Application". I have to following the instruction, but the error is still here. Please help .. Dim excelApp As New...
0
by: =?Utf-8?B?TW9udGU=?= | last post by:
I am using VB.NET to open and read info from Excel spreadsheets using code similar to this: Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlBooks As Excel.Workbooks Dim...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.