Topic "Using WinSCP in Sql Server - Finalizers must be removed."

Author Message
gregoryagu
[View user's profile]

Joined: 2013-10-08
Posts: 2
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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24994
Location: Prague, Czechia
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:
http://stackoverflow.com/questions/19234629/how-to-recompile-winscp-without-finalizer
gregoryagu
[View user's profile]

Joined: 2013-10-08
Posts: 2
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
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License