This is a migrated thread and some comments may be shown as answers.

DLL violates security rules

5 Answers 73 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dr.YSG
Top achievements
Rank 2
Dr.YSG asked on 04 Jan 2010, 05:27 PM
I have installed and am using your SL4 beta DLLs. But I have to compile them with Blend. Because VS2010 is more careful about DLLs that come from foreign sources.

I had the same problem with another vendors DLLs that they send in a ZIP file. But by opening up the PROPERTIES of the ZIP file, and hitting UNBLOCK, all the enclosed DLLs now work with VS2010.

However with your Navigation.dll there seems to be a dependency that is not working in the .NET sandbox.



Error    1    The "ValidateXaml" task failed unexpectedly.
System.IO.FileLoadException: Could not load file or assembly 'file:///C:\bloodhound\BloodHound2\Bin\Debug\Telerik.Windows.Controls.Navigation.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///C:\bloodhound\BloodHound2\Bin\Debug\Telerik.Windows.Controls.Navigation.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
   at System.Reflection.Assembly.LoadFrom(String assemblyFile)
   at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute(ITask task)
   at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute(ITask task)
   at Microsoft.Silverlight.Build.Tasks.ValidateXaml.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)

    BloodHound2

5 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 07 Jan 2010, 01:10 PM
Hi Dr.YSG,

Could you please share with us which version of VS2010 you are using? Is it Beta 1? We have encountered the problem that you have mentioned in the past but we were not able to reproduce the problem with the latest version of VS2010.


Sincerely yours,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Dr.YSG
Top achievements
Rank 2
answered on 07 Jan 2010, 02:27 PM
Beta 2. and .NET 4.0.211006 B2Rel
---------

Microsoft Visual Studio 2010
Version 10.0.21006.1 B2Rel
Microsoft .NET Framework
Version 4.0.21006 B2Rel

Installed Version: Professional

Microsoft Visual Basic 2010   01018-315-4422943-70121
Microsoft Visual Basic 2010

Microsoft Visual C# 2010   01018-315-4422943-70121
Microsoft Visual C# 2010

Microsoft Visual C++ 2010   01018-315-4422943-70121
Microsoft Visual C++ 2010

Microsoft Visual F# 2010   01018-315-4422943-70121
Microsoft Visual F# 2010

Crystal Reports for Visual Studio   
Crystal Reports for Visual Studio

Hotfix for Microsoft Visual Studio 2010 Professional Beta 2 - ENU (KB976272)   KB976272
This hotfix is for Microsoft Visual Studio 2010 Professional Beta 2 - ENU.
If you later install a more recent service pack, this hotfix will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/976272.

Microsoft SharePoint Development Tools   10.0.21006
Microsoft SharePoint Development Tools

Microsoft Visual Studio 2010 Tools for the Microsoft Office system   VSTO
Microsoft Visual Studio 2010 Tools for the Microsoft Office system

Microsoft Visual Web Developer 2010   {39C9C826-8EF8-4079-8C95-428F5B1C323F}
Microsoft Visual Web Developer 2010
0
Milan
Telerik team
answered on 13 Jan 2010, 11:06 AM
Hi Dr.YSG,

You could try adding our assemblies to the PrivateAssemblies or PublicAssemblies folders (by default they are located in "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE"). Once you do that there is a change that the error will disappear.  


Greetings,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Dr.YSG
Top achievements
Rank 2
answered on 13 Jan 2010, 02:08 PM
Hello,

In my first note I mention that what I am using is your Siverlight 4 beta distribution (which comes as zip). So it is not INSTALLED. I put it in c:\downloads\telerik\library and that is where I am referencing it from VS2010. Before I opened the zip, I did UNBLOCK it (frequently the cause for these issues). But as you can seen there is stil the problem.

I don't know what you mean by public versus private assemblies. Can you inform me?

All I do is add these DLLs to the Project References in VS2010.

That you don't get access violations makes sense. Your are on the Telerik domain where the DLLs were built. I am not.





0
Milan
Telerik team
answered on 14 Jan 2010, 11:14 AM
Hi Dr.YSG,

Excuse me for confusing you. The PrivateAssemblies and PublicAssemblies are folders of Visual Studio which are by default located in "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE". If you copy our binaries to either of those folders the problem might be resolved. We are working closely with Microsoft to resolve the problem that you have encountered but currently copying our binaries to the folders is the only possible workaround that I could think of.

Hope this helps.


Best wishes,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Dr.YSG
Top achievements
Rank 2
Answers by
Milan
Telerik team
Dr.YSG
Top achievements
Rank 2
Share this question
or