com - Permission denied error when try use Scripting.Dictionary -


i using windows server 2008 r2 64-bit , iis 7.5 , hosting classic asp (32-bit) web site , invoking com components on com server (which have windows server 2008 r2 64-bit). getting error "permission denied" , error code 800a0046.

set odictaogroup = createobject("scripting.dictionary") odictaogroup.add "1000", "5" ouser.fn_update_ao_groups(odictaogroup) 

asp website server uses dcom communicate com server. on asp web site server proxy created of com server classes.

i created test function , passed values function code works fine.

ouser.fn_update_ao_groups_test1("1000", "21") 

but when try pass scipting.dictionary object permission denied error raised. have googled lot in vain nothing relevant.

function's code is

public function fn_update_ao_groups(vntaodict variant)  on error goto errorhandler  dim oadoconnect amlconnect_v2.clsconnect dim oadoconn        adodb.connection dim oadocmd         adodb.command dim vntkey          variant      if not objcontext nothing         set oadoconnect = objcontext.createinstance("amlconnect_v2.clsconnect")         set oadocmd = objcontext.createinstance("adodb.command")     else         set oadoconnect = new clsconnect         set oadocmd = new adodb.command     end if      if isobject(vntaodict)         if oadoconnect.openadoconnection(oadoconn)             oadocmd                 .commandtext = "sp_upd_aogroups"                 .commandtype = adcmdstoredproc                 .parameters.append .createparameter("ao_id", adinteger, adparaminput)                 .parameters.append .createparameter("email_group_id", adinteger, adparaminput)                 set .activeconnection = oadoconn             end             'execute stored procedure each item in dictionary             each vntkey in vntaodict.keys                 oadocmd.parameters("ao_id").value = vntkey                 oadocmd.parameters("email_group_id").value = vntaodict(vntkey)                 oadocmd.execute             next         end if     end if  tidyup:      set oadoconn = nothing     set oadocmd = nothing     set oadoconnect = nothing  exit function  errorhandler:     dim errhandler amlconnect_v2.clsconnect      if not objcontext nothing         set errhandler = objcontext.createinstance("amlconnect_v2.clsconnect")     else         set errhandler = new amlconnect_v2.clsconnect     end if      m_serrormessage = "error number: " + cstr(err.number) + "<br>" + "description: " + errhandler.logerror(err.number, err.description, "module: amladmin_v2.clsusers", "function:fn_update_ao_groups", errerror, errvb, errdatabase, "")      if not errhandler nothing set errhandler = nothing      goto tidyup:  end function 

can 1 suggest remedy ?

code function accepting string

public function fn_update_ao_groups_test1(strkey string, strvalue string)  on error goto errorhandler  dim oadoconnect amlconnect_v2.clsconnect dim oadoconn        adodb.connection dim oadocmd         adodb.command dim vntkey          variant  dim errhandlertest amlconnect_v2.clsconnect      if not objcontext nothing         set oadoconnect = objcontext.createinstance("amlconnect_v2.clsconnect")         set oadocmd = objcontext.createinstance("adodb.command")      else         set oadoconnect = new clsconnect         set oadocmd = new adodb.command      end if              if oadoconnect.openadoconnection(oadoconn)                 oadocmd                     .commandtext = "sp_upd_aogroups"                     .commandtype = adcmdstoredproc                     .parameters.append .createparameter("ao_id", adinteger, adparaminput)                     .parameters.append .createparameter("email_group_id", adinteger, adparaminput)                     set .activeconnection = oadoconn                 end                 'execute stored procedure each item in dictionary                     oadocmd.parameters("ao_id").value = strkey                     oadocmd.parameters("email_group_id").value = strvalue                     oadocmd.execute             end if tidyup:      set oadoconn = nothing     set oadocmd = nothing     set oadoconnect = nothing  exit function  errorhandler:     dim errhandler amlconnect_v2.clsconnect      if not objcontext nothing         set errhandler = objcontext.createinstance("amlconnect_v2.clsconnect")     else         set errhandler = new amlconnect_v2.clsconnect     end if      m_serrormessage = "error number: " + cstr(err.number) + "<br>" + "description: " + errhandler.logerror(err.number, err.description, "module: amladmin_v2.clsusers", "function:fn_update_ao_groups", errerror, errvb, errdatabase, "")      if not errhandler nothing set errhandler = nothing      goto tidyup:  end function 

thanks, vaibhav

too long comment, while not full answer might put on right direction.

first, noticed field types integer while dictionary keys , values string. first try converting changing code in function to:

oadocmd.parameters("ao_id").value = clng(vntkey) oadocmd.parameters("email_group_id").value = clng(vntaodict(vntkey)) 

if still same error, need know if exact same code works fine when explicitly pass 2 parameters function instead of dictionary?

another thing comes mind maybe going wrong error handling, try remove sake of debug , see if more meaningful error message.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -