Ads

26 December 2012

Could not load file or assembly 'Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A)



Error:
[Execute SQL Task] Error: Executing the query "Exec sp_NNNNNNNNN" failed with the following error: "An error occurred in the Microsoft .NET Framework while trying to load assembly id 65547. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:
System.IO.FileLoadException: Could not load file or assembly 'XXXXXXXX, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An error relating to security occurred. (Exception from HRESULT: 0x8013150A)
System.IO.FileLoadException:
   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.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.


Solution :-


1. Go to Database
2. Expand Programmability
3. Expand Assemblies
4. Choose your assembly XXXXX
5. Right Click and go to properties
6. Change the Permission Set option to External

Note :- Make sure DB is in trustworthy, check options from properties. If its false 


ALTER DATABASE DBNAME SET TRUSTWORTHY ON


This will resolve.

Some times it will throw eerror with DB owner SIS issue for alter authorization, due to mismatch in SID of DB and Master db entry.

Change your DB owner to SA. then repeat step same as stated above. Will help to resolve issue.

EXEC sp_changedbowner ‘sa’

 

19 December 2012

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. (System.Data)

The operation could not be completed.

------------------------------
ADDITIONAL INFORMATION:

The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. (System.Data)

------------------------------

Solution :- http://www.microsoft.com/en-us/download/confirmation.aspx?id=23734

18 December 2012

Kill Windows Seesions Remotly

To kill the sessions follow below sequence.

Step 1:  qwinsta /server: [ServerNAME]
Step 2: rwinsta [Session ID] /server: [ServerNAME]

The second step will take small amount of time, as it needs to close the open sessions.