我在 Silverlight 4 应用程序中使用 RestSharp,但它似乎没有工作。它总是向我返回带有 System.Security.SecurityException 的错误。
try
{
client.ExecuteAsync(request, (response) =>
{
if (response.ResponseStatus == ResponseStatus.Error)
{
Debug.WriteLine(response.ResponseStatus);
}
else if (response.ResponseStatus == ResponseStatus.Completed)
{
Debug.WriteLine(response.Content);
}
});
}
catch(System.Security.SecurityException e)
{
Debug.WriteLine("Exception : " + e.Message);
}