Page 5 of 9
Some warnings and error
Posted: Fri Sep 29, 2017 2:24 pm
by Horst
Hi Chris
Yes all dlls are in the same folder.
in the meantime I was moving the dll and exe to my virgin
server. maybe there the iis will work different.
i started the exe on the dos prompt and it runs till a known error ,no problem all is still ok.
then i let the cgi run over the browser and comes this
Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisierer für "Logout.Exe.Functions" hat eine Ausnahme verursacht. ---> System.IO.FileNotFoundException: Die Datei oder Assembly "VulcanRTFuncs, Version=3.0.301.0, Culture=neutral, PublicKeyToken=0e73a8bf006af00c" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
bei Logout.Exe.Functions..cctor()
--- Ende der internen Ausnahmestapelüberwachung ---
bei Logout.Exe.Functions.Start()
so i think all the main troubles i have is because iis cant find the assamblys ???
i try now to put them into the GAC folder, i read about that.
Horst
Some warnings and error
Posted: Sat Sep 30, 2017 8:58 am
by Horst
Ayay not so easy.
First i wanna turn on the compiler swith /appconfig, maybe a applikation config file will solve my troubles.
But i dont find it in vs15 ?
Horst
Some warnings and error
Posted: Sat Sep 30, 2017 10:15 am
by robert
Horst,
You can add an app.config file to your project. This should automatically be copied as My.Exe.Config to the output folder.
If you want to use the /appconfig compiler option then there are some alternatives:
1) Add it as 'Extra Command Line Option' to the build page of your application properties
2) Follow the instructions on the page:
https://docs.microsoft.com/en-us/dotnet ... ler-option
However, I am not sure if this is going to help you. I have a problem trying to understand the problems that you have.
Robert
Some warnings and error
Posted: Sat Sep 30, 2017 10:39 am
by Horst
Hi Robert
Normaly when a .Net Exe starts the system is looking for the assemblies in the start folder of the exe or in the gac folder.
when IIS starts the exe, the dll will not be found and my cgi has a error. so , my hope is, IIS will look into the app.config file for the dll's
this bob denny has the same problem in the link, i tried the cmd solution and it works, the other solution i dont understand.
https://stackoverflow.com/questions/229 ... gi-program
But i am not happy with this workarrond.
i saw a example for c# to add the app.config to the project via simple add a new item, but i do not found this in VS for x#.
Horst
Some warnings and error
Posted: Sat Sep 30, 2017 11:16 am
by Frank Maraite
Hi Horst,
I link the assemblies into one exe. Then there is no doubt where to find them.
The con under IIS is: the dll's are not shared resulting in more memory usuage, as I understand right.
I'll send you an example when I'm back to my developing machine.
Frank
Some warnings and error
Posted: Sat Sep 30, 2017 11:32 am
by Horst
Hi Frank
Yeah that will help much. Before in VO i had also no DLL , i made libraries.
Horst
Some warnings and error
Posted: Sat Sep 30, 2017 12:29 pm
by Chris
Hi Horst,
Hmm, maybe the problem is with the specific SDK_Defines.dll file, because it does not have version info. Please make an experiment, remove it from the references of your project, rebuild and use the new files, maybe t works ok now? Or now you get a different error.
In order to compile your code without the SDK_Defines.dll reference, you will need to add manually the DEFINEs that are used by it, but this is easy, you can just copy & paste them from VO. Below I have included the defines that I've seen that you use in your code, just add them in one of your prg files
Chris
DEFINE DBI_GETRECSIZE := 7
DEFINE DBI_FILEHANDLE := 23
DEFINE DBI_ISANSI := 25
DEFINE DBOI_POSITION := 3
DEFINE DBOI_SCOPEBOTTOMCLEAR := 42
DEFINE DBOI_SCOPEBOTTOM := 40
DEFINE DBOI_SCOPETOP := 39
DEFINE DBOI_SCOPETOPCLEAR := 41
DEFINE DBS_NAME := 1
DEFINE DBS_LEN := 3
DEFINE DBS_TYPE := 2
DEFINE FO_READ := 0
DEFINE FO_READWRITE := 2
DEFINE FO_SHARED := 0x00000040
DEFINE FC_NORMAL := 0x00000000
DEFINE FS_SET := 0
DEFINE FS_RELATIVE := 1
DEFINE FS_END := 2
DEFINE MB_OK := 0x00000000U
DEFINE MB_OKCANCEL := 0x00000001U
DEFINE MB_TASKMODAL := 0x00002000U
DEFINE F_ERROR := PTR(_CAST,0xFFFFFFFF)
Some warnings and error
Posted: Sat Sep 30, 2017 12:41 pm
by Horst
Hi Chris
i was copy all files to my server and try to start it under a other IIS, and there the CGI stops also , the EXE cant find the first Dll he needs, its a Vulcan Dll.
Its a IIS thing. Maybe there is a folder to copy the assemblies but there are no infos about in the web. all is also prefering ASP and CGI is more written in native language.
Horst
Some warnings and error
Posted: Tue Oct 10, 2017 7:44 am
by Horst
Hi
I am happy
My first simple CGI compiled with X# is running.
One big thing is different to VO CGI. All the .NET DLL's you need has to be in the GAC Folder otherwise IIS will not found them. After houres searching in the web , i did not found a solution for that. So i had to write the Defines from SDK_Defines.dll into my PRG. The Vulcan RT is working ,only some Function will not work because of IIS restrictions i think - Workdir().
Thanks to all
Horst
Some warnings and error
Posted: Tue Oct 10, 2017 7:59 am
by wriedmann
Hi Horst,
this is a great notice!
Wolfgang