Telerik doesn't work after moving project to another env - asp.net

i moved my project from one env, and from then on i have issue running my application.
The error i receive below.
'Could not load file or assembly 'Telerik.Web.UI, Version=2016.2.504.45, Culture=neutral, PublicKeyToken=121fae78165ba3d4' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)'

The error code 0x80131515 usually tells that the assembly file has been blocked or not referenced properly (because VS thinks referenced assembly still untrusted). Here is an explanation from Telerik's FAQ:
Operation is not supported HRESULT: 0x80131515
The HRESULT: 0x80131515 error usually means that the file was downloaded from the Internet and
Windows has blocked it. In such cases you need to simply do the
following:
In Windows Explorer, right-click the file.
Select Properties
Click the Unblock button.
Clear the read-only attribute.
Other things you should try to solve this issue:
Using bin folder assembly deployment
Copy Telerik assemblies to \bin folder and use reference from that folder.
Restart VS IDE.
Using GAC assembly deployment
Add Telerik.Web.UI.dll assembly to GAC using this command:
gacutil /i "[InstallDir]\BinXX\Telerik.Web.UI.dll
Note: [InstallDir] belongs to Telerik location path and "X" means numeric value which should be adjusted based on folder hierarchy.
Remove previously used Telerik.Web.UI.dll from bin folder and add reference to the newer one.
Ensure that this line exists in web.config:
<add assembly="Telerik.Web.UI, Version=2016.2.504.45, Culture=neutral, PublicKeyToken=121FAE78165BA3D4" />
Restart VS IDE.
If all possible solutions above are fruitless, create a new project with current Telerik assembly and all required assemblies then move old project files into new project.
Additional references:
Could not load file or assembly 'Telerik.Web.UI'
Upgrade Compile Error
Visual Studio Project Sample Loading Error: Operation is not supported. (Exception from HRESULT: 0x80131515)

Having two versions of Telerik DLLs in the solution is also a culprit. In my case I had subproject that was using a different version of .Net and hence, Telerik DLLs.

Related

Visual Studio looks for dll in the wrong directory

I am getting an error of "Could not load file or assembly 'Microsoft.AI.Web' or one of its dependencies" in the browser of my asp.net app. Microsoft.AI.Web is from Microsoft.ApplicationInsights.Web NuGet package.
I noticed this:
LOG: Appbase = file:///D:/Source/Workspaces/AppName/Branches/Main/Application/WT/
LOG: Initial PrivatePath = D:\Source\Workspaces\AppName\Branches\Main\Application\WT\bin
the dll in question is located at D:\Source\Workspaces\AppName\Branches\Main\Application\packages\Microsoft.ApplicationInsights.Web.2.4.1\lib\net45\Microsoft.AI.Web.dll
As for personal dll's -- In the project-->properties-->build-->output path--> I have it set as "..\Any\Debug\". When I build the project the DLL's populate there.
I checked References and code in .csproj file and all the dll are located where I specified to.
I am not sure why it's trying to look at the bin file of the project when I told the output is somewhere else AND to look for the dlls in that same folder(through references and .csproj file). How do I make it so that VS will look for the dlls in the folder path I want instead of "WT\bin"?
When I change my project output path to "bin", it can detect the dll's there EVEN though the path of the dll remains the same( D:\Source\Workspaces\AppName\Branches\Main\Application\packages\Microsoft.ApplicationInsights.Web.2.4.1\lib\net45\Microsoft.AI.Web.dll).
Since it's a Microsoft strong signed DLL, add it to the server's GAC.
If you place it in the GAC, it'll find the file automatically. Another plus there is that if you need it for another project deployed on the same server, you don't need to deploy it again.
Here's some information on how to install a DLL into the GAC on the server machine, assuming gacutil is not installed there. Look at the accepted answer, not the question.
Drag and drop a DLL to the GAC ("assembly") in windows server 2008 .net 4.0
Copy gacutil.exe and gacutil.exe config from your machine to the server's C:\Windows\Microsoft.NET\Framework\v4.0.30319
Then run on the server:
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\gacutil.exe" /i "PATH TO YOUR DLL"

How do I locate dependencies for a dll?

I have written a Dev Express winforms application.
And I created a deployment file using the Dev Express instructions
However when I deploy and run it I get the following errors
Exception occurs while activating the 'DevExpress.ExpressApp.SystemModule.ShowNavigationItemController' controller:
Could not load file or assembly 'DevExpress.ExpressApp.Xpo.v14.2, Version=14.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a' or one of its dependencies. The system cannot find the file specified.
Inner exception:
Could not load file or assembly 'DevExpress.ExpressApp.Xpo.v14.2, Version=14.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a' or one of its dependencies. The system cannot find the file specified.
The file DevExpress.Xpo.V14.2.dll is actually present.
How do I locate the real missing files?
You need to deploy the DevExpress.ExpressApp.Xpo.v14.2 assembly as well. Not only DevExpress.Xpo.v14.2.

Could not load file or assembly Devart.Data

I have such issue.
On my PC where VS is installed and project is developing I use Devart linqconnect.
I set option "Copy Local" for Devart.Data.Linq, Devart.Data.SQLite and Devart.Data.SQLite.Linq to true. All goes OK.
When try to run application on client side error Could not load file or assembly 'Devart.Data, Version=5.0.828.0 ... appears. What can be solution for this?
It is also necessary to add the Devart.Data assembly of the corresponding version to your project and set Copy Local for it to True.
To deploy applications written with the help of LinqConnect you should register run-time assemblies Devart.Data.SQLite.dll, Devart.Data.dll, Devart.Data.SQLite.Linq.dll and Devart.Data.Linq.dll at Global Assembly Cache (GAC) or place them to the bin folder of your application.
JIC: these assemblies can be found in the folder where LinqConnect is installed.

MVC 4 can not find assemblies and shows file structure

have a mvc 4 application. I have changed "Copy Local" property for all referenced assemblies (even system.dll). each time I deploy it to WinHost (Asp.NET hosting) it complains and says could not load file or assembly. I deleted the Bin folder on WinHost redeployed everything, each time I deploy the application, it shows one of the following errors
Could not load file or assembly 'Microsoft.Data.Edm' or one of its dependencies. ....
Could not load file or assembly 'Microsoft.Data.oData' or one of its dependencies. ...
Could not load file or assembly 'WebGrease' or one of its dependencies. ...
Could not load file or assembly 'EntityFrameWork' or one of its dependencies. ...
I removed EntityFrameWork by running unistall-package EntityFrameWork, it had some dependencies so I had to remove them first.
Now When I browse to my application it shows the file structure.
I have two questions:
why it cannot find assemblies while all are there in bin folder? it must be something else than assemblies.
why it shows my file structure now after I removed EntityFramework and its dependencies?
I really appreciate any kind of help.

Could not load file or assembly 'Intelligencia.UrlRewriter' or one of its dependencies. The system cannot find the file specified

i am installing URL rewriting DLL (from http://urlrewriter.net/) to GAC. (if i keep dll in BIN folder it works perfectly)
but keeps throwing error.
Could not load file or assembly 'Intelligencia.UrlRewriter' or one of its dependencies. The system cannot find the file specified. (E:\Test\web.config line 28)
wondering is it because dll is http module.. and installed in GAC creating problem ? (because rest all dlls work perfectly fine in GAC)
i looked in to all internet resource for this error. but didn't find proper solution.
attached test project with dll added into bin folder.
http://rapidshare.com/files/449306116/Test.rar
please advise.

Resources