BadImageFormat Exception With Oracle 64 Bit Client Running On Win 7 X64
Jun 30, 2010
I've run into a problem after installing the 64 bit Oracle client onto my Win 7 x64 dev box. I have installed and configured the oracle client and added a reference to it in my library project and it runs without problems when deployed to a Win 2008 R2 server; however I cannot run it in the built-in VS2010 debugger.
The code throws a BadImageFormatException when the .open() statement is called on the connection object.
I figured out that if I will run it in IIS and move the application out of the default application pool, the error goes away for some reason.
However, I can't do this when I'm running the test project (MSTest) and I the result is that I cannot run unit tests against this code. Yes, I can mock it, but I would really like to understand and eliminate this error. There are several cases where I would like to test against some test data in the database.
I've got ASP.NET 4.0 application running on a 64bit OS. IIS is configured to run in 64bit mode (needs to be to support other ASP.NET applications). Is there any way to do this? Oracle doesn't provide a 64bit client as of this writing for .NET 4.0.
I am executing a long-running Oracle stored procedure from .NET. The procedure takes about three hours to run. Ideally, the user should be able to kick off the procedure, close the browser, and come back later to check the results.
The problem is that the connection to the Oracle procedure is lost after exactly an hour. As you would expect, the Oracle procedre runs to completion if it is executed from SQL Plus. Strangely enough, it will also run to completion if I run in debug mode on my local machine (I start two threads, one of which executes the procedure. I set a breakpoint on the second thread).
Here is my connection string:
data source= (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=serverx)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=TestSID)))
I'm a little confused as to what is causing the following error is a very simple application: System.ArgumentException: An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB The code-behind has this:
OleDbConnection conn = new OleDbConnection(ConfigurationManager.ConnectionStrings["db_conn_qa"].ConnectionString);
In the Web.Config, the following is present (note the Provider is clearly there):
I have a web page with 5 textboxes (for branch_id, street, city, state, and zip) and a button. When data is entered in the textboxes, the button is clicked and the data is populated in the database. I have the sql INSERT statement ("insert into branch values(:branch_id, location_type(:street, :city, :state, :zip), staff_nested())") in both the SELECT command and INSERT command. It was originally in just the SELECT command, but I also added into the INSERT command in case I need to do something in the on_insert or on_inserting event. I'm not sure if that would actually work since I click the button to enter.
Anyway, if a duplicate key is entered in branch_id the error "ORA-00001: Unique constraint violated" is raised. I would like to change this and put my own error message, such as "ID is already used, select another." What I have so far is below. I do still get the same message.
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Try Catch ex As OleDbException [code]....
I can't connect to both 9i and 10g from asp.net,when i installed 9i client in a machine which already contain 10g xpress edition and no 10g client 9i client used to connect 9i db in another machine. Both 9i and 10g can be connected with TOAD. i got the following error msg from the asp.net application. System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
I want to insert some values (from asp.net web application) in a table on oracle DB that hosted on a machine rather than the machine that hosts the asp.net application
i use "oracle.dataaccess.client" and the following function
[Code]....
but i get the following exception
The type initializer for "Oracle.DataAccess.Client.OracleConnection" threw an exception
In my asp.net application im using Oracle client. In the connection string, we specify the 3 basic attributes: data source, User Id, and Password. We are using connection pooling. Our data resides in 2 different Oracle schemas. Most of the requests are for data from both Schema1 and Schema2.
Is it possible that the connections are implicitly tied to a schema1 or schema2?
I am having the error stated above. The stack trace is as follows:
[Code]....
Some info's:Server: Windows Server 2008 R2
.NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Oracle.DataAccess, Version=1.102.3.0bit
.NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Oracle.DataAccess, Version=1.102.3.0
My Code: OracleConnection cn; String con1 = ConfigurationManager.ConnectionStrings["myConnectionString"].ToString(); cn = new OracleConnection(); [code]....
I have checked all forums and posts regarding this error. They mention that there are 2 versions of Oracle.DataAccess.Client on the server, I only have 1 version. This runs on VS2010, but when I publish the website the error above shows up. I checked my Oracle connection from the installer and connection test passed. I tried uninstalling Oracle and reinstall, but still the same. The query above I tried changing to 'select region_code, reg_rom, ...', still the same error..
in my project, i am storing a datetime in oracle 10g database and i have to retrieve it as a datatable with all other fields in that table. so when i am retrieving it, i am not getting the same date and time. i am using german culture in database and server side. and i am using US culture in client side. when i store the date for eg., 7/10/1986 13:13:13 then when i retriev it at the same time i am getting an different time. here i am getting a time difference of 3 hours.
when trying to run sql server report manager on Internet explorer its ok ,but when i try to run it in firefox i get thie exception?Server Error in '/Reports' Application.Access is denied. Description:An error occurred while accessing the resources required to serve this request. You might not have permission to view the requested resources.Error message 401.3: You do not have permission to view this directory or page using the credentials you supplied (access denied due to Access Control Lists). Ask the Web server's administrator to give you access to 'C:Program FilesMicrosoft SQL ServerMSRS10.MSSQLSERVERReporting ServicesReportManagerhome.aspx'.Version Information: Microsoft .NET Framework Version:; ASP.NET Version:2.0.50727.4955
I have a website in which code on the production server runs no problem. The same code on my local machine or test server produces the mess seen at the end. The exact same code. Additionally, upon trying to preview any of the table adapters in the dataset I get "DataSet1.thename could not be previewed. The provider is not compatible with the version of Oracle client"
The app is SQL Server. It always has been. It has never used Oracle. Does anyone have any insight on how to fix this? As it is now I can't do anything with my dataset. I can't edit anything in there because of this complaint about Oracle.
Getting the following error when browsing .net 2.0 application System.Data.OracleClient requires Oracle client software version 8.1.7 or greater.
I have setup a .net 2.0 application with oracle backend on windows server 2008 R2. I have oracle client 11g installed on the server for the application to talk to the oracle database. This worked well when the .net 2.0 application was hosted on windows server 2003 and oracle client 10g. But when it is hosted on server 2008 with new oracle client it is giving the above error when browsing the page. This error occurs when the connection is opened inside the c# code.
somepartialview calls other partial views, that also contains client javascript. This loads and works fine, the javascript-based effects (vertical ticker, horizontal ticker) work fine as well.
The problem is that somepartialview has several AJAX.ActionLink(s) like this:
Ajax.ActionLink("LinkText", "SetIcons", new { id = l.ID }, new AjaxOptions { UpdateTargetId = "ajaxdiv" }) Namely, an <a> element which upon click changes the content of <div id="ajaxdiv"> using a 'SetIcons' controller:
[Code]....
But this works only partially: the page gets refreshed with the new HTML content, but the scripts that worked before the async postback do not run anymore. How do I get them to work?
I think that I am looking for the MVC alternative of the WebForms' ScriptManager.RegisterStartupScript
I want to implement client certificate in IIS 7.5 in windows 7. As per my knowladge I need to setup server certificate first for IIS. But I could not figure out how to do that.
Does the client require the .NET framework to be installed to run an ASP.NET application that is using the report viewer control? It is my understanding that all ASP.NET web applications can be run from any machine and that the .NET framework only needs to be installed on the server where IIS is running. Is this correct?
I am devloping asp.net application.I am devloping in network so i have installed AJAX toolkit on server but the problem is its not running on client.its perfactly running on Server
I have a long poll HTTP request using ASP.NET 4, MVC 2 and AsyncController. If a user closes their browser and kills the HTTP connection without the request completing, I'd like to know about it and completely clean up after them. If I don't, the open and incomplete requests just sit there and eventually IIS stops accepting new requests.
You can simulate my long running HTTP request by making a normal ASP.NET application with a page that has a Thread.Sleep. Even if you close the browser, the request carries on as if it hasn't.
There is a property called Response.IsClientConnected that gets switched to false if the client disconnects, and I can poll this to achieve the desired effect but it's not very clean and I'd like to avoid polling. Is there a way of getting notified when this happens rather than having to poll this property?
I have built a basic calendar event using DDay.iCal, when I click "Add to calendar" link I produce an event and then sends this to the client.Basically, my application works like this.
A User logs in. Selects a specific date. Books a specific timeslot Clicks the "Add to calendar" link
Sending the event is done by using Response.Write() which sends the following to the client:
The above works fins but it requires me to first book the event then manually and then click the "Add to calendar" link.I want to merge the steps 3 and 4. But when trying to do so the event booking gets saved to the database but the screen does not get refreshed.Is there a "simple" way to get around this?
I used PopupControl Extender to display row details from a gridview, and need to update the two textboxes, but the changed value in the textboxes did not get picked up when click the update button on the popup window, so I need to get client side javascript to read the new changed value from these text boxes. However, I tried a few way, none worked for me, not sure what is wrong.
1. Add a javascript function in the .aspx file and use onclientclick of the linkbutton control to call the function, I got error of "Microsoft JScript runtime error: Object required".
<script language="javascript" type="text/javascript"> function newTextValue(textbox) { var text = document.getElementById("TextBox1").Value; alert(text); } </script) <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("GalleryTemplateName") %>' Height="20px" Width="230px" style="text-align: left"></asp:TextBox> <asp:LinkButton ID="LinkButton2" runat="server" Font-Bold="True" CommandArgument='<%# Eval("GalleryTemplateId") %>' oncommand="LinkButton2_Click" OnClientClick="newTextValue(this)" >Update</asp:LinkButton> 2. Use ScriptManager.RegisterClientScriptBlock in the aspx.cs file, : ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "changevalue", "alert(document.getElementById('TextBox1').value);", true);
but the alert window did not showup, that means the client javascript did not run? I just use an alert window to test to see if the textbox value is picked up. Note, I used Ajax Toolkit PopupControl Extender, all codes are in an update panel.