在IIS部署Silverlight应用和WCF RIA Services,出现异常:未能加载文件或程序集“System.ServiceModel.DomainServices.Hosting, Ver

来源:互联网 发布:resolved java 编辑:程序博客网 时间:2024/06/06 04:12

项目用wcf ria +silverlight,发部后,部署到iis上时,报如下错误

Invoke operation 'File_GetMenuFileName' failed .远程服务器返回了错误:NotFound。

打开事件查看器""

Event code: 3008
Event message: A configuration error has occurred.
Event time: 2012-5-23 15:54:15
Event time (UTC): 2012-5-23 7:54:15
Event ID: 94762612aceb4f7c88743f176aae9903
Event sequence: 9
Event occurrence: 8
Event detail code: 0
 
Application information:
    Application domain: /LM/W3SVC/1202972978/Root-1-129822324119623750
    Trust level: Full
    Application Virtual Path: /
    Application Path: D:\管理系统\
    Machine name: yyyy 
Process information:
    Process ID: 3932
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
 
Exception information:
    Exception type: ConfigurationErrorsException
    Exception message: Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. 系统找不到指定的文件。 (D:\管理系统\web.config line 26) (D:\管理系统\web.config line 26)
   at System.Web.Configuration.HttpModuleAction.get_Entry()
   at System.Web.Configuration.HttpModulesSection.CreateModules()
   at System.Web.HttpApplication.InitModules()
   at System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers)
   at System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context)
   at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
   at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)

 
 
Request information:
    Request URL:
http://localhost:1001/ClientBin/Service-CommonDomainService.svc/binary/File_GetMenuFileName
    Request path: /ClientBin/Service-CommonDomainService.svc/binary/File_GetMenuFileName
    User host address: 127.0.0.1
    User: 
    Is authenticated: False
    Authentication Type: 
    Thread account name: NT AUTHORITY\NETWORK SERVICE
 
Thread information:
    Thread ID: 11
    Thread account name: NT AUTHORITY\NETWORK SERVICE
    Is impersonating: False
    Stack trace:    at System.Web.Configuration.HttpModuleAction.get_Entry()
   at System.Web.Configuration.HttpModulesSection.CreateModules()
   at System.Web.HttpApplication.InitModules()
   at System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers)
   at System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context)
   at System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context)
   at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
 
 
Custom event details:

有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。

原因:没有加载DLL

在IIS部署Silverlight应用和WCF RIA Services,出现异常:未能加载文件或程序集“System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35”或它的某一个依赖项。系统找不到指定的文件。

Could not load file or assembly 'System.ServiceModel.DomainServices.Hosting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

只需拷贝开发机以下文件到网站bin目录即可:

09.21

 

 

 

 

 

 

原创粉丝点击