Question : Cybersource Error 80070005 System.UnauthorizedAccessE<wbr />xception: Retrieving the COM

I am using visual web developer 2008 Express.  I am using asp.net and vb.net. The server is running windows server 2003 sp2 with iis V6.0. I  have installed the simapi-net2.0-5.0.2.msi and copied all of the files from the lib folder into the bin folder.  I registered CybsWSSecurity.dll.  I created a key file.  I installed microsoft wse 3.0 runtime.  I restarted IIS.  

On this line
Line 177:        varReply = CyberSource.Clients.NVPClient.RunTransaction(oRequest)

I get the following error
Retrieving the COM class factory for component with CLSID {698BFD43-76AA-4D13-98FE-5BE9FF5E05B8} failed due to the following error: 80070005.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {698BFD43-76AA-4D13-98FE-5BE9FF5E05B8} failed due to the following error: 80070005.

ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via , the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.

To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.

[UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {698BFD43-76AA-4D13-98FE-5BE9FF5E05B8} failed due to the following error: 80070005.]
   CyberSource.WSSecurity.Signature..cctor() in S:\ccviews\eolano_laptop3\icswsclients\security\dotnet2\Signature.cs:14

[TypeInitializationException: The type initializer for 'CyberSource.WSSecurity.Signature' threw an exception.]
   CyberSource.WSSecurity.Signature.get_Version() in S:\ccviews\eolano_laptop3\icswsclients\security\dotnet2\Signature.cs:72
   CyberSource.Base.CybsPolicy.get_SecurityLibraryVersion() in S:\ccviews\eolano_laptop3\icswsclients\dotnet2\src\base\Policy.cs:197

Answer : Cybersource Error 80070005 System.UnauthorizedAccessE<wbr />xception: Retrieving the COM

which user is the application pool using. I would suggest :

Make that user a local administrator of the server ... run the code. If it works we know where the problem lies. then you need to switch the user right back to what they were, and go to the folder where the com object needs access to (ie: if the com object trys to access a folder c:\myfolder) and grant read write premissions for that user on those folder .... hope I am making sence. :)

Random Solutions  
 
programming4us programming4us