Some warnings and error

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
Horst
Posts: 336
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post 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
User avatar
Horst
Posts: 336
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post 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
User avatar
robert
Posts: 4520
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Some warnings and error

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Horst
Posts: 336
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post 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
Frank Maraite
Posts: 178
Joined: Sat Dec 05, 2015 10:44 am
Location: Germany

Some warnings and error

Post 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
User avatar
Horst
Posts: 336
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post by Horst »

Hi Frank

Yeah that will help much. Before in VO i had also no DLL , i made libraries.

Horst
User avatar
Chris
Posts: 4906
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Some warnings and error

Post 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)
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
Horst
Posts: 336
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post 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
User avatar
Horst
Posts: 336
Joined: Tue Oct 13, 2015 3:27 pm

Some warnings and error

Post 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
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

Some warnings and error

Post by wriedmann »

Hi Horst,

this is a great notice!

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Post Reply