-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Dear All.
I am using RestSharp version 106.6.10 with .NET Core WebApi within Visual Studio successfully. However, after deploying to IIS receiving error:
System.IO.FileNotFoundException: Could not load file or assembly 'RestSharp, Version=106.6.10.0, Culture=neutral, PublicKeyToken=598062e77f915f75'. The system cannot find the file specified.
My code:
try
{
var restclient = new RestSharp.RestClient(Globals.ReportingHostAddr);
RestRequest request = new RestRequest("ReportManagement/GetStudentIdPhotos", Method.POST);
request.RequestFormat = DataFormat.Json;
request.AddJsonBody(args);
response = restclient.Execute(request);
if (!response.IsSuccessful)
{
var ex = JsonConvert.DeserializeObject<AppExceptionMessage>(response.Content);
return new BadRequestObjectResult(ex);
};
}
catch (Exception ex)
{
var parsedEx = CurrentExceptionMgr.ParseErrorMsg(ex.Message);
return new BadRequestObjectResult(parsedEx);
};
Thanks.
Metadata
Metadata
Assignees
Labels
No labels