I have an ASP.NET Web Forms app that I am building and running against .NET 4.0 on a Win7 local machine. (All is OK on local box.) My app is running EF4.1 against an Oracle DB, so I am using the Oracle EF data provider, which is still in Beta.
Right now, I can successfully deploy the app to my Win2008 Server target machine using Web Deploy from my local VS2010, but when I run the app on the target, I get the classic Unable to find the requested .Net Framework Data Provider error.
Here's my (unsuccessful) setup, as of now:
32-bit applications are enabled in the app pool (.NET 4.0) on the
Win2008 Server target.
Copy Local is set to true for the Oracle.DataAccess DLL in my local VS2010 solution.
Both of the Platform and Platform target settings are set to Any CPU in my local Build Configuration. (I have tried
different settings here without success.)
The Win2008 Server target does not have an Oracle.DataAccess DLL in
the GAC. (I thought that setting Copy Local on the Oracle DLL would
mean that I didn't need the GAC.)
EDIT: I have tried to GAC the Oracle.DataAccess DLL, but I get the same error that is discussed here. (I still have to investigate this.) Also, there is already another Oracle client on my target box, and installing the Oracle client that comes with the Oracle EF data provider seems to interfere with it. This cannot be allowed to happen.
Question 1: What combination of build configuration settings (on the local box) and IIS settings (on the target) do I need to select in order to be able to run my app on the 2008 Server?
Question 2: How can I get this to work without installing another Oracle client on my target server?
Thanks again for the help.
Update: All is working. See my answer below for a link to the full solution, as well as links to helpful information.
Since your server doesn't have Oracle.DataAccess in the GAC, that indicates that you haven't installed the Oracle client on that machine and are trying to make it work by deploying Oracle.DataAccess.dll as part of your app.
I'm not quite sure exactly what needs to be installed on the server. I usually just run the Oracle setup on the server to ensure that all the necessary Oracle files and settings get installed. If you do that, you don't need to deploy Oracle.DataAccess.dll along with your app, it will already be in the server's GAC.
One thing I do know is needed is a config setting that tells the system how to create a new instance of the provider. You can try to add that setting to your web.config and try if that is enough, but again, there may be a lot of dependent DLLs and settings you need for the Oracle provider to work.
The setting is (this is for another version of ODP.Net, you will find the correct settings in machine.config on your own machine):
<system.data>
<DbProviderFactories>
<add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client"
description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=4.112.1.2, Culture=neutral, PublicKeyToken=89b483f429c47342" />
</DbProviderFactories>
</system.data>
GTG's solution provides at least part of the answer to my Question 1, so I am upvoting his solution. For anyone else interested in my Question 2 (how to perform an unobtrusive ODAC installation), an answer can be found here. (Look for AnthonyVO's answer, as it encapsulates all the necessary information.)
I should mention that I have not yet been able to get the unobtrusive solution to work for me, but many have, and it is the solution that I need to implement.
UPDATE: Case closed. I was missing an Oracle DLL. My full setup is shown here.
Related
tried looking at other examples on this and am a bit confused. I have 2 web servers that are load balanced and a sql server box (sql 2012). my cube is created on the sql server box (i see it in management studio). when i try to access via my asp.net page i receive the above error.
now, i see the msolap110.dll in C:\Program Files (x86)\Microsoft Analysis Services\AS OLEDB\110 on the sql box. do i need to do something permission wise with the dll or something? do i need to install analysis services on the web server? is there a specific port or something (doubtful as sql is running fine).
connection string is as follows:
"Provider=msolap;Data Source=;Initial Catalog=AutoOLAPAW;Cube Name=SampleCube;"
going to try to force to use MSOLAP.5 but waiting on a republish from our security/deployment group.
this all works fine in dev but my (more secured/stripped down) prod/qa is where i'm seeing the issue. using iis7 on both.
If you are using ADOMD.NET then either set CopyLocal=True on that reference on your ASP.NET source code so Microsoft.AnalysisServices.AdomdClient is deployed with the web app... Or install SQL_AS_ADOMD.msi from:
https://www.microsoft.com/en-us/download/details.aspx?id=49999
If you are using OLEDB then install SQL_AS_OLEDB.msi from that same link.
If you don’t want the SQL2012 version but want the latest then install from here and use Provider=MSOLAP in the connection string (instead of a number like MSOLAP.5).
First of all I publish my website in windows 7 and everything goes alright.
But when I'm trying to publish the same website in windows server 2008 r2 I got this error:
Server Error in '/MyWebsite' Application. Could not load file or
assembly 'System.Net.Http' or one of its dependencies. Strong name
signature could not be verified. The assembly may have been tampered
with, or it was delay signed but not fully signed with the correct
private key. (Exception from HRESULT: 0x80131045)
Can any body help me, please!! I looked for this error for days now and I got nothing to do.
Thanks in advance!
It seems you not copied your dll to your another website in window server 2008 r2
if you already copied .dll to your 2008 iis then ..
First check
Both are system are running in same 64bit or 32bit ?
If not then
1.Open IIS Manager
2.Select Application Pools
3.then select the pool you are using
4.go to advanced settings (at right side)
Change the flag of Enable 32-bit application false to true.
Another solution
1- check if you are referencing an assembly which in turn referencing an old version of unity. for example let's say you have an assembly called ServiceLocator.dll which needs an old version of Unity assembly, now when you reference the ServiceLocator you should provide it with the old version of Unity, and that makes the problem.
2- may be the output folder where all projects build their assemblies, has an old version of unity.
you can use FuseLogVw application to find out who is loading the old assemblies, just define a path for the log, and run your solution, then check (in FuseLogvw) the first line where the Unity assembly is loaded, double click it and see the calling assembly, and here you go.
There are many other possibilities..
I'm am unable to use MySQL Connector 6.7.4 with my local asp.net provider, a security message is being shown saying that it doesn't have the GAC security accesss, anyone know if there's any chance (like in on web.config) to make it work ?
I know that my local web hosting provider (called locaweb) uses a medium trust environment and refuses to make any changes on their server (such as adding mysql latest version to their GAC). Old version of the connector, such as 6.2.2 are working fine.
I've read several articles in the internet (such as http://dev.mysql.com/doc/refman/5.1/en/connector-net-medium-trust.html) but it didn't make clear to me if the changes were in my application's web.config or in my hosting config (which they refuse).
Thanks,
the issue is that my source is hosted on the host machine (in this case a mac book pro) and visual studio wants to be able to monitor the web.config for changes so it is throwing the error:
An error occurred loading a configuration file: Failed to start monitoring changes to: \path\to\web.config
I have tried to add the HKLM\Software\Asp.Net\FCNMode=1 but it doesn't seem to work. Also, I don't see moving the source to the VHD as a viable option due to version control issues.
Windows 7 64-bit
Visual Studio 2008
VMWare Fusion 3.01
Thanks.
You have the right idea, but need to edit the correct key for Windows 7.
Open up RegEdit
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ASP.NET
Add a REG_DWORD registry entry called FCNMode and set its value to 1
Re-boot and you should be good to go. The "Wow6432Node" allows you to set this for Windows 7 64-bit Visual Studio.
It looks like you can now change FCNMode in your web.config. They probably added it in .NET 4.5, could not find any of documentation but this, but it seems to work.
<system.web>
<httpRuntime fcnMode="Disabled"/>
I'm no filesystem/virtualization expert but I'm guessing that the account that the dev server process is running under does not have permissions to access the configuration file (web.config). The accounts within your VM won't recognized by OS X either so you won't be able to change the permissions to get it to work in this way.
What I would suggest would be to add the IIS component (via Control Panel->Programs->Turn Windows Components on or off) if you haven't already. Then add an application to IIS with the virtual directory within the VHD of your VM. Now to debug, first publish your application to the newly created IIS application (something like http://localhost/MyNewIISApplication) and attach the VS debugger to the IIS worker process w3wp.exe (i.e. Debug->Attach to Process...).
I don't see a problem having the working copy of your code on a VM if the code repository is somewhere else.
I have a DLL which is GAC'ced (c:\windows\assembly) which is being used by my Biztalk Application, for some requirement, I changed a function in that DLL and:
I uninstalled the old DLL which was in GAC (version 1.0.0.0)
I GAC'ced the newly built DLL into GAC (version 1.0.0.0)
I also restarted the BizTalk Host Instances.
But still the output seems to be from the old DLL's function. I am not getting the problem, why still I am getting the old output.
Can anybody help me?
Some tips that might be helpful:
(1) If you have multiple BizTalk servers in your group, be sure to update all of the servers!
Depending on your host instance configuration, your instance may run on any server the host instance is active on.
(2) Make sure you restart the correct biztalk host instance. This is often overlooked. Don't forget about the BizTalk Isolated Host! Perform a recycle of the specific IIS application pool if necessary. If you are unsure, perform an iisreset.exe
(3) To update a DLL in BizTalk it is often necessary to update it in the BizTalk database as well. For some changes it may work just updating the DLL in the GAC, but often I find that this is not enough (especially with orchestrations).
What you are describing here is correct. You should see the new DLL taking over. A couple things to check:
Did you recycle the correct host instances?
Did you recylce the host instances on all servers?
Did you veriiify the Create date on the GAC'd DLL to ensure the new one was installed?
Another issue might be based on what you changed in the Application. You can only Gac/Restart under particular circumstances. See this When can you just re-gac and re-start on Jon Flander's blog for reference.
If you want to be really sure that the correct assembly that has been GAC:ed, click "Run" and type "%systemroot%\assembly\gac" for .Net 1.1 or "%systemroot%\assembly\gac_msil" for > 2.0.
There you have the physical files for each version number to be checked (or overwrited).
It might help us support you if you let us know what part of BizTalk you are using the assembly, pipeline, functoid, schema etc.
Is that DLL used under a BizTalk process (BTSNTSvc.exe) or by an Isolated Host Instance?
If this DLL is used in a Receive Location which Receive Handler (Host) is Isolated, for example a SOAP Receive Location, you have to restart the Application pool from IIS and not the Host Instance.