Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 29th, 2005, 12:38 AM
Authorized User
 
Join Date: May 2005
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default using excel sheet in ASP.Net

Hello All,
i am using an excel sheet from the ASP.Net appliaction in my project.
But it is giving an error when i run it on the SERVER MACHINE.
the error is:

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 <identity impersonate="true"/>, 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.

Source Error:
Line 939: Call GetExcel() Line 940: Line 941:
               Dim wrksheetPR As New Worksheet Line 942:
              Dim wrksheetRR As New Worksheet Line 943:

pls help.
its urgent.

thanks and regards,
muskaan.


 
Old August 29th, 2005, 04:27 AM
Authorized User
 
Join Date: May 2005
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think no one is bothered to answer my questions........

anyways......thanx.......

regards,
muskaan.

 
Old August 31st, 2005, 01:37 AM
Authorized User
 
Join Date: May 2005
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can anyone tell me How can I destroy excel sheet object without using API????

Thanks & Regards,
Muskaan.

 
Old August 31st, 2005, 04:43 AM
Authorized User
 
Join Date: Nov 2004
Posts: 52
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to avanishp
Default

Dim oXL As New Excel.Application
Dim oBooks As Excel.Workbooks = oXL.Workbooks
Dim oWB As Excel.Workbook = oBooks.Add
Dim oSheet As Excel.Worksheet = oXL.ActiveSheet

To destroy excel sheet object

NAR(oSheet)
oWB.Close(False)
NAR(oWB)
oBooks.Close()
NAR(oBooks)
oXL.Application.Quit()
NAR(oXL)
oXL = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()



Public Sub NAR(ByVal o As Object)
        Try
            System.Runtime.InteropServices.Marshal.ReleaseComO bject(o)
        Catch
        Finally
            o = Nothing
        End Try
    End Sub


Hope this will help you




Avanish Pandey
Set your heart upon your work, but never on its reward
 
Old September 5th, 2005, 11:51 PM
Authorized User
 
Join Date: May 2005
Posts: 92
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Avinash......
will let u knw in case of further queries.........

regards,
muskaan.






Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.Net Moving Chart to Excel Sheet 2 sili18 General .NET 0 June 15th, 2007 12:39 PM
Excel sheet accessing(edit/update) in asp.net hemant.dna ASP.NET 1.0 and 1.1 Basics 0 January 31st, 2007 07:37 AM
Importing Excel sheet into Access using ASP prasanta2expert ASP.NET 1.0 and 1.1 Basics 1 October 5th, 2006 02:36 PM
access data of excel sheet into sql server in asp KGANESH2006 SQL Server ASP 2 April 20th, 2006 02:33 AM
Opening and emailing Excel sheet through ASP.Net venterjo ASP.NET 1.0 and 1.1 Basics 0 October 10th, 2005 09:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.