Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 14th, 2005, 04:03 AM
Registered User
 
Join Date: Jan 2005
Location: , , .
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

Reply With Quote
  #2 (permalink)  
Old January 25th, 2005, 05:37 PM
Authorized User
 
Join Date: Jan 2005
Location: Kolkata, West Bengal, India.
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
Reply With Quote
  #3 (permalink)  
Old December 14th, 2005, 03:08 AM
vjs vjs is offline
Registered User
 
Join Date: Dec 2005
Location: , , .
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

Reply With Quote
  #4 (permalink)  
Old December 19th, 2005, 06:52 AM
Friend of Wrox
 
Join Date: Nov 2005
Location: Rotterdam, , Netherlands.
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
Reply With Quote
  #5 (permalink)  
Old January 8th, 2008, 03:44 AM
Friend of Wrox
 
Join Date: Jan 2007
Location: durban, Africa, South Africa.
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:


Reply With Quote
  #6 (permalink)  
Old January 8th, 2008, 06:51 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
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
Reply With Quote
  #7 (permalink)  
Old January 11th, 2008, 04:12 AM
Friend of Wrox
 
Join Date: Jan 2007
Location: durban, Africa, South Africa.
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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:38 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.