Unofficial Content

FAQ .Net

Common errors

Failed to generate a strong name
Failed to import Net Native assembly

WEB

.Net application 64 bits
Framework 4.0

Server Application Unavailable
The format of the file 'HXXXX' is invalid
403- Forbidden
404- Page cannot be found
500.19- Internal Server Error
500.21- Internal Server Error
503.- The service is unaivalable
Operation is not valid due to the current state of the object
Could not file load or assembly
Access is denied
Genexus Fast Access exception message
Object referenced is not set to an instance of an Object
Access to path is denied
Specified cast is not valid
Method .. does not have an implementation
File or assembly name GXData, or one of its dependencies, was not found
Application has generated an exception that could not be handled
Index was outside the bounds of the array
Infinite recursion detected
There is an error in XML documen
This collection already contains
Configuration Error
A potentially dangerous Request.Form value was detected from the client
the underlying connection was closed

WIN<

GuiModels

Reorganization

Reorg FAQ

How to include an external dll?

There are three cases:

1- Call a dll or .NET component

The most common practise is using and External Native object. To do that are needed two steps
1. import the assembly (througth the Wizard)
2. that programming a code like this: &Extobj.SUMGX(&num )

For further information External Object Example: Native Object (.NET)

For compatibility purpose you could also define an specific cs and programming following like this
Call('SUMGX', &num)
For further information please refer to: http://www.gxopen.com/gxopen/servlet/projectinformation?395

2 - Call a dll COM

To call a dll Com from a .NET application, there is the "tlbimp" tool, which generates a dll .NET that operates as a bridge over the dll com. <o:p> </o:p>

E.g.:tlbimp /out:GXNET.dll GXCOM.dll

The generated dll (GXNET.dll) is a dll .net based on the COM (GXCOM.dll)
This case is similar to the previous one, but in C you copy the dll created with tlbimp and the dll com.
Find an example at: http://www.gxopen.com/gxopen/servlet/projectinformation?8 version 1.4.2

3- Call a dll No COM from .NET

Create a CS with the function definition. This case is similar to case 1, but using .NET Dllimport command it would be as follows:
DllImport("XXXXX.dll")

public static extern bool funcion(string YYYY ... );
public void execute(ref string YYYY )
{
/// call dll No COM functions

Note that it must also have the execute builder, which is the code translated by the generator in the source when doing a call.
Important: IN 80 version there is a change in calls internal generation:
In 7.5 version, on making a call to any procedure, the following is generated: new FUNCTION (ref _Context).execute(ref parm1 ...);
In 80 version, on making a call to any procedure, the following is generated: new FUNCTION(context ).execute( ref parm1 ... );
This implies that on migrating from one GeneXus version to the other, you must modify the builder (the builder parameters are no longer by reference).
Find an example at:
http://www.gxopen.com/gxopen/servlet/projectinformation?395

How to generate PC code from il code?

There is the "ngen" tool, which compiles .NET platform intermediate code (IL code) in PC code. This could improve the execution performance,
ngen hgxtech.dll - this compiles the dll to PC code and installs it
ngen /show – shows the installed dlls
ngen hgxtech /delete – uninstalls it (operates with the Just in Time again)

How to debugging an application?

There are two kind of debugging code:

Debug the genexus code using Debugging in GeneXus
Can be debugged the generated code with dbgclr.exe located at: <ProgramFiles>\Microsoft.Net\Frameworksdk\guidebug or with the Visual Studio one, you can do it also from there.

How to configure access to database production enviroment?

In order to configure the database access parameter's , exist one tool named Gxconfig.
It allows to specified: database Name, server, user password included in the .config file.

For more information please refer to Gxconfig

<o:p> </o:p>

<how a="" code="" compile="" generation="" genexus="" to="">

In order to create an assembly from the genexus generation code (*.CS file), it is enough to run the following command (from a command line)

	              csc @file.RSP 

where File.Rps is generated automatically like the source file (File.CS)

Note: this is the same command that is executed when Run an object from Genexus IDE

</how>

.Net remoting<

<o:p>It is a communications protocol for distributed objects. It may run on HTTP or TCP. If it runs on HTTP it can establish the communication in binary modality or using SOAP protocol.
For more information:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/introremoting.asp</o:p>

ADO.NET

ADO.NET is the native database access method in .NET platform. This group of libraries used to access data is contained within the .NET framework. They provide a significant improvement in the database access performance with the .Net generator. Besides, at technological level, 100% “.NET managed code is used.

ASP .NET Configuration Section

Assembly

It is the unit of the objects programmed with .Nethttp://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconassembliesoverview.asp<o:p> </o:p>

Code Access Security

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/spptsdk/html/SPCodeAccessSec.asp<o:p> </o:p>

COM+

COM+ is a services infrastructure that supports components execution. Among these services we can mention the following: automatic transactions, queued components, object pooling and other. Implementing COM+ components is possible in .NET. <o:p> </o:p>

Common Type System - CTS

CLR uses something called CTS for a strictly reinforced security type. This ensures that all the classes are compatible among them, describing types in a common way. CTS defines how the types operate in runtime (their declarations and their uses), which enables those types in a specific language to operate with types in other languages, including the management among different languages by exception.
In addition to guaranteeing that the types are suitably used, in runtime it is also ensured that the code does not attempt to access the memory that was not assigned to it (i.e.: it is a code with type security). <o:p> </o:p>

GeneXus .NET Generator

http://www.gxtechnical.com/net<o:p> </o:p>

Global Assembly Cache (GAC)

It is a reserved memory area used by .NET to store the assemblies of the applications running in a PC. An assembly must have a “Strong Name” to be stored in the GAC.
For more information:http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconglobalassemblycache.asp<o:p> </o:p>

Log4net

http://logging.apache.org/log4net/<o:p> </o:p>

Managed Code

It is the code pointing at .NET that contains certain information extra metadata to describe itself. Although both the “managed code” and the one that is not can run in an execution PC, only the “managed code” contains the information that enables the execution PC to guarantee execution security and interoperability, among other things. <o:p> </o:p>

Managed Data

CLR provides memory assignment and unassignment features as well as deletion of superfluous information or trash. Some .NET languages use “managed data” by default (.NET, Visual Basic.NET, JScript.NET), while other (C++) don’t.
Depending on the language being used, the fact of pointing at CLR may establish certain constraints as regards features availability. E.g.: C++ loses the multiple inheritance. In addition to the possibility of having “managed code” and the one that is not, it is also possible to have “managed data” or not in .NET applications (data whose trash is not deleted but are nevertheless controlled by the “managed code”).<o:p> </o:p>

ODBC

ODBC(Open Database Connectivity) is a Database access standard developed by Microsoft. Its functionality is enabling to establish the connection of the application with the database with no need to know the DBMS where data are stored. ODBC is the intermediate tier between the application and the DBMS. The purpose of this tier is translating application data queries into commands that the DBMS can understand.

<o:p>The ODBC connection to the database is not supported in .NET generator since Genexus 9.0 version<o:p> </o:p></o:p>

<st1:place w&#58;st="on"><st1:placename w&#58;st="on">Session</st1:placename> <st1:placetype w&#58;st="on">state</st1:placetype></st1:place>

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconsessionstate.asp<o:p> </o:p>

Strong Name

A "Strong Name" determines the identity of an assembly, made up by its name and version plus a public key and digital signature. The .NET framework offers the possibility of assigning a “Strong Name" to an assembly.
For further information refer to: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconstrong-namedassemblies.asp

WMI (Windows Management Instrumentation)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/wmi_start_page.asp

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant