reeeeeee
Saving Draggable objects location wpf
I have like 10 different objects which can be draggable across canvas (textboxes, labels, WrapPanels, DockPanels, etc).
I would like to save their location so it will be shown after the restart.
What would be the best way to achieve that?
Obviously i could do like 3 bindable properties for each object (vlaue, positionX, positionY), but that would be 30 properties which would be really messy and like 150 lines of code (with mvvvm binding). Any idea?
18 replies
When to use Dependency injection?
I am learning WPF and since I am used to work with DI almost always in my previous projects (mostly APIs) I am not sure if I need it.
Is using DI in wpf really best practice?
My app is currently not really complicated, I only have some kind of Get data from API and save to db. Is DI recommended in this case? or does wpf have any special "best practices" what should you work with?
5 replies
WPF Design patterns
Hey!
I was wondering, how is the WPF solution structured? How detailed should it be separeted in multiple projects? Is it similar to APIs or something? So "WPF project" (views, viewmodels), "application project" (services, models), "Data project" (working with db), etc?
6 replies
Multilayer architecture - explanation?
tl;dr: Have been mostly working on existing projects and have some problems in early stages of the architecture development.
Hey all!
I would need some additional explanation on how do you usually approach the multilayer architecture. I came across one early project which already had some of the projects made, but idk why and what should even be there (lets call this project
ExplainMe
.
So I have 4 "project" inside: ExplainMe
(controllers), ExplainMe.Core
(currently empty), ExplainMe.Data
(entities), ExplainMe.EF
dbContext..
Lets say I would like to implement an API request url/api/user?name=john
- Create UserController
inside ExplainMe.Controllers
.
- Create UserService
inside ExplainMe.Core.Services
(i assume?).
- what now? Which class am I missing and where? somewhere should probably be IUserService
, but where?23 replies
Random ERR_CONNECTION_RESET when uploading PDF files
I have angular SPA and .NET web API. One functionality is file upload, which usually works fine, but sometimes I am getting random ERR_CONNECTION_RESET errors which I can't explain.
They only occur on PDF files and they are completely random. The file can be 50kb, or 5MB. Sometimes you can upload one file normally, later the same file fails 5 times. Funny thing is, the file is still sent and processed on the server, but I looks like something cancel/ignore upcoming response.
One more problem is that this can only be reproduced when the apps are deployed on the server, when I debug it locally, everything works fine.
Any idea what could be the problem? Honestly I don't know what should I even look for. Is this the API problem, or the ANgular application?
9 replies
ReCaptcha verify - The response ended prematurely
I an getting this error, when sending captchaData to the server for verifying. I would think the problem would be with accessing internet connection, but as far as I can see, the recaptcha verifying site can be accessed from the server. (https://www.google.com/recaptcha/api/siteverify)
Any idea what else can i check?
18 replies
ReCaptcha verify - The response ended prematurely
Kinda all in the title. I would think the problem would be with accessing internet connection, but as far as I can see, the recaptcha verifying site can be accessed from the server. (https://www.google.com/recaptcha/api/siteverify)
Any idea what else can i check?
1 replies
✅ Verify ReCaptcha on private server
I have implemented ReCaptcha that is deployed to private server which does not have access to internet. I have to whitelist the ReCaptcha verifying URL. In the docs https://developers.google.com/recaptcha/docs/verify there is this url
https://www.google.com/recaptcha/api/siteverify
. So if I whitelist this URl, the captcha should work? Or does anything else need to be whitelisted? What are the odds that google will change this url?5 replies
LDAP authentication stopped working for one user
Hey all! I had an LDAP auth implemented on my site, which worked fine for past two years, but randomly stopped working for one user after he changed password.
The code is like this
I am getting returned the username or password is incorrect. Should I implement this better? How can I even debug this? Can I check anything on the AD / LDAP side?
13 replies
Captcha service
I am implementing an announcement form for our client and I need to implement the Captcha step before the submit.
I am using angular SPA and .net 7 MVC (with separate controllers for SPA).
I see that the most popular captcha services are google recaptcha and hCaptcha, where you need to register your page, and other captcha services are kinda outdated. Would be better to just use the reCaptcha/hCaptcha, or is it worth implementing it on my own?
3 replies
LDAP login after password change
I have an older implementation of the Web API for AD users login with LDAP path.
Technically everything worker for the past few years, but now the client said that after he changed his password, he can't login to the app anymore. This occured a few weeks ago, so I think that all of the "LDAP syncing" went trough already...
I tried to duplicate this, and after password change, actully both new and old passwords worked fine. After like one hour, the old password stopped working and only the new one works now.
This is my implementation of the login, I see there are different kinds of approach, is there any better one that would kinda "force" to use only the latest password?
1 replies
How well do deployed .NET Framework apps handle .net update?
For example, if I have .Net 4.5 Framework application deployed on Windows server, how well does it handle any .NET Framework updates?
If I keep .NET 4.5 version on the server, and install .net framework 4.8 or .NET Core, could this stil be problematic, since the 4.5 is still installed?
What about
Security Updates for Microsoft .NET Framework
, this shouldn't cause any problems, right?13 replies
✅ Problems with NHibernate, FluentNHibernate, StructureMap
I have been trying to fix this bug in an older project (which needed to be updated to .net framework 4.6.1, because of some other newer libraries), but I just didn't really make any progress.
I will post some of the stack trace, but please let me know what else should I include (except whole project, lol), so it would be easier to help.
7 replies
❔ Remove Index from URL
How do I remove "Index" from Url, so I can call
/Home
, /Users
, etc, wihtout additional /index
. (but obv be still redirected to "Index" method in controller.
I found this snipped and added it to my startup
Well, the Index is still there, and all actions without "Index" are redirected to my Users/edit/{id}
action..20 replies
❔ Razor pages - Filtering data (shown in table) by some random filters
As mentioned in title, I am showing some data in table, and I need some filters, like
serialNumber, dateFrom, DateTo, No, Status,..
.
How could I implement this functionality in mvc razor pages?
One way would be to append all those filters into the URL, is this proper way to do it? (I was thinking on looking for something without all those mess in url)
Thanks!18 replies