When I create a console app it works for the driver.
When I create a web application asp.net then the driver does work. The properties of this application:
- target framework 4.0
- Platform target: any CPU
I changed 'any cpu' to 'X86' but the same problem then with 'X64' also the same problem
- the web: I checked the option "use Visual Studio Development Server"
instead of "use Local IIS Web Serve"
A console app is not an ASP.NET app. They work in completely different ways.
A platform target of "AnyCPU" runs, by default either as the CPU architecture on older versions of .NET or as a 32-bit app.
Changing the platform target to "X86" forces the app to run as 32-bit only, even on a 64-bit machine.
Change the target to x64 to match the architecture of the .DLL's you're using. In IIS, in the Application Pool you are running your code under, under Advanced Options, there is an option to run the app as a 32-bit app instead of 64-bit. If that setting is turned on, your code will run as 32-bit instead of 64-bit.
Also, you MUST install the Oracle Client on the IIS server in order for Oracle database access to work.
Je vous informe que dans les paramètres avancés de pool application que l'option " activer les applications 32 bits" est déja comme valeur "false"
j'ai changé "Platform target" à X86
mais le même message d'erreur.
Impossible de charger le fichier ou l'assembly 'Oracle.DataAccess' ou une de ses dépendances. Tentative de chargement d’un programme de format incorrect.
I inform you that in the advanced application pool settings that the option "activate 32-bit apps" is already as "false"
I changed "Platform target" to X86
but the same error message.
Can't load the 'Oracle.DataAccess' file or assembly or any of its dependencies. Attempting to load an incorrectly format program.
Uhhh... I just got done telling you that x86 means "32-bit" and running 32-bit code in the App Pool is turned OFF. Change the platform target back to x64.
Now, if you're deploying just a single Oracle .DLL with your app, you're definitely doing it wrong. Oracle requires and entire Client installation in order to work. Just deploying one of two .DLL's with Oracle in the name will NOT WORK.
I downloaded the .zip folder ODAC112040Xcopy_32bit and ODAC112040Xcopy_64bit
Do I have to use ODAC 32bit or ODAC 64bit?
This folder contains several types of dll
so what .dll to add to my project?
You're doing this all wrong. You don't just add a .DLL to your project. Oracle does not work that way. Forget what you downloaded.
You have to install the Oracle Client and add ODP.NET to your project through the Nuget Package Manager under the Tools menu in Visual Studio. In NPM, search for "ODP.NET4" and add that to your project.
When deploying your application to a server, that server must also have the Oracle Client installed else your application will not work.
J'ai téléchargé "ODAC112040Xcopy_32bit" et j'ai copié les .dll necessaires dans mon projet et j'ai ajouté le driver "Oracle.DataAccess.dll" dans la partie reference de mon projet. J'ai target platform avec 32 bit.
Après compilation et exécution, alors le driver a été bien chargé mais je ne peux pas connecter au base oracle sachant que de version 9i et lire le contenu d'une table.
J'ai le message suivant :
System.TypeInitializationException: Une exception a été levée par l'initialiseur de type pour 'Oracle.DataAccess.Client.OracleConnection'. ---> Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
--- Fin de la trace de la pile d'exception interne ---
à Oracle.DataAccess.Client.OracleConnection..ctor(String connectionString)
à WebServiceToBD.Service1.view_data() dans d:\Developpement\SiteVs2012\WebServiceToBD\Service1.asmx.cs:ligne 48
Voici le code de méthode :
public DataTable view_data()
OracleConnection conn = new OracleConnection("Data Source=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.*)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = ***)));User ID=***;Password=***");
OracleDataAdapter dr = new OracleDataAdapter("select * from Personne", conn);
DataSet ds = new DataSet();
DataTable tt = ds.Tables;
La ligne 48 correspond au code suivant :
<pre lang="c#">OracleConnection conn = new OracleConnection("Data Source=(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = *.*.*.*)(PORT = 1521))(CONNECT_DATA = (SERVER = DEDICATED)(SERVICE_NAME = ***)));User ID=***;Password=***");
Cette chaîne de connexion existe dans le programme et pas dans le fichier "Web.config".
I used this driver in a .net web service. Then I will call this web service in another asp net project. The web service call and the data recovery work on a table with a reduced number of lines.
Now, I wanted to retrieve the contents of a table that contains 1844 rows and 58 columns.
After compilation and execution, I have the following message:
Server error in application '/'.
The maximum size quota allowed for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
Description: An unhandled exception occurred during the execution of the current web request. Check the stack trace for more information on the error and its origin in the code.
Exception details: System.ServiceModel.QuotaExceededException: The maximum size quota allowed for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.
Erreur du serveur dans l'application '/'.
Le quota de taille maximale autorisée pour les messages entrants (65536) a été dépassé. Pour augmenter le quota, utilisez la propriété MaxReceivedMessageSize sur l'élément de la liaison appropriée.
Description : Une exception non gérée s'est produite au moment de l'exécution de la requête Web actuelle. Contrôlez la trace de la pile pour plus d'informations sur l'erreur et son origine dans le code.
Détails de l'exception: System.ServiceModel.QuotaExceededException: Le quota de taille maximale autorisée pour les messages entrants (65536) a été dépassé. Pour augmenter le quota, utilisez la propriété MaxReceivedMessageSize sur l'élément de la liaison appropriée.
You can't compare threads and timers: that's like comparing electricity to an orange.
A thread is a separately executing "chunk" of code with its own stack which operates independently within a process but which shares common memory with other threads in the process.
A timer is a (fairly) regular event which happens within a thread at an interval.
You need to look at your code - both thread and timer - to work out why your threaded version doesn't work. We can't do that as we have no access to your code other than exactly what you show us - and your code fragment is useless out of context. Do remember that threads cannot access any Controls directly: trying will get you a cross threading exception. Timers don;t have this problem as they run within the thread that created the Timer object.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
You can't access/use controls/variables from different threads. Your normal application is the main-thread, and within it, you can access all that you create there. The timer interrupts execution of that mainthread to execute the timed code with that thread.
If you create a new thread, then this will run seperately from the mainthread, without interrupting it. That's the preferred way, but you'd need to read up on how to synchronize your data with the mainthread.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
Hello, I'm currently making a program that will take a HEX string and convert it into an image.
I talked to a experienced coder and he gave me some steps to my problem:
1) Create a simple hello world program with a main method
2) Make it so your program can print out the byte array you input to the console
3) Figure out how to link in the libraries the code you posted references (looks like SkiaSharp and PakReader)
4) Make the call to the code you showed (TextureDecoder.DecodeImage)
5) Write the resulting SKImage to a file
I'm trying to call a method from a separate program. I'm really inexperienced and confused even after looking at documentation and multiple YT videos.
I had a couple of questions about how I should do this:
I entered code from a YouTube video into Microsofts version 8 compiler but can't get the cards to display. The code is written in 2017 for an older compiler.
In the code it has
Public override string ToString()
Return face + " of " + suit;
Would this code apply to the latest microsoft compiler?
The only code for printing the cards is
Which is looped.
The problem is finding out why the cards are not displayed.
If needed I could give you the whole code but I can't remember how you format the code in this forum.
Cards should be printed as 4 of hearts etc.