Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission denied error

Status
Not open for further replies.

crabgrass

Technical User
Aug 29, 2007
111
0
0
US
I have a COM server compiled as a DLL that is called from ASP with
Code:
set oServer = createobject(createobject("ContactManager.CMTools")
This works fine except that the DLL contains some functions that produce a "Feature not available" error. I was advised that this could be overcome by compiling it as an "Out of Process" server EXE rather than a DLL. This was done and everything else is the same. Now the create object command produces a "Permission denied" error. I've set all the Browser settings to prompt on ActiveX. Any other wisdom on this?

Thanks
 
What's with createobject(createobject("ContactManager.CMTools")?

Lee
 
Just sloppy typing, sorry. I should have said:
Code:
set oServer = createobject("contactmanager.CMTools")
 
You need to copy and paste your code in here so we can see what it actually says. That way we don't go chasing errors you make typing it in again, and we see the errors you DON'T make typing it in again.

I'd guess that you need to use Server.CreateObject instead of what you have.

Lee
 
Also remember that, unless somebody changed the default configuration, IIS will be using the IUSR_<MachineName> account for running ASPs so that count might actually not have permission.
 
Here's my code. It fails on the createobject line. I've also tried server.createobject with no difference in result. As stated in my original message, the only difference between a working and non-working code sequence is the file is compiled as a EXE rather than a DLL.
Code:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'	Report output                                                    
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
if request.form("optOutput3") = "Report" then
   set oServer = createobject("ContactManager.CMTools")
   cReportName = request.form("cboReport")
   cOutputFile = session("outloc") &  session("UserName") & ".pdf"

'	-- Create the output file and create a link if successful  --
x = oServer.CreatePDF(cReportName,cOutputFile,sql)
response.write(x)
'response.end

   if oServer.CreatePDF(cReportName,cOutputFile,sql) then
      response.write("<a href='\contactmanager\output\" & session("username") & ".pdf'>Export file generated. Click here to download.</a>")
   else
      response.write("File could not be processed.")
	  response.end
   end if	
end if
 
as a test, temporarily disable anonymous access for this ASP so that IIS runs it under your user account.
 
Can you point me toward some instructions on how to do that?
 
See my second response:
Code:
set oServer = createobject("ContactManager.CMTools")

Lee
 
The easiest way to temporarily disable the anonymous access is to use the IIS Manager tool. Look for it in the control panel under Administrative Tools. Another way to get in there is right-click on My Computer and pick "Manage" then look under "Services and Applications" for Internet Information Service Manager.
 
Sheco -
OK I found it and turned off anonymous. After which I can't log on to the website at all.
 
Sorry. I failed to mention that you want to turn on Integrated Security at the same time you disable anonymous.
 
For anyone who might be interested, I found the answer to this question. The DLL was compiled as a multi-threaded DLL. In this configuration certain commands are not supported. When recompiled as a single-threaded DLL it works fine.

Thanks to all who chimed in.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top