Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

gregoryagu

Great. Will try this and let you know how it goes.

(Sorry for the double posting, I didn't realize you were on StackOverflow.)

Greg
martin

Re: Using WinSCP in Sql Server - Finalizers must be removed.

WinSCP itself (not the C# WinSCP .NET assembly wrapper) is pure WinAPI C++ application, not Managed C++. So there are no finalizers.

So you just need to remove finalizers from the C# part (dotnet folder). Note that source code for the .NET assembly is available only for the 5.2.x branch.

Your question on StackOverflow:
https://stackoverflow.com/q/19234629/850848
gregoryagu

Using WinSCP in Sql Server - Finalizers must be removed.

I need to be able to SFTP from inside Sql Server. In other words, I have created a CLR stored procedure that uses WinSCP to connect to an SFTP site and upload a file. It works outside of Sql Server, but when I try to install, I get an error message from Sql Server.

The issue is that Sql Server does not allow any assembly that uses a Finalizer. It is forbidden in a Sql Server context. So I can't use WinSCP.dll as it is.

Is it possible to make a version that does not have any Finalizers in it? I downloaded the source code and looked through it, but I don't know C++. But I do know C# and would attempt to make changes if you think it is possible to make this work. I know it would be better to kept them there, but in this case, it's just not possible.

I would be happy to make a donation if you could make this work.

Greg