ASP会员奇怪的问题 [英] ASP Membership Odd Problem

查看:344
本文介绍了ASP会员奇怪的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ASP .NET中的成员身份API,我也遇到过我的临时服务器上以下问题。该应用程序工作正常,我的本地机器上。数据表存储在SQL Server上。我的两个本地和临时服务器指向同一个数据库服务器。当我部署到我的临时服务器我得到以下错误:

I am using the Membership API in ASP .NET and I have encountered the following problem on my staging server. The application works fine on my local machine. The data tables are stored on a SQL Server. Both my local and staging server point to the same DB server. When I deploy to my staging server I get the following error:

 Parser Error Message: The connection name 'OraAspNetConString' was not 
 found in the applications configuration or the connection string is empty. 

    Line 135:    <roleManager>
    Line 136:      <providers>
    Line 137:        <add name="OracleRoleProvider" 

type="Oracle.Web.Security.OracleRoleProvider, Oracle.Web, Version=2.111.6.20,
Culture=neutral, PublicKeyToken=89b483f429c47342" 
connectionStringName="OraAspNetConString" applicationName="" />
    Line 138:        <add name="AspNetSqlRoleProvider"   
connectionStringName="LocalSqlServer" applicationName="/" 
type="System.Web.Security.SqlRoleProvider, System.Web, Version=2.0.0.0, 
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    Line 139:        <add name="AspNetWindowsTokenRoleProvider" 
applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, 
System.Web, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a" />


Source File: 
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Config\machine.config
    Line: 137

我不知道为什么它甚至试图做的与Oracle,我的的web.config 不包含与Oracle相关的任何东西。

I do not know why it is even trying to do anything with Oracle, my web.config does not contain anything associated with Oracle.

没有人有任何深入了解为什么发生这种情况?

Does anyone have any insight into why this is happening?


在我的本地机器上的machine.config中我没有OracleRoleProvider关键。但我的临时服务器一样。如果没有什么帮助。

On my local machine's machine.config I do not have the OracleRoleProvider key. But my staging server does. If that helps.

推荐答案

老问题在这里,但我只是碰到了它,并希望分享一些更多的细节。

Old question here but I just ran into it and wanted to share some more details.

首先,如果你需要做一个&LT最简单的解决方案;清/&GT; 你是connectionStrings块添加一个空白OraAspNetConString的ConnectionString进入回您的网页。配置:

First, the easiest solution if you need to do a <clear/> in your connectionStrings block is to add a blank OraAspNetConString connectionstring entry back into your web.config:

<connectionStrings>
    <clear />
      <add name="OraAspNetConString" connectionString=" "/>    
</connectionStrings>

会发生什么,当你安装Oracle .NET包在您的任何机器是安装一吨不同的供应商到你的machine.config与OraAspNetConString作为计算机级别的connectionString一起。在&LT;清/&GT; 元素,摆脱了OraAspNetConString和感谢Oracle的machine.config中添加的所有默认加载的其他Oracle提供商正在崩溃时,他们不能找到的connectionString。

What happens when you install the Oracle .NET package on any of your machines is it installs a ton of different providers into your machine.config along with the OraAspNetConString as a machine-level connectionString. The <clear/> element gets rid of that OraAspNetConString and thanks to Oracle's machine.config additions all of the other Oracle providers loaded by default are crashing when they can't find the connectionString.

这里的其他答案在您使用会员提供的元素没有工作,因为大部分在machine.config添加的其他Oracle供应商仍然会寻找该探讨的 OraAspNetConString 等等结算只是一个供应商不帮你。

The other answer here where you explored using the element for membership providers didn't work because most of the other oracle providers added in the machine.config are still going to be looking for that OraAspNetConString so clearing just that one provider doesn't help you.

这是他们安装到我的machine.config中的所有供应商:

These are all the providers they installed into my machine.config:

<membership><providers>
    <add name="OracleMembershipProvider" type="Oracle.Web.Security.OracleMembershipProvider, Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName="" />
</providers></membership>
<profile><providers>
    <add name="OracleProfileProvider" type="Oracle.Web.Profile.OracleProfileProvider, Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName=""/>
</providers></profile>
<roleManager><providers>
    <add name="OracleRoleProvider" type="Oracle.Web.Security.OracleRoleProvider, Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName=""/>
</providers></roleManager>
<siteMap><providers>
    <add name="OracleSiteMapProvider" type="Oracle.Web.SiteMap.OracleSiteMapProvider, Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName="" securityTrimmingEnabled="true"/>
</providers></siteMap>
<webParts>
  <personalization>
    <providers>
      <add name="OraclePersonalizationProvider" type="Oracle.Web.Personalization.OraclePersonalizationProvider, Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" applicationName=""/>
    </providers>
  </personalization>
</webParts>
<healthMonitoring><providers>
    <add name="OracleWebEventProvider" type="Oracle.Web.Management.OracleWebEventProvider, Oracle.Web, Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342" connectionStringName="OraAspNetConString" buffer="true" bufferMode="OracleNotification"/>
</providers></healthMonitoring>

所以,如果你不想添加空白OraAspNetConString你必须确保你无论是&LT;清/&GT; 以下Oracle中的每一个供应商或去并添加&LT;清除名称= X /&GT; 元素每个供应商类是这样的:

So if you didn't want to add the blank OraAspNetConString you'd have to make sure that you either <clear/> every one of the following Oracle Providers or go in and add a <remove name=x /> element to each provider class like this:

<membership><providers>
    <remove name="OracleMembershipProvider" />
</providers></membership>
<profile><providers>
    <remove name="OracleProfileProvider" />
</providers></profile>
<roleManager><providers>
    <remove name="OracleRoleProvider" />
</providers></roleManager>
<siteMap><providers>
    <remove name="OracleSiteMapProvider" />
</providers></siteMap>
<healthMonitoring><providers>
    <remove name="OracleWebEventProvider" />
</providers></healthMonitoring>

我从来没有处理任何地图或健康监测code在我的web应用程序,但我仍然不得不手动添加这些&LT;删除/&gt;作为在元素在我的web.config什么不同的供应商将崩溃找那是不是有OraAspNetConString连接字符串。

I never dealt with any siteMap or Health Monitoring code in my web app but I still had to manually add these <remove/> elements for the different providers in my web.config or something would crash looking for an OraAspNetConString connection string that wasn't there.

这篇关于ASP会员奇怪的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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