Deployment Error in Visual studio 2010

Exception from HRESULT: 0x80131401

while deploying the Base or Customized SSRS Report the above error occuring. what is the Solution For that Please anyone Help me.

Thq in Advance

Could you provide more information? What’s your version of AX? Did the error say anything more? Did anything get logged in Event Log? Does deployment from AX or command line works? When does it start happening? Or any other potentially useful piece of information you have…

Ax-2012 CU7.while doing Report Designing the system suddenly structed and visual studio also structed after reopen and made changes in design while deploying the following error occure for both base and customzed report.

error:

Error 1 The “DeployToReportsServerTask” task failed unexpectedly.

System.IO.FileLoadException: Loading this assembly would produce a different grant set from other instances. (Exception from HRESULT: 0x80131401)

at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)

at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)

at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)

at System.Activator.CreateInstance(Type type, Boolean nonPublic)

at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)

at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)

at System.Activator.CreateInstance(String assemblyString, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo, StackCrawlMark& stackMark)

at System.Activator.CreateInstance(String assemblyName, String typeName)

at System.AppDomain.CreateInstance(String assemblyName, String typeName)

at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)

at System.AppDomain.CreateInstanceAndUnwrap(String assemblyName, String typeName)

at Microsoft.Dynamics.Framework.Deployment.Reports.DomainBound.PrepareTask(AppDomain tempAppDomain)

at Microsoft.Dynamics.Framework.Deployment.Reports.DeployToReportsServerTask.Execute()

at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()

at Microsoft.Build.BackEnd.TaskBuilder.d__20.MoveNext() C:\Program Files (x86)\MSBuild\Microsoft\DynamicsTools\Microsoft.Dynamics.Framework.Design.Reporting.Modeling.targets 466 6 PurchPurchaseOrderReport

Before any difficult investigation, try to restart IIS.

Hi Martin,

I have done the IIS restart but getting same error.

Are you the same person as who asked the question, just having two accounts in DUG?

Is SSRS in native or SharePoint integrated mode?

There is quite a lot of suggestions about this error on internet, but there clearly may be several reasons for it.

goto client configuration and try to refresh configuration in connection tab

Try opening AX as Administrator, and then try deploying anything from there - checking if there are no errors. If there are none, go ahead and open VS, and try deploying from there - this should work (worked for me for exactly the same issue).

Try the below link:

http://axwiki.blogspot.com/2015/04/deploying-ssrs-from-vs-2010-solved.html#comment-form