Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Die Delphi-IDE (https://www.delphipraxis.net/62-die-delphi-ide/)
-   -   Aufeinmal ist die "Klasse nicht registriert" (https://www.delphipraxis.net/214527-aufeinmal-ist-die-klasse-nicht-registriert.html)

NoName1 24. Jan 2024 15:27

Aufeinmal ist die "Klasse nicht registriert"
 
Liste der Anhänge anzeigen (Anzahl: 1)
Guten Tag Delphianer,
ich bekomme seit heute ein Fehlermeldung beim Senden von E-Mails, die ich mir nicht erklären kann.
Folgendes:
Die Software liegt auf einen Server und die Fehlermeldung tritt beim Versenden von E-Mails auf.
Gestern konnte noch alles reibungslos gesendet werden.
Ich benutze zum Senden die EMail-Architect Units.
In der Anlage ein Screen-Shot der Fehlermeldung.

Hat jemand einen Rat was ich tun kann?
Vielen Dank an die Helfer

hoika 24. Jan 2024 16:20

AW: Aufeinmal ist die "Klasse nicht registriert"
 
Hallo,
das ist wohl eine ActiveX-DLL.
Wahrscheinlich wurde sie bei der Installation schon registriert.

Lösung:
regsrv32 dein_email.dll

PS:
Dazu sind Admin-Rechte notwendig.

himitsu 24. Jan 2024 17:13

AW: Aufeinmal ist die "Klasse nicht registriert"
 
Strg+C im Dialog und hier Strg+V in ein [QUOTE], dann könnte man die GUID mal eben schnell kopieren, um aus neugier mal Google danach zu fragen. :stupid:

Hab hier kein D11 und daheim hab ich dann keine Lust die versteckte OCR-Funktion im Screenshottool missbrauchen zu müssen.

hoika 24. Jan 2024 17:34

AW: Aufeinmal ist die "Klasse nicht registriert"
 
Hallo,
registration free COM, oha, wieder was gelernt.

https://www.emailarchitect.net/easen...ject_reg_a.htm

Sinspin 25. Jan 2024 06:49

AW: Aufeinmal ist die "Klasse nicht registriert"
 
Das erfordert ein bisschen mehr Arbeit bei der Implementierung und ein Tool von MS um die passenden CLSID aus einem ActiveX zu extrahieren, aber das ist eindeutig das Mittel der Wahl wenn man auf einem Rechner nix installieren kann. Ist ehwig her das ich CLSID aus einem ActiveX extrahiert habe, kann mich nicht mehr erinnern was für ein Tool nötig war :oops:

hoika 25. Jan 2024 07:08

AW: Aufeinmal ist die "Klasse nicht registriert"
 
Hallo,
nun, in diesem Fall sind die ja im Manifest vorgegeben.

NoName1 25. Jan 2024 12:35

AW: Aufeinmal ist die "Klasse nicht registriert"
 
Ersteinmal vielen Dank an alle die geantwortet haben.
Zweierlei habe ich getan:
1. Das Manifest aus den Projekt-Optionen entfernt und "Alles neu erstellen lassen"
2. Das Manifest wieder den Projekt-Optionen hinzugefügt und "Alles neu erstellen lassen"
3. Die neu erstellte Exe auf den Server in das entsprechende Verzeichnis kopiert
4. E-Mails an 4 Adressen erfolgreich versandt.

Was nun auftritt ist folgendes:
Nach dem Versenden und Verlassen des Servers wurden dem Ordner alle Zugriffsrechte entzogen.
D- H. ich konnte mich zwar wieder am Server anmelden, hatte aber keine Zugriffsrechte mehr auf das Programm?

Was mag hier nun geschehen sein? Kennt sich evtl. jemand damit aus und hat einen Ratschlag??

Vielen Dank für weitere Vorschläge.

Kas Ob. 25. Jan 2024 13:30

AW: Aufeinmal ist die "Klasse nicht registriert"
 
Zitat:

Zitat von NoName1 (Beitrag 1532555)
3. Die neu erstellte Exe auf den Server in das entsprechende Verzeichnis kopiert

How ? and this is your problem !

Did you use Windows RDP ? in this case the files you are uploaded files are in very peculiar position and here comes the user permission to complicate things.

To explain: RDP will connect with Windows User credential on the server, while RDP will mix this with your own credential from your Windows User permission, will copy files and give them permission from your own local user permission, your local and special folders on your device will play role in that.
Notice that : Terminal service is Windows system, and have very high privileges at its core, but will limit what RDP user can do according to their credential and privileges, also because file transfer in RDP is an extension done by the Windows Explorer not by the TS itself.

also when you registered that EMail Architect activeX (i have never used it) it might registered to specific user on the server, hence when you are logged on and ran your own application things go smoothly, but after you disconnect RDP, Windows will revert to its own User and permission and that ActiveX could be installed to different user from the Windows perspective, hence your application can't access/found it.

these might help you fix this:
1) register that ActiveX to everyone (or at least for the user that will run the EXE), this might be tricky just a little bit, open mmc in console then from file -> add/remove snap.. -> Component Services, from here find your activeX then right click for properties , there is also DCOMCNFG command will load the above directly, did not work for me always and on all Windows, adjust the permission in security tab.
2) check and compare your application permission that uses that ActiveX, make sure it is handled as local application and the owner is the User on the Server not your user form your PC, this happen if your are using wrongly configured AD (or simply enforced override policy), also there might be a conflict between two different Active Directory for both your device and the server, after checking the difference in the permission try to adjust the folder you are uploading to using RDP not the EXE itself, it might fix the problem and prevent it in the future, but again it must not conflict with active AD configuration.
3) may be the easiest way, simply, don't upload files specially executables using RDP, use any different approach, from sending an email with attachment ... to install FTP server on your server and use it to upload, then you can simply disable it, for me i have always a simple server installed (as service) on my servers that i do enable and can share files between my PC and the remote server, permission will always be the same as this RTCServer.

