Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Changing many projects from AnyCPU to x64 Pin
Bernhard Hiller25-Sep-19 0:11
Bernhard Hiller25-Sep-19 0:11 
AnswerRe: Changing many projects from AnyCPU to x64 Pin
jkirkerx25-Sep-19 13:47
professionaljkirkerx25-Sep-19 13:47 
AnswerRe: Changing many projects from AnyCPU to x64 Pin
Richard MacCutchan25-Sep-19 21:43
mveRichard MacCutchan25-Sep-19 21:43 
GeneralRe: Changing many projects from AnyCPU to x64 Pin
Bernhard Hiller26-Sep-19 21:43
Bernhard Hiller26-Sep-19 21:43 
GeneralRe: Changing many projects from AnyCPU to x64 Pin
harold aptroot27-Sep-19 23:35
harold aptroot27-Sep-19 23:35 
GeneralRe: Changing many projects from AnyCPU to x64 Pin
Bernhard Hiller29-Sep-19 21:48
Bernhard Hiller29-Sep-19 21:48 
AnswerRe: Changing many projects from AnyCPU to x64 Pin
AntGamble15-Oct-19 21:40
AntGamble15-Oct-19 21:40 
QuestionHow to properly close a JSON Post using RestSharp? Pin
mlong3024-Sep-19 13:25
mlong3024-Sep-19 13:25 
Hi All,

I'm trying to write a json POST message using .NET 4.5, with VS 2015.

The following code is able to post the message successfully, but for some odd reason, about (1) minute after the code executes, and closes. The server that received the message, will get a crash alert, and shutdown the message service.

I tried placing a sleep statement at the end of my code for 2 minutes, and that does give the server time to abort the connection, without taking down the service. I also checked the ServicePointManager, RestClient, and IResponse classes, and I dont see a Close, or Dispose method I can use to close the connection on my end. Any idea how I can close my application successfully without taken down the server services?

using RestSharp;
using RestSharp.Authenticators;
using Newtonsoft.Json;

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
var client = new RestClient("https://testdev.com:5109/Test");

var request = new RestRequest();
request.Method = Method.POST;
request.AddParameter("application/json", json, ParameterType.RequestBody);
request.RequestFormat = DataFormat.Json;
IRestResponse response = client.Execute(request);


Thanks!
AnswerRe: How to properly close a JSON Post using RestSharp? Pin
BillWoodruff24-Sep-19 16:06
professionalBillWoodruff24-Sep-19 16:06 
QuestionLINQ: Remove first entry of groups in a list Pin
Mc_Topaz23-Sep-19 3:20
Mc_Topaz23-Sep-19 3:20 
AnswerRe: LINQ: Remove first entry of groups in a list Pin
OriginalGriff23-Sep-19 4:31
mveOriginalGriff23-Sep-19 4:31 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
Mc_Topaz23-Sep-19 4:49
Mc_Topaz23-Sep-19 4:49 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
OriginalGriff23-Sep-19 4:51
mveOriginalGriff23-Sep-19 4:51 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
BillWoodruff23-Sep-19 5:47
professionalBillWoodruff23-Sep-19 5:47 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
OriginalGriff23-Sep-19 5:50
mveOriginalGriff23-Sep-19 5:50 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
BillWoodruff23-Sep-19 5:55
professionalBillWoodruff23-Sep-19 5:55 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
OriginalGriff23-Sep-19 6:11
mveOriginalGriff23-Sep-19 6:11 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
BillWoodruff23-Sep-19 7:26
professionalBillWoodruff23-Sep-19 7:26 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
Luc Pattyn23-Sep-19 7:11
sitebuilderLuc Pattyn23-Sep-19 7:11 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
BillWoodruff23-Sep-19 7:18
professionalBillWoodruff23-Sep-19 7:18 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
Luc Pattyn23-Sep-19 7:26
sitebuilderLuc Pattyn23-Sep-19 7:26 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
OriginalGriff23-Sep-19 8:08
mveOriginalGriff23-Sep-19 8:08 
GeneralRe: LINQ: Remove first entry of groups in a list Pin
Luc Pattyn23-Sep-19 8:42
sitebuilderLuc Pattyn23-Sep-19 8:42 
QuestionHow to show UserControl(WPF) in a form project with not use ElementHost? Pin
Member 1308136922-Sep-19 13:59
Member 1308136922-Sep-19 13:59 
AnswerRe: How to show UserControl(WPF) in a form project with not use ElementHost? Pin
Dave Kreskowiak22-Sep-19 16:55
mveDave Kreskowiak22-Sep-19 16:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.