Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics 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 January 14th, 2005, 04:03 AM
Registered User
 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP Access Denied Error

I am trying use follow statement

Set objExcel = CreateObject("EXCEL.APPLICATION")

But Error "Permission Denied" returned.

Who can help me!!!!
Thanks!!

Jason

 
Old January 25th, 2005, 05:37 PM
Authorized User
 
Join Date: Jan 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Please Follow these steps :



1. From command prompt type "dcomcnfg.exe"

2. You will see ‘Component Management’ window

3. Component Services --> Computer--> My Computer--> DComConfig

4. From the tree view select ‘Microsoft Excel Application’

5. Right-Click on it & select ‘Properties’

6. From the property window select the ‘Security’ tab.

7. Then for all the three options select ‘Customize’ Radio button (or according to your need) :)

8. Add ‘ASPNET’ user account to all the three

9. Give appropriate permission to them

10. Then click Apply.



Hope It Helps !!
Bhaskar Ghosh
 
Old December 14th, 2005, 03:08 AM
vjs vjs is offline
Registered User
 
Join Date: Dec 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am still getting a error "PERMISSION DENIED" even after adding ASPNET and gving it a permission

 
Old December 19th, 2005, 06:52 AM
Friend of Wrox
 
Join Date: Nov 2005
Posts: 223
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Did you give write and read permissions on the directory in IIS

This is my junk I'm gona eat it
 
Old January 8th, 2008, 03:44 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi, need help with this - i've done as the replies but can't get it going:
My inital error was Permission Denied.
I'm using Flowcentric which executes the script from the server added the ASPNET user but now i get a complete different error:
A scripting error has occurred in FG10120Save: Microsoft Excel cannot access the file 'C:\Documents and Settings\Default User\My Documents'. There are several possible reasons: • The file name or path name does not exist. • The file you're trying to open is being used by another program. Close the document in the other program, and try again. • The name of the workbook you're trying to save is the same as the name of another document that is read-only. Try saving the workbook with a different name.. For further details please check the event log.

Script code:


 
Old January 8th, 2008, 06:51 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

DjKat's suggestion is what I would have said 9IMO stay away from the command prompt)

You are trying to write to a .xls file in some way are you? If so you will need more than read permissions.

Wind is your friend
Matt
 
Old January 11th, 2008, 04:12 AM
Friend of Wrox
 
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi, i'm using flowcentyric which executes the scripts on the server but unsuccessfull - i'm not to sure what i'm doing wrong! It just hangs & writes nothing

Dim objXL
Dim File_name
'Option WScript
File_name="C:\Inetpub\wwwroot\fcParmalatTest\trans form\custom\test.xls"
Set objXL = CreateObject("Excel.Application")
Set wb = objXL.Workbooks.Add
Set ws = objXL.Worksheets(1)
r = 2

objXL.Visible = False
Set objConn = CreateObject( "ADODB.Connection")
Set resultSet = CreateObject ("ADODB.RecordSet")
objConn.Open fcCustom.Value(Process.Company, "Connections")
strSQL = "select id,ProcessID from dbo.fcEventArchive where EventHistID = 2523"

resultSet.Open strSQL, objConn, 1, 2
resultSet.MoveFirst
Do While Not resultSet.eof
ws.Cells(r, 1).Value = (resultset.fields(0).value)
ws.Cells(r, 2).Value = (resultset.fields(1).value)
resultSet.MoveNext
r = r + 1
Loop
'wb.Save
'ws.Save
WS.SaveAs(File_Name)
resultSet.Close
objConn.Close
Set resultSet = Nothing
Set objConn = Nothing






Similar Threads
Thread Thread Starter Forum Replies Last Post
Access denied error when using FileUpload Control mii2029 ASP.NET 3.5 Basics 0 October 25th, 2008 05:45 PM
how to avoid access denied error satyakishore Javascript 1 March 29th, 2006 01:48 PM
'Access is denied' error purvin Javascript 4 March 22nd, 2006 04:42 AM
please.....urgent....."access denied error while s Ramakrishna General .NET 2 October 12th, 2004 12:19 AM
Chapter 3. Access Denied Error kevinq BOOK: ASP.NET Website Programming Problem-Design-Solution 0 July 30th, 2003 02:10 AM





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