IIS7上的Web应用程序错误 [英] Web application on IIS7 Error

查看:85
本文介绍了IIS7上的Web应用程序错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我构建的第一个小型Web应用程序.它的作用是从Oracle中的数据创建XML文件.正确创建了文件,然后它将使用已创建的Web服务将文件提交进行处理.

我以前从未发布过IIS 7.0,但是我按照此处找到的说明进行了操作.

问题是当它与Web服务一起提交时.

我收到以下错误:


System.Configuration.ConfigurationErrorsException:为applicationSettings/WebApplication.Properties.Settings创建配置节处理程序时发生错误:无法加载文件或程序集``System,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089''或一个它的依赖关系.该系统找不到指定的文件. (C:\ inetpub \ wwwroot \ MTC_UPLOAD \ web.config第9行)---> System.IO.FileNotFoundException:无法加载文件或程序集系统,版本= 4.0.0.0,区域性=中性,PublicKeyToken = b77a5c561934e089"或其依赖项之一.系统找不到指定的文件.
文件名:``系统,版本= 4.0.0.0,文化=中性,PublicKeyToken = b77a5c561934e089''
在System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost主机,字符串typeString,布尔throwOnError)
在System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord,FactoryRecord factoryRecord)
在System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord,FactoryRecord factoryRecord)
在System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory..ctor处(RuntimeConfigurationRecord configRecord,FactoryRecord factoryRecord)
在System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
在System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey,Boolean&isRootDeclaredHere)

WRN:程序集绑定日志记录已关闭.
若要启用程序集绑定失败日志记录,请将注册表值[HKLM \ Software \ Microsoft \ Fusion!EnableLog](DWORD)设置为1.
注意:与程序集绑定失败日志记录相关的性能损失.
要关闭此功能,请删除注册表值[HKLM \ Software \ Microsoft \ Fusion!EnableLog].

---内部异常堆栈跟踪的结尾---
在System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey,Boolean&isRootDeclaredHere)
在System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey,布尔getLkg,布尔checkPermission,布尔getRuntimeObject,布尔requestIsHere,对象与结果,对象与resultRuntimeObject)
在System.Configuration.BaseConfigurationRecord.GetSection(String configKey,布尔值getLkg,布尔值checkPermission)
在System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
在System.Web.HttpContext.GetSection(String sectionName)
在System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName)
在System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
在System.Configuration.ConfigurationManager.GetSection(String sectionName)
在System.Configuration.ClientSettingsStore.ReadSettings处(字符串sectionName,布尔值isUserScoped)
在System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext上下文,SettingsPropertyCollection属性)中
在System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider提供程序)
在System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
在System.Configuration.SettingsBase.get_Item(String propertyName)
在System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
在System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
在C:\ Users \ 60041724 \ Desktop \ SVN WEB \ WebApplication \ Properties \ Settings.Designer.cs:第33行中的WebApplication.Properties.Settings.get_WebApplication_CertificateServ1_ServiceInterface() 在C:\ Users \ 60041724 \ Desktop \ SVN WEB \ WebApplication \ Web References \ CertificateServ1 \ Reference.cs:line 38中的WebApplication.CertificateServ1.ServiceInterface..ctor() 在WebApplication._Default.btnUpload0_Click(Object sender,EventArgs e)中的C:\ Users \ 60041724 \ Desktop \ SVN WEB \ WebApplication \ Default.aspx.cs:line 87

任何帮助将不胜感激,因为我不知道我是否发布正确.

This is the first small web application I have built. What it does is create a XML file from data in Oracle. The file is created properly and it then will use a web service already created to submit the file for processing.

I have never published to IIS 7.0 before but I followed the directions I found here and got it running.

The problem is when it is submitted with the web service.

I get the following error:


System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for applicationSettings/WebApplication.Properties.Settings: Could not load file or assembly ''System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'' or one of its dependencies. The system cannot find the file specified. (C:\inetpub\wwwroot\MTC_UPLOAD\web.config line 9) ---> System.IO.FileNotFoundException: Could not load file or assembly ''System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'' or one of its dependencies. The system cannot find the file specified.
File name: ''System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089''
at System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError)
at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.Init(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory.InitWithRestrictedPermissions(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
at System.Configuration.RuntimeConfigurationRecord.RuntimeConfigurationFactory..ctor(RuntimeConfigurationRecord configRecord, FactoryRecord factoryRecord)
at System.Configuration.RuntimeConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord)
at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

--- End of inner exception stack trace ---
at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey, Boolean getLkg, Boolean checkPermission)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Web.HttpContext.GetSection(String sectionName)
at System.Web.Configuration.HttpConfigurationSystem.GetSection(String sectionName)
at System.Web.Configuration.HttpConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String configKey)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at System.Configuration.ClientSettingsStore.ReadSettings(String sectionName, Boolean isUserScoped)
at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(SettingsContext context, SettingsPropertyCollection properties)
at System.Configuration.SettingsBase.GetPropertiesFromProvider(SettingsProvider provider)
at System.Configuration.SettingsBase.GetPropertyValueByName(String propertyName)
at System.Configuration.SettingsBase.get_Item(String propertyName)
at System.Configuration.ApplicationSettingsBase.GetPropertyValue(String propertyName)
at System.Configuration.ApplicationSettingsBase.get_Item(String propertyName)
at WebApplication.Properties.Settings.get_WebApplication_CertificateServ1_ServiceInterface() in C:\Users\60041724\Desktop\SVN WEB\WebApplication\Properties\Settings.Designer.cs:line 33
at WebApplication.CertificateServ1.ServiceInterface..ctor() in C:\Users\60041724\Desktop\SVN WEB\WebApplication\Web References\CertificateServ1\Reference.cs:line 38
at WebApplication._Default.btnUpload0_Click(Object sender, EventArgs e) in C:\Users\60041724\Desktop\SVN WEB\WebApplication\Default.aspx.cs:line 87

Any help would be greatly appreciated as I have no idea if I am publishing correct.

推荐答案

您需要安装.Net 4,并在IIS中注册它,然后进行更改您的应用程序到.Net 4的应用程序池.

这是一个非常简单且指向重点的有用链接:

http://www.devx.com/vb2themax/Tip/18849 [
You need to install .Net 4, register it with your IIS and then change the app pool your application is to .Net 4.

Here is a helpful link thats very simple and to the point:

http://www.devx.com/vb2themax/Tip/18849[^]

The other option is, compile it in .Net 2, but I dont recommend that!


这篇关于IIS7上的Web应用程序错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