Unofficial Content

o   System.IO.IOException: The process cannot access the file client.log" because it is being used by another process.

 
Esto ocurre por ejecutar dos objetos a la vez en el cliente que escriben log. Ambos leen el mismo client.exe.config y tienen el log en ALL al mismo archivo.
Reasons/Solutions:
·         Each file must generate a different log file, instead of client.log they may be for instances client1.log and client2.log (for this, each one must read a different client.exe.config => execute in different directories). 
·         Run two clients with the same client.exe.config and with the log on, and the log name is generated each time; e.g.:  
 
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
<file value="client"/>
<appendToFile value="true"/>
<maximumFileSize value="9000KB"/>
<maxSizeRollBackups value="4"/>
<staticLogFileName value="false" />
<datePattern value="yyyy-MM-ddTHHmmss'.log'"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%d{HH:mm:ss,fff} %t %-5p %c{1} %x - %m%n"/>
</layout>
</appender>
 
E.g.: the following logs may be generated with these settings:
client2003-12-18T163808.log
client2003-12-18T163751.log
….
 
·         Put the log OFF and without appenders in the root:
     <root>
              <level value="DEBUG" />
     </root>
 
·         Leave the log ON (ALL) but with output to console instead of to file. 
          <root>
                    <level value="DEBUG"/>
                    <appender-ref ref="ConsoleAppender"/>
           </root>
------------------------------------------------------------------------------------------
    • Exception: System.Runtime.Serialization.SerializationException
 
Message: BinaryFormatter Version incompatibility. Expected Version 1.0. Received Version 1835627630.1699884645.
 
Reasons/Solutions: This exception has a message that has nothing to do with 'version incompatibility'; actually, an exception was returned from the Server and it is wrongly interpreted by the client. 
 
This occurs in distributed applications. A possible explanation of this can be found at: 
 
In this case, see the server log; usually, the reason is that an error is occurring in the server, in the DB connection or in any procedure in the DB. If looking at the log you still do not see anything strange, try to setup client.exe.config and server.exe.config with soap format:
 
change <formatter ref="binary"/> for <formatter ref="soap"/> in the two config, with this format in the client the exception will be seen with a more understandable message (!= 'version incompatibility').
------------------------------------------------------------------------------------------
 
    • Exception: System.Net.WebException
Message: The underlying connection was closed: Unable to connect to the remote server.
Reasons/Solutions: The remoting server is not found: 
 
When running in IIS (in ADO.NET Only, Application server host model property there is something like this: http://servername/dirvirtual), verify that:
 
·         There is a virtual directory <dirvirtual> pointing at the server of this model
·         Try to access http://servername/dirvirtual in a browser. If "not found" is returned the aspnet_wp may not be registered.
·         When running as console or Windows service (in ADO.NET Only, Application server host model property there is something like this: http://servername:port), verify that:
o   The service has been started and in the same port. E.g.: if port=1234 the following line must be in client.exe.config:
 
<wellknown type="com.genexus.distributed.DistributedObjectFactory, GxClasses" url="http://servername:1234/factory.rem"/>
 
And the following line must be in server.exe.config:
<channel ref="http" port="1234">
 
o   A message of this type may also be displayed if running a program with remoting in IIS and something is modified in web.config (since in this case aspnet_wp is automatically restarted).  
------------------------------------------------------------------------------------------

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