找不到或无法加载已注册的 .Net Framework Data Provider。
说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Configuration.ConfigurationErrorsException: 找不到或无法加载已注册的 .Net Framework Data Provider。
源文件: c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\308e6a20\d44281c8\App_Web_index.aspx.cdcab7d2.ebi6tv3u.0.cs 行: 0
堆栈跟踪:
[ConfigurationErrorsException: 找不到或无法加载已注册的 .Net Framework Data Provider。] System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow) +2224666 System.Data.EntityClient.EntityConnection.GetFactory(String providerString) +143 System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +641 System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString) +67 Model.Entities..ctor() +40 index..ctor() +32 ASP.index_aspx..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\308e6a20\d44281c8\App_Web_index.aspx.cdcab7d2.ebi6tv3u.0.cs:0 __ASP.FastObjectFactory_app_web_index_aspx_cdcab7d2_ebi6tv3u.Create_ASP_index_aspx() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\308e6a20\d44281c8\App_Web_index.aspx.cdcab7d2.ebi6tv3u.1.cs:0 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +174 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +42 System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +549 System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +193 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375 |
应该是服务器缺少指定的服务驱动程序。
本地测试和IIS测试都在同一台机子上
@寂寞如影: 那是否是因为权限的问题?
你的“本地”是指在Visual Studio上跑?
对
把你的配置文件内容贴上来看下
再看看这里http://zhoufoxcn.blog.51cto.com/792419/622376
@az235: WEBCONFIG配置文件如下:
<?xml version="1.0" encoding="utf-8"?>
<!--
有关如何配置 ASP.NET 应用程序的详细信息,请访问
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="Entities"
connectionString="metadata=res://*/App_Code.Model.csdl|
res://*/App_Code.Model.ssdl|
res://*/App_Code.Model.msl;provider=Oracle.DataAccess.Client;p
rovider connection string="DATA SOURCE=(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=ORCL)));PASSWORD=sxwsw;PERSIST
SECURITY INFO=True;USER ID=SXWSW""
providerName="System.Data.EntityClient" /></connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Security, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Data.Entity, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data.Entity.Design,
Version=4.0.0.0, Culture=neutral,
PublicKeyToken=B77A5C561934E089" />
</assemblies>
<buildProviders>
<add extension=".edmx"
type="System.Data.Entity.Design.AspNet.EntityDesignerBuildProv
ider" />
</buildProviders>
</compilation>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>
<membership>
<providers>
<clear />
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="ApplicationServices"
enablePasswordRetrieval="false" enablePasswordReset="true"
requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0"
passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>
<profile>
<providers>
<clear />
<add name="AspNetSqlProfileProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="ApplicationServices" applicationName="/"
/>
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear />
<add name="AspNetSqlRoleProvider"
type="System.Web.Security.SqlRoleProvider"
connectionStringName="ApplicationServices" applicationName="/"
/>
<add name="AspNetWindowsTokenRoleProvider"
type="System.Web.Security.WindowsTokenRoleProvider"
applicationName="/" />
</providers>
</roleManager>
<pages>
<controls>
<add tagPrefix="navigate"
src="~/Controls/Navigate.ascx" tagName="nav" />
<add tagPrefix="navigate" src="~/Controls/ylbx.ascx"
tagName="ylbx" />
<add tagPrefix="navigate" src="~/Controls/jkys.ascx"
tagName="jkys" />
<add tagPrefix="navigate" src="~/Controls/menu.ascx"
tagName="menu" />
</controls>
</pages>
<httpRuntime requestValidationMode="2.0"
maxRequestLength="50000" executionTimeout="120" />
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<defaultDocument>
<files>
<add value="index.aspx" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
应该是没有安装oracle有关EF的驱动。安装一下就可以了。
朋友,你这个问题怎么解决的?我也遇到同样的问题了,求助
IIS设置中更改启用32应用程序支持OK