2013/03/18

The connection name 'OraAspNetConString' was not found in the applications configuration or the connection string is empty

Event code: 3008
Event message: A configuration error has occurred.
Event time: 2013/3/18 下午 04:36:49
Event time (UTC): 2013/3/18 上午 08:36:49
Event ID: 14538e1dd6d04500b57f0eaee698b821
Event sequence: 103
Event occurrence: 1
Event detail code: 0
Application information:
    Application domain: /LM/W3SVC/1/ROOT/TEST/xxxxx 
    Trust level: Full
    Application Virtual Path: /TEST/xxxxx
    Application Path: D:\WEB\TEST\xxxxx\
    Machine name: MichAdelPC
Process information:
    Process ID: 38460
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
    Exception type: ConfigurationErrorsException
    Exception message: 在應用程式組態中找不到連線名稱 'OraAspNetConString', 或者連線字串空白. (C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config line 284)
   at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)
   at System.Web.Configuration.ProvidersHelper.InstantiateProviders(ProviderSettingsCollection configProviders, ProviderCollection providers, Type providerType)
   at System.Web.Configuration.SiteMapSection.get_ProvidersInternal()
   at System.Web.SiteMap.Initialize()
   at System.Web.SiteMap.get_Providers()
   at Admin.Menu.BindMenu() in d:\WEB\TEST\xxxxx\admin\menu.ascx.cs:line 85
   at Admin.Menu.OnLoad(EventArgs e) in d:\WEB\TEST\xxxxx\admin\menu.ascx.cs:line 60
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at ASP.default_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\xxxxxx\1cb83f19\15321ffe\App_Web_4cg0xawa.8.cs:line 0
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

在應用程式組態中找不到連線名稱 'OraAspNetConString', 或者連線字串空白.
   at Oracle.Web.Util.ReadConnectionString(NameValueCollection config)
   at Oracle.Web.SiteMap.OracleSiteMapProvider.Initialize(String name, NameValueCollection config)
   at System.Web.Configuration.ProvidersHelper.InstantiateProvider(ProviderSettings providerSettings, Type providerType)

 

原因: Oracle Client 於 11gR5 之後,提供 ASP.NET Membership for Oracle,但是在安裝 Oracle 時,會要再進階設定才會正常

修正方式:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config

<system.web>

<membership><providers>:移除 

<add name="OracleMembershipProvider" type="Oracle.Web.Security.OracleMembershipProvider, Oracle.Web, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName="" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />

<profile><providers>:移除

<add name="OracleProfileProvider" type="Oracle.Web.Profile.OracleProfileProvider, Oracle.Web, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName="" />

<roleManager><providers>:移除

<add name="OracleRoleProvider" type="Oracle.Web.Security.OracleRoleProvider, Oracle.Web, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName="" />

<siteMap><providers>:移除

<add name="OracleSiteMapProvider" type="Oracle.Web.SiteMap.OracleSiteMapProvider, Oracle.Web, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName="" securityTrimmingEnabled="true" />

<webParts><personalization><providers>:移除

<add name="OraclePersonalizationProvider" type="Oracle.Web.Personalization.OraclePersonalizationProvider, Oracle.Web, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName="" />

<healthMonitoring><providers>:移除

<add name="OracleWebEventProvider" type="Oracle.Web.Management.OracleWebEventProvider, Oracle.Web, Version=4.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" buffer="true" bufferMode="OracleNotification" />

沒有留言: