lunes, 21 de mayo de 2018
CredSSP Encryption oracle remediation error caused by May 2018 Update
Open a cmd prompt as administrator and run this command
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\CredSSP\Parameters" /f /v AllowEncryptionOracle /t REG_DWORD /d 2
then try your remote desktop.
viernes, 26 de enero de 2018
Multiple Parameters WEB API
I had looked for this everywhere until I had found this sample from Mudita Rathore
http://www.c-sharpcorner.com/UploadFile/2b481f/pass-multiple-parameter-in-url-in-web-api/
while his sample is using MVC Web API it helped me a lot.
Basically I wanted to be able to search for a Person : First, Middle, and DOB
One of the solution was rooting but I wanted to have a simpler alternative.
So here are the steps very simple:
1. Create a WEB API Project using Visual Studio
2. Expand the folder Controllers
Edit the ValuesController.cs
add this GET method.
public string Get(string strFirstName, string strLastName, DateTime dtDOB)
{
return strFirstName + " " + strLastName+ " " +dtDOB.ToString() ;
}
Run the project and go to
http://localhost:PORT/api/values/?strFirstName=Jorge&strLastName=Vera&dtDOB=01/26/2018%2004:00%20PM
Where port is your assigned number port.
and you will get a xml/json return,
The key is your Parameters Name are the same as your GET Parameters
So the good part here is that you can pass parameters to your WEB API process the request access a database get the result based in the parameters received.
most of the examples I read and watched only talk about a GET method that will take and Index value or return a general list, but in the real world you need to provide several filter for the same query, a date range, a list of parameters like Client Code, Bill Number, Zipcode all of them at once.
I hope this small sample helps and again thanks to
http://www.c-sharpcorner.com/members/mudita-rathore
for his sample.
http://www.c-sharpcorner.com/UploadFile/2b481f/pass-multiple-parameter-in-url-in-web-api/
while his sample is using MVC Web API it helped me a lot.
Basically I wanted to be able to search for a Person : First, Middle, and DOB
One of the solution was rooting but I wanted to have a simpler alternative.
So here are the steps very simple:
1. Create a WEB API Project using Visual Studio
2. Expand the folder Controllers
Edit the ValuesController.cs
add this GET method.
public string Get(string strFirstName, string strLastName, DateTime dtDOB)
{
return strFirstName + " " + strLastName+ " " +dtDOB.ToString() ;
}
Run the project and go to
http://localhost:PORT/api/values/?strFirstName=Jorge&strLastName=Vera&dtDOB=01/26/2018%2004:00%20PM
Where port is your assigned number port.
and you will get a xml/json return,
The key is your Parameters Name are the same as your GET Parameters
So the good part here is that you can pass parameters to your WEB API process the request access a database get the result based in the parameters received.
most of the examples I read and watched only talk about a GET method that will take and Index value or return a general list, but in the real world you need to provide several filter for the same query, a date range, a list of parameters like Client Code, Bill Number, Zipcode all of them at once.
I hope this small sample helps and again thanks to
http://www.c-sharpcorner.com/members/mudita-rathore
for his sample.
Suscribirse a:
Comentarios (Atom)