@tuyen1644-8024
Why don't you want to set TLS to 1.2?
This error is caused by this reason in many cases, just set it to solve the problem:
ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
If it doesn't work for you, please provide a code example so that we can quickly reproduce your problem.
@Kalpana-3650
In the code, x is an instance of RDPSession, but I don’t see where is the definition of RDPSession? Is it your custom class?
Or it is this class: RDPSession class
This class does not seem to implement IRDPSRAPIAudioStream.
@Kalpana-3650
Where did this error occur? Is it on line 75?
The current code is not enough for us to reproduce your problem, but it seems to be a problem caused by COM marshalling. Please see if the solution in this similar post will help you:
Unable to cast COM object of type exception
@TZacks-2728
Compared with .Net Framework, the biggest advantage of .Net Core is cross-platform, but for your current programs that only run-on Windows systems, this advantage is completely invisible.
.Net Core will have some advantages in performance, but the time and labor costs required to convert applications from .Net Framework to .Net Core are also not negligible.
You need to consider whether it is worth it.
@MiPakTeh-6272
Are there any exceptions?
If it is because of permissions, there should be an exception: System.ComponentModel.Win32Exception: Access is denied.
Team Viewer Service has a separate process: TeamViewer_Service.exe.
Did you click on it and try to close, or did you just click on the TeamViewer process?
@MohamedGADER-3104
May I know whether your issue has been solved or not? If not, please share it in here. We can work together to figure it out.
@MohamedGADER-3104
The RefreshReport() method must be placed before Task.Run. If placed in Task, the task will not end.
In theory, just put the relevant code of PrinterSettings before PrintDialog(). As for whether it is in Task, it should have no effect.
But I can't confirm it 100% because I don't have a printer to test.
Thank you @SimpleSamples.
I know this, but the product is not yet supported on the Microsoft Q&A platform, so I have to suggest that he go to other forums for help.
@srfpala, if your question is related to IronPython, you can go to GitHub to ask for better help.
@srfpala
What is VC 2019 CE and is it a spelling mistake? Do you mean Visual Studio 2019 Community Edition?
According to your description, this problem has nothing to do with C#.
If the question is related to Python, you can post the question on the Python forum. If the question is related to the editor, you can post the question with the relevant tag.
@elfenliedtopfan5-4697
When we create a model for Json or Xml data, I suggest you use the Paste Special function in Visual Studio, which can get the correct structure.
If there are special characters in Json sometimes, we can solve it through JsonPropertyAttribute.
@ukjung-3609
Please take a look at this post.It is 4.0.0.0 for all mscorlib.dll versions in the 4.x frameworks.
Why mscorlib version is 4.6.x in .NET Framework 4.0?
@ukjung-3609
Is it possible to specify the path directly?
MetadataReference.CreateFromFile("C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2\mscorlib.dll"),
Can we hardcode it?
Try this to see if it is feasible:
...
.AddReferences(
MetadataReference.CreateFromFile(typeof(Object).GetTypeInfo().Assembly.Location),
MetadataReference.CreateFromFile(typeof(Uri).GetTypeInfo().Assembly.Location),
MetadataReference.CreateFromFile(coreDir.FullName + Path.DirectorySeparatorChar + "mscorlib.dll"),
MetadataReference.CreateFromFile(coreDir.FullName + Path.DirectorySeparatorChar + "System.Runtime.dll")
)
@BenTam
When calling instance methods in other classes in the current class, we need to create an instance of this class first.
Moreover, although it is allowed to create a method in a method (local function), there is no need for it here.
class Program
{
static void Main(string[] args)
{
MyClass myClass = new MyClass();
myClass.MyMethod();
}
}
class MyClass
{
public int Value { get; set; }
public void MyMethod()
{
for (int i = 0; i < 2; i++)
{
Console.WriteLine(Value);
Value++;
}
}
}
@Severian-0206
I am not sure about other versions, but for my current version of Windows 10 2004, I still need to add the prefix to use the long path. Modifying the registry or group policy is useless.
You can post a question in the Windows Forum-Microsoft Community to confirm the support of other versions for long path.