Missing Assembly: Mono.Security

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
jakealbarelli
Posts: 5
Last visit: Thu Aug 08, 2019 7:58 pm

Missing Assembly: Mono.Security

Post by jakealbarelli »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build:
32 or 64 bit version of product: 64 bit 5.5.149
Operating system:
32 or 64 bit OS: Windows 10 64bit

*** Please add details and screenshots as needed below. ***

I have a fresh install of PS Studio and when I try to add a PostgreSQL DB connection using the Database Browser and the Database Connection window I get the following error:

PostgreSQL: Could not load file or assembly 'Mono.Security, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.

I know how to add assemblies to PS Studio but I don't know what I need to add or why I'm getting this error. Any advice?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Missing Assembly: Mono.Security

Post by davidc »

Try adding this assembly to PowerShell Studio's installation folder and let us know if the issue persists.
Mono.Security.zip
(111.59 KiB) Downloaded 336 times
David
SAPIEN Technologies, Inc.
User avatar
jakealbarelli
Posts: 5
Last visit: Thu Aug 08, 2019 7:58 pm

Re: Missing Assembly: Mono.Security

Post by jakealbarelli »

I went to options and loaded the assembly, restarted PS Studio and got the same error. Included a screenshot this time. I'd like to mention that I have PS Studio 2015 4.2.89 64bit running on Server 2012R2 and it shows the exact same error when trying to add an PostgreSQL DB connection.
Image
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Missing Assembly: Mono.Security

Post by davidc »

PowerShell Studio itself needs the assembly. Copy the dll into PowerShell Studio's directory:

C:\Program Files\SAPIEN Technologies, Inc\PowerShell Studio 2018\

Adding the assembly to the Editor Assemblies, is for PrimalSense and the generated scripts only.
David
SAPIEN Technologies, Inc.
User avatar
jakealbarelli
Posts: 5
Last visit: Thu Aug 08, 2019 7:58 pm

Re: Missing Assembly: Mono.Security

Post by jakealbarelli »

That fixed it.
After I posted the screen shot I noticed the Assemblies page was for the editor not the app. It appears that DLL is not included in the PS Studio installer?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Missing Assembly: Mono.Security

Post by davidc »

Yes, it seems the dll was accidentally removed from the installer. It will be included in the next service release.
David
SAPIEN Technologies, Inc.
User avatar
jakealbarelli
Posts: 5
Last visit: Thu Aug 08, 2019 7:58 pm

Re: Missing Assembly: Mono.Security

Post by jakealbarelli »

While adding that DLL did allow me to create the connection it won't properly display database data in the Database Browser. It looks like it's just fetching data and refreshing over and over.

Image


[EDIT]

PostgreSQL version: 10
Here is the connection string that PS Studio generated:

Code: Select all

PORT=5432;PROTOCOL=3;SSL=False;SSLMODE=Disable;TIMEOUT=15;POOLING=True;CONNECTIONLIFETIME=15;MINPOOLSIZE=1;MAXPOOLSIZE=20;SYNCNOTIFICATION=False;COMMANDTIMEOUT=20;ENLIST=False;PRELOADREADER=False;USEEXTENDEDTYPES=False;INTEGRATED SECURITY=False;COMPATIBLE=2.0.13.91;HOST=localhost;USER ID=<USERID>;PASSWORD=<PASSWORD>;DATABASE=<DBNAME>
Here is query that appears to be running:

Code: Select all

select * from (select c.relname as TABLENAME, c.relkind as TABLETYPE, d.description as DESCRIPTION  from "DBNAME".pg_catalog.pg_class c    inner join "DBNAME".pg_catalog.pg_namespace ns on c.relnamespace=ns.oid    left join "DBNAME".pg_catalog.pg_description d on c.oid=d.objoid  where (c.relkind in ('r','v','t','m','f')) and (ns.nspname='public') ) q
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Missing Assembly: Mono.Security

Post by davidc »

We will investigate and get back to you as soon as we have an update.
David
SAPIEN Technologies, Inc.
User avatar
jakealbarelli
Posts: 5
Last visit: Thu Aug 08, 2019 7:58 pm

Re: Missing Assembly: Mono.Security

Post by jakealbarelli »

Thanks for all your help David.

I think I've figured out the cause of the issue. It appears to only do this if you have a database with no tables. Once I created a table I was able to view the DB fine. Probably something that'll still need to be looked at.

It'd be cool to see other popular database connections added like SQLITE and MariaDB.

Thanks again.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Missing Assembly: Mono.Security

Post by davidc »

Thank you, that will help us pinpoint the problem.

As for the other database connections, you can put in a feature request and we will see what we can do:

https://www.sapien.com/requests
David
SAPIEN Technologies, Inc.
This topic is 6 years and 1 month old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.