Click here to Skip to main content
15,889,867 members
Home / Discussions / ASP.NET
   

ASP.NET

 
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 
QuestionProblem deleting mail attachment Pin
NetBot27-Nov-07 20:39
NetBot27-Nov-07 20:39 
QuestionPlease I need your help in asp.net Pin
abglorie27-Nov-07 20:14
abglorie27-Nov-07 20:14 
AnswerRe: Please I need your help in asp.net Pin
AS@1327-Nov-07 20:23
AS@1327-Nov-07 20:23 
GeneralRe: Please I need your help in asp.net Pin
abglorie27-Nov-07 22:19
abglorie27-Nov-07 22:19 
AnswerRe: Please I need your help in asp.net Pin
Prateek G27-Nov-07 21:19
Prateek G27-Nov-07 21:19 
AnswerRe: Please I need your help in asp.net Pin
Vasudevan Deepak Kumar27-Nov-07 21:30
Vasudevan Deepak Kumar27-Nov-07 21:30 
AnswerRe: Please I need your help in asp.net Pin
Anusubha.V.G28-Nov-07 0:44
Anusubha.V.G28-Nov-07 0:44 
AnswerForum Guidelines Pin
leckey28-Nov-07 4:31
leckey28-Nov-07 4:31 
QuestionURL Rewriting Pin
Jintal Patel27-Nov-07 20:00
Jintal Patel27-Nov-07 20:00 
Questionview in Excel Pin
niki_nilu27-Nov-07 19:48
niki_nilu27-Nov-07 19:48 
GeneralRe: view in Excel Pin
AS@1327-Nov-07 20:02
AS@1327-Nov-07 20:02 
GeneralRe: view in Excel Pin
niki_nilu27-Nov-07 22:03
niki_nilu27-Nov-07 22:03 
GeneralRe: view in Excel Pin
Prateek G27-Nov-07 22:10
Prateek G27-Nov-07 22:10 

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.