Error '80131509' in the ASP page

We created one .Net assembly and made it available as a COM object. When we try to expose any method of this object on the ASP page, we get the error message "80131509". We do not get any errors when creating the Object. that is, it skips the Server.CreateObject.

This works fine in our development environment, but we get this error in the UAT environment. Development and UAT are almost the same, except that the UAT is more secure. I tried all possible ways, but no luck. I have been working on this issue for the past 4 days, and any help would be greatly appreciated.

I suspect there may be a problem with IIS 7 when publishing this dll. But do not know what it could be? We also granted IUSR full rights.

The code:

set obj = Server.CreateObject("DataAccess") dim rs set rs=obj.GetLocations("All") <--- **Here i am getting an error.** 
+6
source share
1 answer

We have several com dlls in my work, and we often encounter problems when we register a dll with regasm and the dll does not work. It works in other environments, but for some reason it just won’t work in this single instance. Com dll is fickle. Sometimes we register it, cancel, overwrite and reload. Sometimes they mysteriously begin to work at other times.

There are a few more things that could go wrong.

Make sure that the correct permissions are set in the folders in which the dll lives, and in the dll itself. Also make sure all dependent dlls are present and also have the correct resolution. Make sure that everything you need to access the dll also has the correct permissions.

If this fails to open regedit. Find the pointer associated with the com object. Sometimes you find that the paths that the registry has are confused. Clear any links to the com object, reload and re-register it.

I also saw an exception that was thrown by the constructor causing the problems. When the com object starts, it explodes. In one of our objects, a method has been added for sending e-mails when an exception occurs.

In one case, we had an old com object, which is no longer compatible with the version of windows that we launched. If you upgraded the server, this may be a problem. In our case, we wrote our own component to replace a broken old one.

Also make sure that if the com object is strictly specified, you use "regasm / tlb / codebase fickle_com_object.dll"

In short, there are a few things that make a com object not work:

  • Multiple registry paths
  • Invalid folder permissions
  • Creation failed

Perhaps one of these things will solve your problem. I know how difficult it is sometimes. Good luck

+2
source

Source: https://habr.com/ru/post/916935/


All Articles