Click here to Skip to main content
15,919,879 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: IIS for home use? Pin
BREdwards28-Nov-07 2:12
BREdwards28-Nov-07 2:12 
GeneralRe: IIS for home use? Pin
N a v a n e e t h28-Nov-07 2:48
N a v a n e e t h28-Nov-07 2:48 
QuestionSocial Networking Pin
ahlonggege28-Nov-07 0:07
ahlonggege28-Nov-07 0:07 
AnswerRe: Social Networking Pin
Christian Graus28-Nov-07 0:14
protectorChristian Graus28-Nov-07 0:14 
AnswerRe: Social Networking Pin
John-ph28-Nov-07 0:30
John-ph28-Nov-07 0:30 
GeneralRe: Social Networking Pin
ahlonggege28-Nov-07 0:32
ahlonggege28-Nov-07 0:32 
GeneralRe: Social Networking Pin
John-ph28-Nov-07 0:43
John-ph28-Nov-07 0:43 
GeneralRe: Social Networking Pin
KANGAROO_28-Nov-07 1:37
KANGAROO_28-Nov-07 1:37 
GeneralRe: Social Networking Pin
John-ph28-Nov-07 3:52
John-ph28-Nov-07 3:52 
Questionsimple progressbar for uploadign file as per.... [modified] Pin
asifbhura28-Nov-07 0:03
asifbhura28-Nov-07 0:03 
AnswerRe: simple progressbar for uploadign file as per.... Pin
Christian Graus28-Nov-07 0:14
protectorChristian Graus28-Nov-07 0:14 
Questiongrid view control Pin
kadkir27-Nov-07 23:41
kadkir27-Nov-07 23:41 
GeneralRe: grid view control Pin
Sam Xavier13-Dec-07 23:29
Sam Xavier13-Dec-07 23:29 
QuestionMonthname() function Pin
thuyaaung727-Nov-07 23:04
thuyaaung727-Nov-07 23:04 
AnswerRe: Monthname() function Pin
Prateek G27-Nov-07 23:08
Prateek G27-Nov-07 23:08 
GeneralRe: Monthname() function Pin
thuyaaung727-Nov-07 23:11
thuyaaung727-Nov-07 23:11 
GeneralRe: Monthname() function Pin
Prateek G27-Nov-07 23:15
Prateek G27-Nov-07 23:15 
GeneralRe: Monthname() function [modified] Pin
thuyaaung727-Nov-07 23:24
thuyaaung727-Nov-07 23:24 
GeneralRe: Monthname() function Pin
Prateek G28-Nov-07 1:06
Prateek G28-Nov-07 1:06 
GeneralRe: Monthname() function Pin
thuyaaung728-Nov-07 1:38
thuyaaung728-Nov-07 1:38 
QuestionHandling Excel Files... Pin
pavya_Cool27-Nov-07 21:02
pavya_Cool27-Nov-07 21:02 
Hi to All,


I am trying to handle excel file in my application. Here I am trying to get a cell value in the text box on the event of button click. but whenever i run it shows exception that Access is denied..... my code is as follows....


private Excel.Application oXL=null;

private void Button1_Click(object sender, System.EventArgs e)
{
InitializeComponent();
oXL = new Excel.ApplicationClass();
oXL.Visible = true;
Excel.Workbook oWB = oXL.Workbooks.Open("D:\\Pravin\\October-07\\xls\\7starcare-October.xls",0,true,5,"","",true,Excel.XlPlatform.xlWindows,"\t",false, false, 0, true);
Excel.Sheets oSheet= oWB.Worksheets;
Excel.Worksheet oWS = (Excel.Worksheet)oSheet.get_Item(1);
TextBox1.Text= Convert.ToString(oWS.Cells.get_Item(1,1));
}

But whenever i run my application it shows exception as follws ....


------------------------------------------------------------------------------------------------
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 originated in the code.

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 , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

----------------------------------------------------------------------------------------------------


how can i remove this problem?


Pravin

AnswerRe: Handling Excel Files... Pin
Prateek G27-Nov-07 21:13
Prateek G27-Nov-07 21:13 
GeneralRe: Handling Excel Files... Pin
Prateek G27-Nov-07 21:17
Prateek G27-Nov-07 21:17 
QuestionCan we access Session from asp to asp.net Pin
NetBot27-Nov-07 20:47
NetBot27-Nov-07 20:47 
AnswerRe: Can we access Session from asp to asp.net Pin
_AK_27-Nov-07 21:44
_AK_27-Nov-07 21:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.