Usar una variable en un LIKE sql server
Ejemplo:
ALTER PROCEDURE <Name>
(
@PartialName VARCHAR(50) = NULL
)
SELECT Name
FROM <table>
WHERE Name LIKE '%' + @PartialName + '%'
Tips de desarrollo SQL SERVER, ASP.NET, C#, MVVM, WCF, WPF, XAMARIN, AZURE etc
Ejemplo:
ALTER PROCEDURE <Name>
(
@PartialName VARCHAR(50) = NULL
)
SELECT Name
FROM <table>
WHERE Name LIKE '%' + @PartialName + '%'
Unable to read data from the transport connection : An existing connection was forcibly closed by the remote host
No se pudo obtener la transmisión del cliente o falló el inicio de sesión
<compilation debug="true" targetFramework="4.5">
<httpRuntime targetFramework="4.5" />
Si está ejecutando 4.6.x o una versión superior de .NET en el servidor, asegúrese de ajustar estos valores de targetFramework para que coincidan con la versión del marco en su servidor. Si sus versiones leen menos de 4.6.x, le recomendaría que actualice .NET y use la versión más nueva, a menos que su código dependa de una versión anterior (que, en ese caso, debería considerar actualizarla).
Cambié targetFrameworks a 4.7.2 y el problema desapareció:
<compilation debug="true" targetFramework="4.7.2">
<httpRuntime targetFramework="4.7.2" />
Es necesario configurar el web config:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
<add name="Access-Control-Allow-Methods" value="GET,POST,OPTIONS" />
<add name="Access-Control-Allow-Headers" value="Content-Type, soapaction" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>