Executed as user: usr_emanD.
A .NET Framework error occurred during execution of user-defined routine or aggregate "uspCLRNotify": System.Net.WebException: Unable to connect to the remote serverSystem.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 19.20.xxx.xx:xxxx
System.Net.Sockets.SocketException:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
System.Net.WebException:
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Notifications.direction.page.server.MailI4.Notify (String GUID)
at StoredProcedures.Notify(String GUID) . [SQLSTATE 42000] (Error 6522). The step failed.
I'm migrating my server to a new one, the previous server was physical Windows Server 2008, but the new one is Virtual on Microsoft Server 2019. I keep the same Database Server to keep my notifications executed for jobs.
But now, when I turn off the previous server and I try to run my daily notifications with the new server, it appears the following error. I want to change the Ip address that the Database Server is taking for the new Ip address of the new virtual server.
The SQL error is:
A .NET Framework error occurred during execution of user-defined routine or aggregate "uspname", error with Job SQL Server
and is a stored procedure who have just an assembly, only the address to an assembly which is ServiciosWebClr2. And the only thing it has is encrypted binary code inside. I have already checked other forums where they mention that it might be in the source code, but I don’t have the old IP anywhere in the code.
Does anyone know how to solve it or had a similar situation?
I have already tried decompiling the assembly, but I can't find it anywhere on my disk, and according to comments, it is not a physical file it's just generated by SQL Server, I got
c:\\SqlClassLibrary.XmlSerializers.dll,
c:\\SqlClassLibrary.dll, SendDataBaseMail.dll
ServiciosWebClr2.dll
the files when I make the query search show a table with id "1" and then the content with the binary numbers. When I look for the files in the servers, it says "can't found". I try to use a Dot Peek to get the assembly and not worked, I tried to modify in the Visual Studio Code Main, without results.
Executed as user: usr_emanD.
A .NET Framework error occurred during execution of user-defined routine or aggregate "uspCLRNotify": System.Net.WebException: Unable to connect to the remote serverSystem.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 19.20.xxx.xx:xxxx
System.Net.Sockets.SocketException:
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
System.Net.WebException:
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Notifications.direction.page.server.MailI4.Notify (String GUID)
at StoredProcedures.Notify(String GUID) . [SQLSTATE 42000] (Error 6522). The step failed.
I'm migrating my server to a new one, the previous server was physical Windows Server 2008, but the new one is Virtual on Microsoft Server 2019. I keep the same Database Server to keep my notifications executed for jobs.
But now, when I turn off the previous server and I try to run my daily notifications with the new server, it appears the following error. I want to change the Ip address that the Database Server is taking for the new Ip address of the new virtual server.
The SQL error is:
A .NET Framework error occurred during execution of user-defined routine or aggregate "uspname", error with Job SQL Server
and is a stored procedure who have just an assembly, only the address to an assembly which is ServiciosWebClr2. And the only thing it has is encrypted binary code inside. I have already checked other forums where they mention that it might be in the source code, but I don’t have the old IP anywhere in the code.
Does anyone know how to solve it or had a similar situation?
I have already tried decompiling the assembly, but I can't find it anywhere on my disk, and according to comments, it is not a physical file it's just generated by SQL Server, I got
c:\\SqlClassLibrary.XmlSerializers.dll,
c:\\SqlClassLibrary.dll, SendDataBaseMail.dll
ServiciosWebClr2.dll
the files when I make the query search show a table with id "1" and then the content with the binary numbers. When I look for the files in the servers, it says "can't found". I try to use a Dot Peek to get the assembly and not worked, I tried to modify in the Visual Studio Code Main, without results.
Share Improve this question edited Nov 20, 2024 at 5:11 marc_s 756k184 gold badges1.4k silver badges1.5k bronze badges asked Nov 19, 2024 at 23:07 Josue LunaJosue Luna 12 bronze badges 2- 2 Did you already ask this question? Deleting and re-asking the same question will just result in it being closed again. – Dale K Commented Nov 19, 2024 at 23:14
- As I told you in the original question, you need to take the binary value from the assembly files table and save it into your dll file and then you can try to decompile it. A PowerShell script should be able to achieve the saving me thinks. – siggemannen Commented Nov 20, 2024 at 7:04
1 Answer
Reset to default 0Here's a very raw PowerShell module to get you started:
$results = Invoke-Sqlcmd -ServerInstance "yourserver" -Database "yourdatabase" -Query "select content, case when name like '%\%' then right(name, charindex('\', reverse(name)) -1) else name end as name, datalength(content) as ln
from sys.assembly_files
--where assembly_id = 65539" -MaxBinaryLength 99999999
foreach ($r in $results)
{
$r #for debugging
Set-Content -Path $r["name"] -Value $results["content"][0..($results["ln"]-1)] -Encoding Byte
}
It fetches all assemblies and stores them into separate files, I've stripped the path part of it just in case. Then you can hopefully decompile it.
You can add the where condition to save specific files.