silverlight – “CreateRiaClientFilesTask”任务意外失败

前端之家收集整理的这篇文章主要介绍了silverlight – “CreateRiaClientFilesTask”任务意外失败前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
尝试在我的RIA域服务进行一些微小的更改(在Silverlight网站应用程序中托管)之后尝试构建VS 2010 Silverlight项目时,此错误已经开始发生.似乎没有理由出现此错误,我无法理解访问被拒绝的部分错误.

我试过的事情

1)彻底清理解决方案中的所有项目并重新构建
2)从框架文件夹中删除所有临时ASP.Net文件
3)从类库中的项目属性删除链接的RIA服务,该类库失败,清理,重新构建,然后重新添加链接的RIA服务

任何关于从这里去哪里的建议将非常感谢:

错误21“CreateRiaClientFilesTask”任务意外失败.
System.Web.HttpException(0x80004005):无法加载文件或程序集“Business,Version = 1.0.0.0,Culture = neutral,PublicKeyToken = null”或其一个依赖项.访问被拒绝. —> System.Configuration.ConfigurationErrorsException:无法加载文件或程序集“Business,PublicKeyToken = null”或其一个依赖项.访问被拒绝. —> System.IO.FileLoadException:无法加载文件或程序集“Business,PublicKeyToken = null”或其一个依赖项.访问被拒绝. —> System.IO.FileLoadException:无法加载文件或程序集“Business”或其一个依赖项.访问被拒绝.

—内部异常堆栈跟踪结束—
   在System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName,String codeBase,Evidence assemblySecurity,RuntimeAssembly locationHint,StackCrawlMark& stackMark,Boolean throwOnFileNotFound,Boolean forIntrospection,Boolean suppressSecurityChecks)
   在System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName,Boolean suppressSecurityChecks)
   在System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef,Boolean suppressSecurityChecks)
   在System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString,Boolean forIntrospection)
   在System.Reflection.Assembly.Load(String assemblyString)
   在System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName,Boolean starDirective)
   —内部异常堆栈跟踪结束—
   在System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String assemblyName,Boolean starDirective)
   在System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
   在System.Web.Configuration.CompilationSection.LoadAssembly(AssemblyInfo ai)
   在System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection compConfig)
   在System.Web.Compilation.BuildManager.GetPreStartInitMethodsFromReferencedAssemblies()
   在System.Web.Compilation.BuildManager.CallPreStartInitMethods()
   在System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager,IApplicationHost appHost,IConfigMapPathFactory configMapPathFactory,HostingEnvironmentParameters hostingParameters,PolicyLevel policyLevel,Exception appDomainCreationException)
   在System.Web.Compilation.ClientBuildManager.EnsureHostCreated()
   在System.Web.Compilation.ClientBuildManager.CreateObject(Type type,Boolean failIfExists)
   在Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.CreateSharedTypeService(ClientBuildManager clientBuildManager,IEnumerable`1 serverAssemblies,ILogger logger)
   在Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.GenerateClientProxies()
   在Microsoft.ServiceModel.DomainServices.Tools.CreateRiaClientFilesTask.ExecuteInternal()
   在Microsoft.ServiceModel.DomainServices.Tools.RiaClientFilesTask.Execute()
   在Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   在Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost,TaskLoggingContext taskLoggingContext,TaskHost taskHost,ItemBucket bucket,TaskExecutionMode howToExecuteTask,Boolean& taskResult)Insurer.Analytics.Common

解决方法

只是有同样的问题 – 事实证明,改变了“临时ASP.NET文件文件夹的权限.很容易测试单击.web项目的解决方案资源管理器中的ASP.Net配置.它可能会抛出访问被拒绝的错误,并指向临时asp.net文件文件夹.如果是这样,请在.web项目中打开web.config,并添加一个tempDirectory指令进行编译,如下所示:

<configuration>
    <system.web>
        <compilation debug="true" targetFramework="4.0" tempDirectory="C:\<SomeDirectoryYouFullyControl>\Temporary ASP.Net Files" />
    </system.web>

重建您的.web项目,并更新您的Silverlight项目中的服务参考.

原文链接:/silverlight/597217.html

猜你在找的Silverlight相关文章