Click to See Complete Forum and Search --> : Access Denied when XML is loaded from virtual path - VB 6.0


shanuragu
01-16-2008, 12:23 AM
Hi,

I am accessing Dll in a Stored procedure , for which I'm passing Virtual xml path to one of the method. Method is failing to load XML from the virtual path .. giving error message Access Denied.

SP is as follows:
EXEC @retVal = sp_OACreate 'TestUpload.ORSUniformBankFileProcess', @comHandle OUTPUT
IF (@retVal <> 0)
BEGIN
-- Trap errors if any
EXEC sp_OAGetErrorInfo @comHandle,@src OUT, @desc OUT
SET @ret_desc = convert(nvarchar,convert(varbinary(4),@retVal)) + ' ' + @src + ' ' + @desc
SET @ret_code = 1
INSERT INTO log_erro(Nr_id_unico,Nr_numero_erro,Nm_descricao_erro,Dt_ocorrencia) VALUES(0,0,'Error in creating BankfileUD object-sp_ORS_Upload',GetDate())
END
-- Call a method into the component
EXEC @retVal = sp_OAMethod @comHandle, 'Process_xml', @retString OUTPUT, @strPath,@intUploadId --@strXML
IF (@retVal <> 0)
BEGIN
-- Trap errors if any
EXEC sp_OAGetErrorInfo @comHandle,@src OUT, @desc OUT
SET @ret_desc = convert(nvarchar,convert(varbinary(4),@retVal)) + ' ' + @src + ' ' + @desc
SET @ret_code = 2
INSERT INTO log_erro(Nr_id_unico,Nr_numero_erro,Nm_descricao_erro,Dt_ocorrencia) VALUES(0,0,'Error in calling Process_xml method - sp_ORS_Upload',GetDate())
END

In Dll in the method Process_xml I am getting proper virtual path passing to it. While loading the XML ie, xDoc.Load(mstrXMLPath) is throwing an error saying Access denaied ](ie, -2147024891 : ORSUniformBankfileProcess : process_xml-msxml3.dll-Access is denied.). [/COLOR]
Virtual folder has complete access. Even the folder where the xml is stored has full rights to R/W/M.

The scenario I'm testing here is to load XML file from any server ie, through virtual path.

Any suggestions???:(

Shan