I published my website application to one of my client side server and got the following error:
Could not load file or assembly 'iAnywhere.Data.SQLAnywhere, Version=11.0.1.20442, Culture=neutral, PublicKeyToken=f222fc4333e0d400' or one of its dependencies. The system cannot find the file specified.
Server Details:
Windows 2012 64bit version
I published my application from Visual Studio 2008.
So the framework version is 3.5.
DB: Sybase - Sqlanywhere 16.
It would be great someone can explain about the GAC settings or what do I need to do understand. I am a beginner.
Thanks
Related
I'm trying to setup a web site in studio 2010, 64-bit. ODP.net is istalled,also 64 bit version. however when I try to build the site I get this error.
The project must be 64-bit, also my settings are for 64 bit in the project
Error 1 Could not load file or assembly 'Oracle.DataAccess, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified. C:\Applications\DataConnectors\OracleConnectorWeb\web.config 10
My oracle.dataaccess.dll is visible in the assembly and I ca access the namespace. I know there is a lot of examples like thism, I have tried all of them and still have the same error.
I'm new to website development, however I have a lot of experience in desktop applications, even with oracle and the dataaccess.dll, but here I'm lost
Any help would be appreciated
I have developed an ASP.net 4.5 Project using Visual Studio 2013 and I am assigned to deploy it on our Ubuntu server.
Like what other tutorials said I need to use Mono to make this possible. I think I followed those steps but when I try to open the page, it gives me this error.
I had this exception when deploying my application, but to a Windows Server. The problem was that some dlls references pointed to my local assemblies. (example: System.Web.Http.WebHost was referenced to C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Web.Http.WebHost.dll, so in the server this LoadException ocurred because this dll was missing.)
So the generic answer is: There is some dll missing. Compare the references in your project with the bin folder in the server. If there's some reference that points to local machine, change the property CopyLocal to true, so when you compile and publish the dll will be copied to the output directory.
I don't use Mono, but how this same problem ocurred to me in a Windows Server, may be the same problem with you in a Linux Machine.
If the probem persists, try to create a simple project, with just one page and a few dependencies just to see if the asp.net works fine in this server.
we have an ASP.Net 4.5.2 application using the latest Oracle.ManagedDataAccess.dll from nuget with Entity Framework 5.
File version: 4.121.1.0
Product version: 4.121.1.20131211
When deployed to production environment (Windows Server 2008 r2 x64) all works fine, until we need distributed transactions.
Oracle documentation states that we need to provide Oracle.ManagedDataAccessDTC.dll (of same version, for specific platform x64) in order to get distributed transactions working.
Could not load file or assembly 'Oracle.ManagedDataAccessDTC.DLL' or one of its dependencies. The specified module could not be found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'Oracle.ManagedDataAccessDTC.DLL' or one of its dependencies. The specified module could not be found.
Stack Trace:
[FileNotFoundException: Could not load file or assembly 'Oracle.ManagedDataAccessDTC, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. ]
Install the Microsoft Visual C++ 2010 Redistributable.
If your server is a Windows Server 2008 R2 x64, install from this page:
http://www.microsoft.com/en-us/download/details.aspx?id=14632 the with SP1 don't work for this server.
If your server is a Windows Server 2012 x64, install from this page:
http://www.microsoft.com/en-us/download/details.aspx?id=13523
My solution turned out to be stop using TransactionScope, and remove a reference to System.Transactions, then the issue went away.
I could get away with this TransactionScope didn't give me any further performance improvements.
I had this problem for several months where our product would have problems in some computers (say 1 out of every 10) when the application used transactions.
I tried John's answer and the problem stopped but later I noticed that the transactions where not working at all anymore, in any of the installations.
Finally I got to this, where you can see that the Oracle.ManagedDataAccessDTC won't be used in .NET Framework Version 4.5.2 or higher. We were using 4.5, so I upgraded the framework to 4.5.2 in two of the computers with that problem and now they work perfectly.
So to sum up, upgrading the .Net version to 4.5.2 or higher should solve the problem.
I have an old ASP.NET web application on a server, which was developed in Visual Studio 2008 in the year 2008. The server now has .NET 4.0 installed also. When I try to access the web app I get:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1703: An assembly with the same identity 'System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' has already been imported. Try removing one of the duplicate references.
Source Error:
[No relevant source lines]
Is there anything I can do to get it to work without access to the original Visual Studio solution? I believe it has to do with the fact that .NET 4.0 is also installed on the server.
1) Have you checked the application pool your application is running under? Is it still .net 2.0 integrated/classic, or has it automagically changed to 4.0? If so, try changin back to 2.0.
2) Do you by any chance have a System.Web.Extensions.dll in the bin folder of the application? If so, try renaming it (similar situation as here)
3) If 1 is not an option and 2 is not the case, do you have any explicit references to the System.Web.Extensions in the app's config file? Are they requesting a different version of the file?
I wrote an asp.net web app which uses SMO against SQL Server 2008 to be able to run some DB scripts. It references these assemblies (in the C:\Program Files\Microsoft SQL Server\100\SDK\Assemblies folder):
Microsoft.SqlServer.ConnectionInfo
Microsoft.SqlServer.Management.Sdk.Sfc
Microsoft.SqlServer.Smo
The microsoft.sqlserver.batchparser.dll is not in this folder.
Locally (32 bits machine, IIS7) I have no issue.
When I publish the app to my hosting provider (discountasp.net, SQL Server 2008, IIS7, 32bits too), I get this error:
Could not load file or assembly
'Microsoft.SqlServer.BatchParser,
Version=10.0.0.0, Culture=neutral,
PublicKeyToken=89845dcd8080cc91' or
one of its dependencies. The system
cannot find the file specified.
I searched my local machine and I can't find this assembly. However it works well on this machine.
The "Microsoft SQL Server 2008 Setup Discovery Report" tool reports I have v10.1.2531.0 installed locally.
To get this dll, you will need to install the Microsoft SQL Server 2008 Management Objects (available from here). That particular dll gets installed into the GAC, which is why you probably cannot find it using a search.
As you are using a hosting provider, it would appear that they do not have this installed. Your choices are to get it installed by them (which is probably unlikely), or deploy the dll manually (which may be on dodgy licencing ground).
First you need to enable browsing of GAC folder:
1. go to Registry Editor (RUN > regedit)
2. go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Fusion
3. Right click Fusion > NEW > DWORD
4. Type DisableCacheViewer
5. Double click DisableCacheViewer
6. Set value to 1
then you can find it here
C:\Windows\assembly\GAC_32\Microsoft.SqlServer.BatchParser\10.0.0.0__89845dcd8080cc91
You need to have the SMO components installed on your hosting provider as well. You can download them here.
I had a similar issue, but with R2. For me it worked by installing Microsoft® SQL Server® 2008 R2 Shared Management Objects and dependant Microsoft® System CLR Types for SQL Server® 2008 R2.
Find them here http://www.microsoft.com/en-us/download/confirmation.aspx?id=16978
I resolve this only Just Right Click on Project navigate to Properties and Change Platform Target from 'Any' to 'x86'
You could install the SQL Client Connection feature from the SQL Server DVD as well. I installed that as well as the SDK components to resolve this issue while installing SolarWinds.
I had SMO x64 installed, but SMO x86 was required on build server.
<startup useLegacyV2RuntimeActivationPolicy="true"> in App.config
This happened to me today. Running as administrator did the trick for me, I'm not sure why.
It's not ideal for production, but might work just fin for development environments.
Install the 'Microsoft Visual C++ 2013 Redistributable (x86)' if it is not showing up in add/remove programs.