CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.web_parts_and_personalization Tags:
Item Type: Date Entered: 11/25/2005 3:06:08 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 37 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
"Basti" <>
NewsGroup User
Permission Problems11/25/2005 3:06:08 PM

0

I'm currently developing a WebPart reading (and later hopefully writing) an Excel file (using Microsoft.Office.Interop.Excel). When testing I get the following error message:

quote:
System.Security.SecurityException: Request for the permission of type System.Security.Permissions.SecurityPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. ....


This is basically the code I'm running and the error occurs when executing line 5:

1 path = "C:\\Test.xls";
2 workbook = app.Workbooks.Open(path,Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
3 sheet = (Worksheet)workbook.ActiveSheet;
4 excelCell = (Range) sheet.get_Range("B2", "B2");
5 String test =  excelCell.Value2;


Any ideas???
"smiling4ever"
NewsGroup User
Re: Permission Problems11/25/2005 10:06:46 PM

0

Hello,

If you faced that problem with a hosting company then contact them to increase your site trust level and possibly refreshing the pool after that.

regards
"mharder" <>
NewsGroup User
Re: Permission Problems11/28/2005 10:24:19 PM

0

What's the stack trace of the exception?  Does this scenario work outside of a WebPart, or do you get the same error?

-Mike
http://blogs.msdn.com/mharder

This posting is provided "AS IS" with no warranties, and confers no rights.
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:













how to turn off automatic indention?

who can help me?

c# for pocketpc developement

little help to start : mmc look like

can not change control id in property of design view, have to change it in source

problem gridview modfification

visual web developer on vista; installation issues

ajax

3rd party components

cannot create an object of type 'system.drawing.color'

class not added to default namespace.

unstalling beta 1 not in the order described by ms??

asp.net and outlook

cannot add dev.languages after initial installation, using setup

how to get the line numbers in vwd

missing overrides listing in the code editor?

possible to visually add methods?

visual web developer doesn't add code for button click

using visual web developer express with dotnetnuke

tool box

post installation issues

moving projects between dev pc's

vwd online help chokes on proxy authentication. workarounds? fixes?

adding ibm db2 udb .net provider to data explorer

"create new sql server database" command is disabled

binding a dropdownlist after filling

html encode

trying to load the job site starter kit to a webserver, but keep getting errors, and page doesn't load.

error 1311. source file not found - enu\vnssetu1.cab

browsing sql express 2005 data

collapse code segments in source view.

very good vwd tutorial for those who are new to vwd and asp.net

"start page" represented visually in explorer window

vwb registration activation

official asp 2.0 framework and vwd express beta 2

editing the xml data using c# code

auto formating of code in vwd when pasting....

menu items with both images and texts?

compile error when meet automatically generator code or class referenced in dll

how to filter unwanted words in behind code?

how to enable code collapse on .vb files ?

how to make a print button??

can i "drag and drop" a sqldatareader just like i do with sqldatasource, gridview, etc.?

remove wizard sidebar

how to change .net v 2 to .net v 3.5 microsoft visual web developer 2005

unrecognized tag prefix or device filter

can't add asp.net component in my website

express editions expiration

wysiwyg

layout needed for repositioning elements

   
  Privacy | Contact Us
All Times Are GMT