|
Thanks, Gerry. Code-first does sound best for me, for the same reasons as you.
Thank you to anyone taking the time to read my posts.
|
|
|
|
|
Patrick Skelton wrote: and being able to swap in/out different data providers without requiring any other changes
Having spent decades working with data providers that is pipe dream.
If the system evolves into any complexity then differences between systems will crop up that at best will exhibit problems that make at least one service provide behave in a less than optimal way compared to others.
This can be minimized, but not eliminated, by the following
1. Very carefully review all requirements BEFORE committing to evaluate impact on data flows especially those that have any chance of involving performance (volume and size.) The impact must always be rigorously sized.
2. Have a custom data layer that STRICTLY enforces the data rules.
3. Do not allow any exceptions. If you allow even one exception then over time there will be more exceptions.
|
|
|
|
|
I have a C# app in .NET framework 4.6.1 where it uses WebClient.DownloadString(url) to download content from a url that uses TLS 1.3 and it throws exception because app is intended for a use on Windows Vista that doesn't have TLS 1.3
.NET framework 4.8 can't be installed on Vista.
How can I solve this problem so that app can work on Vista?
|
|
|
|
|
I just browsed to namespace System.Net, using VS2010, and can see that WebClient.DownloadString(ur(i)) is a member of System [4.0.0.0] so I'd suggest going into the Project Properties and see if you can't switch the Target framework from the green one, 4.6.1, to ... say 2.0 or a little higher. Maybe 4.0.
Nothing I've ever compiled with VS2010 gave me troubles on Vista but TLS did superceed SSL as I recall back around Windows 2000. Then again, I've actually has RDP running on Vista (though not attaching to Windows 2000) ... so I don't know what gives with RDP.
Perhaps I'm confusing help here with some other help somewhere else
|
|
|
|
|
Hi,
It's not possible. The .NET framework utilizes Schannel for TLS 1.3[^] and Vista uses outdated libraries.
moxol wrote: How can I solve this problem so that app can work on Vista? The only thing that comes to mind is maybe using a C# wrapper around libcurl[^].
Best Wishes,
-David Delaune
|
|
|
|
|
You can get your app to use the OS-default protocols by setting a registry key:
Transport Layer Security (TLS) best practices with the .NET Framework - .NET Framework | Microsoft Docs[^]
Of course, that won't help if the OS doesn't support TLS 1.3 in the first place. As far as I can see, it's only supported in Windows 10 (build 1903 or later) and Windows 11, and in Windows Server 2019 and 2022. Vista doesn't even support TLS 1.1 without a patch!
I guess the real question is, why are you still using an OS which has been out of mainstream support for over a decade, and out of extended support for over five years?
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yep,
There are a few third-party options. I'm not a C# dev, but I heard that Bouncy Castle[^] does TLS 1.3 or maybe a libcurl wrapper would be an option.
|
|
|
|
|
|
I would probably try to explain customer that the problem is not in my application but in operating system. If I was creating a protocol that does not work on an operating system, I would have explored further to fix it. But here it appears you are creating an application which has some pre-requisites which are outside or your control and must be provided by consumer of your application.
I would stay away from try to fix this as soon someone would show up with a XP based computer and now I need to support that as well.
"It is easy to decipher extraterrestrial signals after deciphering Javascript and VB6 themselves.", ISanti[ ^]
|
|
|
|
|
Hello everybody,
If i used ClickOne, where could i say the path the program has to be installed in the user pc?
|
|
|
|
|
ClickOnce apps are installed per-user, meaning every user on a machine has their own copy of the app in their user profile under C:\Users\userId\AppData\Local\Apps\2.0. Each app has it's own folder and another folder assigned to it under the Data folder.
|
|
|
|
|
Thanks a lot, than mean that i can not change the pre-defined folder:
C:\Users\userId\AppData\Local\Apps\2.0. ?
|
|
|
|
|
No, you can't.
If you're looking for something more akin to a normal .MSI installer, you're going to have to use a 3rd party packaging tool, like Wix, InnoSetup, Advanced Installer, InstallShield, or the like to package up your app.
|
|
|
|
|
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class moviment1 : MonoBehaviour
{
public float Speed;
public float JumpForce;
public bool isJumping;
public bool doubleJump;
private Rigidbody2D rig;
void Start()
{
rig = GetComponent<Rigidbody2D>();
}
void Update()
{
Move();
Jump();
}
void Move()
{
Vector3 movement = new Vector3(Input.GetAxis("Horizontal"), 0.0f, 0.0f);
transform.position += movement * Time.deltaTime * Speed;
}
void Jump()
{
if (Input.GetButtonDown("Jump") )
{
if(!isJumping)
{
rig.AddForce(new Vector2(0.0f, JumpForce), ForceMode2D,Impulse);
doubleJump = true;
}
else
{
if(doubleJump)
{
rig.AddForce(new Vector2(0.0f, JumpForce), ForceMode2D,Impulse);
doubleJump = false;
}
}
}
}
void OnCollisionEnter2D(Collision2D collision)
{
if(collision.gameObject.layer == 8)
{
isJumping = false;
}
}
void OnCollisionExit2D(Collision2D collision)
{
if(collision.gameObject.layer == 8)
{
isJumping = true;
}
}
|
|
|
|
|
If that's how your code is really formatted, it's no wonder you're getting this error.
It means you have mismatched { and } characters in your code.
Clean up the formatting, making sure matching { and } line up and are indented properly and you'll find the problem.
The error says you're missing a closing brace at the end of the code snippet you posted.
|
|
|
|
|
Hi Joana,
You need one more } to close the class. Add it to the end of your class.
See Sample below:-
//==================================================================================
public class moviment1 : MonoBehaviour
{
public float Speed;
public float JumpForce;
public bool isJumping;
public bool doubleJump;
private Rigidbody2D rig;
// Start is called before the first frame update
void Start()
{
rig = GetComponent<Rigidbody2D>();
}
// Update is called once per frame
void Update()
{
Move();
Jump();
}
// MOVE
void Move()
{
Vector3 movement = new Vector3(Input.GetAxis("Horizontal"), 0.0f, 0.0f);
transform.position += movement * Time.deltaTime * Speed;
}
// JUMP
void Jump()
{
if (Input.GetButtonDown("Jump"))
{
if (!isJumping)
{
rig.AddForce(new Vector2(0.0f, JumpForce), ForceMode2D, Impulse);
doubleJump = true;
}
else
{
if (doubleJump)
{
rig.AddForce(new Vector2(0.0f, JumpForce), ForceMode2D, Impulse);
doubleJump = false;
}
}
}
}
void OnCollisionEnter2D(Collision2D collision)
{
if (collision.gameObject.layer == 8)
{
isJumping = false;
}
}
void OnCollisionExit2D(Collision2D collision)
{
if (collision.gameObject.layer == 8)
{
isJumping = true;
}
}
}
|
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with - we get no other context for your project.
Imagine this: you go for a drive in the country, but you have a problem with the car. You call the garage, say "it broke" and turn off your phone. How long will you be waiting before the garage arrives with the right bits and tools to fix the car given they don't know what make or model it is, who you are, what happened when it all went wrong, or even where you are?
That's what you've done here. So stop typing as little as possible and try explaining things to people who have no way to access your project!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You have already posted this in QA:
Windows devices humaninterfacedevice[^]
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Good afternoon,
Where can I find a tutorial that will help me understand how to capture when a user presses the "X" in the upper right corner of the form? Right now everything is working fine, but when they press the "X" in a child form, it doesnt return to the parent form or in the case of the main form, exit the application.
So, something to show me how to capture when that "X" is clicked.
Richard
Disable Vet
Grandfather
Pain in the @ss
|
|
|
|
|
|
Select the Form in the Designer window, and click on the FormClosing event in the properties window. The event will be fired when the user clicks the X button.
|
|
|
|
|
If that exe is not running on machine then need to run the windows form exe from Windows Service,
|
|
|
|
|
You can't. That's the whole point of a Service: it has no interaction at all with the user, and will run even when a user is not logged in. Services run in an isolated session that is absolutely prohibited from any interaction with the user, desktop, display, keyboard, mouse, or any other HMI device.
So it can't start an app that has any interaction with the user because it has no idea what user that might be, or even that there is a keyboard and display attached to the computer ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You can use Task Scheduler to start a Windows App at a given interval if it hasn't already been started (single instance option).
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|