我有一个将在IIS上运行的Web服务应用程序,但运行时遇到问题。我有以下情形:IIS的问题
- 当通过复制在Inetpub/wwwroot的应用程序在Windows 7上运行IIS应用程序文件夹 - 我得到当前Web请求的执行过程中发生未处理的异常错误” 。请查看堆栈跟踪以获取有关错误的更多信息以及代码中源代码的位置。“
- 当在Visual Studio中按”运行“运行相同的应用程序(此分配临时端口)时,Web服务将显示在浏览器正常
- 当在Win XP PC中重复上述操作时,所有这两种情况都可以正常工作。
你有什么想法可能是什么问题?也许在IIS 7中的一些设置? 感谢
更新 - 事件查看器日志
事件代码:3008 事件消息:发生了配置错误。 事件时间:10/06/2010 20时33分10秒 事件时间(UTC):10/06/2010 18点33分10秒 事件ID:7b4166753a6d4d41bd9b8709d24332f4 事件序列:4 事件发生:1个 事件详细信息代码:0
应用程序信息: 应用程序域:/ LM/W3SVC/1/ROOT/SSMT_Service-4-129206683902187500 信任级别:全 应用程序虚拟路径:/ SSMT_Service 应用程序路径:C:\的Inetpub \ wwwroot的\ SSMT_Service \ 机器名称:SANDRO-PC
进程信息: 进程ID:5024 进程名:w3wp.exe 帐户名:IIS APPPOOL \默认应用
异常信息: 异常类型:ConfigurationErrorsException 异常消息:无法加载文件或程序集 'NHunspell' 或它的一个依赖关系。试图加载格式不正确的程序。
索取信息: 请求URL:http://localhost/SSMT_Service/ProcessImage.asmx 请求路径:/SSMT_Service/ProcessImage.asmx 用户主机地址::: 1 用户:
通过身份验证:假 身份验证类型:
线程帐户名称:IIS APPPOOL \默认应用
线程信息: 线程ID:5 线程帐户名称:IIS APPPOOL \默认应用 正在模拟:假 圣ACK迹:在System.Web.Configuration.CompilationSection.LoadAssemblyHelper(字符串的AssemblyName,布尔starDirective) 在System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() 在System.Web.Configuration.CompilationSection.LoadAssembly(集信息AI) 在System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() 在System.Web.Compilation.BuildManager。GetReferencedAssemblies(CompilationSection compConfig) 在System.Web.Compilation.WebDirectoryBatchCompiler..ctor(VirtualDirectory VDIR) 在System.Web.Compilation.BuildManager.BatchCompileWebDirectoryInternal(VirtualDirectory VDIR,布尔ignoreErrors) 在System.Web.Compilation.BuildManager.CompileWebFile (VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath,Boolean noBuild,Boolean allowCrossApp,Boolean allowBuildInPrecompile) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context,VirtualPath virtualPath,Boolean noBuild,Boolean allowCrossApp,Boolean allowBuildInPrecompile) at System.Web.UI.WebServiceParser.GetCompiledType(String inputFile,HttpContext context) at System.Web.Services.Protocols.WebServiceHandlerFactory.GetHandler(HttpContext上下文,字符串动词,字符串url,字符串filePath) at System.Web.Script.Services.ScriptHandlerFactory.GetHandler(HttpContext上下文,字符串requestType,字符串url,字符串pathTranslated) 在System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔& completedSynchronously)
自定义事件详细:
异常是指无法加载文件或程序集“NHunspell”。这是什么,它与你的应用或服务有什么关系? – 2010-06-10 18:41:34
这是一个拼写检查DLL。在Windows应用程序中它可以工作,并且也可以作为Win XP电脑上的Web应用程序。问题在于应用程序实际部署的Win 7 PC – mouthpiec 2010-06-10 18:44:54
由于例外说明应用程序失败,因为它无法加载NHunspell,这表明NHunspell没有正确部署。尝试检查IIS文件结构,并确保一切以您希望的方式部署。 – 2010-06-10 18:48:56