用的是IIS服务器,刚开始调用webservice时没有问题,过一段时间再调用就出现问题了。重启iis之后又可以用了,我查了好久没有找到原因,错误日志是:
Server Application Unavailable 
The web application you are attempting to access on this web server is currently unavailable.  Please hit the "Refresh" button in your web browser to retry your request. Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur. 
事件类型: 错误
事件来源: ASP.NET 2.0.50727.0
事件种类: 无
事件 ID: 1088
日期: 2010-7-17
事件: 16:32:11
用户: N/A
计算机: LDRK
描述:
Failed to execute request because the App-Domain could not be created. Error: 0x8013150c 有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。
事件类型: 警告
事件来源: ASP.NET 2.0.50727.0
事件种类: 无
事件 ID: 1073
日期: 2010-7-17
事件: 16:32:11
用户: N/A
计算机: LDRK
描述:
Failed to initialize the AppDomain:/LM/W3SVC/1/Root/websException: System.Runtime.Serialization.SerializationException
Message: Insufficient state to return the real object.
StackTrace:    at System.Exception..ctor(SerializationInfo info, StreamingContext context)
   at System.ApplicationException..ctor(SerializationInfo info, StreamingContext context)   at System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters)
   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironment(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)
   at System.Web.Hosting.ApplicationManager.CreateAppDomainWithHostingEnvironmentAndReportErrors(String appId, IApplicationHost appHost, HostingEnvironmentParameters hostingParameters)有关更多信息,请参阅在 http://go.microsoft.com/fwlink/events.asp 的帮助和支持中心。
谢谢了

解决方案 »

  1.   

    检查一下IIS站点配置的ASP.NET版本是否正确...
      

  2.   

    这个错误是由 IIS6 应用程序隔离机制造成的。IIS默认的应用程序隔离机制被称为:“工作进程隔离模式”,在此模式中,应用程序被分为多个组,每个组就是一个“应用程序池” ,每个应用程序池之间是相互隔离的。 隔离的好处当然就是安全啦,稳定啦,等等。IIS中的每个应用程序池由一个“工作进程”分别进行管理,也就是"W3wp.exe" 。如果有多个应用程序池中的程序运行,我们就能看到多个w3wp.exe。 我们平时新建的虚拟目录都默认被指向IIS6的“DefaultAppPool" 中, 所以在默认情况下,不管你有多少个asp.net程序在运行,在“Windows任务管理器”中你只能看到一个w3wp.exe进程。      出现上述错误的原因是: .net Framework 2.0的程序与.net Framework1.1(或1.0)的程序被放入同一个应用程序池(默认情况下放入DefaultAppPool池),也就是由同一个工作进程: w3wp.exe 进行管理,而单个工作进程是无法同时管理不同的程序(或者不同版本的程序)的。如果先访问.net framework 1.1的页面,则工作进程先加载并管理了 1.1版本的程序集,此时访问.net framework 2.0的web程序页面,Server Application Unavailable 错误就出来了。 反之,如果在默认应用程序池的w3wp.exe尚未启动前先访问了 2.0的web程序(此时应用程序集已经加载了.net framework2.0的Web程序集),再访问1.1或1.0的Web程序页面时,同样会出现“服务器应用程序不可用” 这样的中文提示。(您可以结束掉以前的w3wp.exe进行测试。)
      

  3.   

    在IIS中新建一个应用程序池,然后选中你的 基于.net framework2.0的虚拟目录,点“属性”-》在“应用程序池” 中选择刚才新建的的应用程序池,点击“确定”。
      

  4.   

    The web application you are attempting to access on this web server is currently unavailable你调用的服务目前暂时不可用.检查下webservice,如果是别人的,那就不是你能解决的了