Hope that help, or at least give you a place to start, i am not sure what have changed in Windows 11 or latest Windows Server versions with the latest updates, but your problem security and permission and their policies.

ps : there is another approach but really i don't know if it is still possible or working with your setup, in RDP settings you can share you drives with the remote server, hence you will see your local drives are mounted drives remotely, so don't copy and paste you EXE using the RDP from your own folder, instead open your own drive on the remote server and copy the file form there to local folder.

NoName1 26. Jan 2024 08:48

AW: Aufeinmal ist die "Klasse nicht registriert"
 
Danke für die Nachrichten,
das Problem ist ja nicht, wie ich glaube der RDP von Microsoft, weil zu Anfang des Jahres und auch vorige Woche noch alles korrekt aufzurufen war. Kann es sein, dass evtl. jetzt, nach dem Update von Microsoft, Probleme bezgl. des RDPs entstanden sind? Denn auch der Server hat ein Update erfahren.
Die vorhandene Version des Programms auf dem Server, ist noch die vor dem Update von Microsoft und mit dieser können E-Mails problemlos vom Server versandt werden!

Ich suche den Fehler immer zu erst bei mir, sprich in der Programmierung. Daher werde ich das Programm auf den Stand Anfang des Jahres zurücksetzen und testen ob damit die E-Mails vom Server versandt werden können. Wenn das zu Fehlern führen sollte, dann muss etwas in der Programmänderung geschehen sein. Ich kann mir nicht Vorstellen was dies sein sollte. Es wurde einiges Weiterentwickelt das aber mit dem Programmteil -E-Mail- nichts zutun hat. Von meinem Rechner können die E-Mails korrekt aus dem Programm versandt werden. Manifest und DLL von EArchitect sind auf dem Server und werden angenommen, da sonst nicht gesendet werden könnte. Also doch der Server:?::?::?:

Kas Ob. 26. Jan 2024 11:18

AW: Aufeinmal ist die "Klasse nicht registriert"
 
May be i missed something in the translation, so sorry if that is the case because i might not understand this clearly

Zitat:

Zitat von NoName1 (Beitrag 1532576)
DDaher werde ich das Programm auf den Stand Anfang des Jahres zurücksetzen und testen ob damit die E-Mails vom Server versandt werden können.

Translated
Code:
 Therefore, I will reset the program to the status at the beginning of the year and test whether the emails can be sent from the server.
DO NOT delete your application or any files, also don't replace any, just rename them, so if the problem was/is in the permission you will need them to get to the bottom of this problem and understand this in clear way, in case the problem is attached to them, then they worth money and time for you (to analyze).

Just rename all the files you want to replace and keep them on the server for future references.
Try with the same folder(s) or rename the folder in full too, also don't delete them until you are 100% they are irrelevant.


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:01 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz