ASP.NET无法摆脱“500-内部服务器错误”
发布时间:2020-05-25 10:33:48 所属栏目:asp.Net 来源:互联网
导读:我正在创建一个ASP.NET网站,用于在CRM 2011中检索和插入数据. 一切都很顺利,页面正在部署到服务器,它已准备好进行测试. 突然出现了一个新的变化,在我删除服务器中的文件并重新发布项目后(我知道它不需要,但仍然……)我再也无法访问该网站了. 我得到的是500-内
|
我正在创建一个ASP.NET网站,用于在CRM 2011中检索和插入数据.
突然出现了一个新的变化,在我删除服务器中的文件并重新发布项目后(我知道它不需要,但仍然……)我再也无法访问该网站了. 我得到的是500-内部服务器错误 我尝试在页眉上使用debug =“True”打开调试功能,我设置了 <customErrors mode="Off"/> <compilation debug="true" targetFramework="4.5"/> 在web.config文件中,我也尝试添加 <httpErrors errorMode="Detailed" /> 但他们都没有帮助获得更好的错误信息. 我的web.config文件是: <?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application,please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration,visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection,EntityFramework,Version=5.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</configSections>
<connectionStrings>
<add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)v11.0;Initial Catalog=aspnet-ASP-20130619150943;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnet-ASP-20130619150943.mdf"/>
</connectionStrings>
<!--
For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.
The following attributes can be set on the <httpRuntime> tag.
<system.Web>
<httpRuntime targetFramework="4.5" />
</system.Web>
-->
<system.web>
<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.5"/>
<httpRuntime/>
<pages controlRenderingCompatibilityVersion="4.0">
<namespaces>
<add namespace="System.Web.Optimization"/>
</namespaces>
<controls>
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
</controls>
</pages>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login" timeout="2880" defaultUrl="~/"/>
</authentication>
<profile defaultProvider="DefaultProfileProvider">
<providers>
<add name="DefaultProfileProvider" type="System.Web.Providers.DefaultProfileProvider,System.Web.Providers,Version=1.0.0.0,PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/"/>
</providers>
</profile>
<membership defaultProvider="DefaultMembershipProvider">
<providers>
<add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider,PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
</providers>
</membership>
<roleManager defaultProvider="DefaultRoleProvider">
<providers>
<add name="DefaultRoleProvider" type="System.Web.Providers.DefaultRoleProvider,PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" applicationName="/"/>
</providers>
</roleManager>
<!--
If you are deploying to a cloud environment that has multiple web server instances,you should change session state mode from "InProc" to "Custom". In addition,change the connection string named "DefaultConnection" to connect to an instance
of SQL Server (including SQL Azure and SQL Compact) instead of to SQL Server Express.
-->
<sessionState mode="InProc" customProvider="DefaultSessionProvider">
<providers>
<add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider,PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection"/>
</providers>
</sessionState>
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.Core" publicKeyToken="2780ccd10d57b246"/>
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="DotNetOpenAuth.AspNet" publicKeyToken="2780ccd10d57b246"/>
<bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.1.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory,EntityFramework"/>
</entityFramework>
<appSettings>
<add key="CRMUserName" value="xxxx" />
<add key="CrmUserPassword" value="yyyy" />
<add key="OrganizationUri" value="https://uuuuuu/XRMServices/2011/Organization.svc" />
<add key="HomeRealmUri" value="" />
</appSettings>
</configuration>
我运行页面时收到错误消息. 错误触发的部分是: RetrieveAttributeRequest retrieveFreightTerm = new RetrieveAttributeRequest
{
EntityLogicalName = "account",LogicalName = "address1_freighttermscode",RetrieveAsIfPublished = true
};
有任何想法吗? 解决方法我从运行IIS的服务器打开了网站,我可以看到一个详细的错误页面,其中包含我需要的所有信息(编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net – 什么是Appdomain回收
- asp.net – ASP .NET核心Cookie身份验证到期时返回时从时间
- 通过HTTPS在ASP.NET中安全的会话cookie
- asp.net – HttpRequestBase.UserHostAddress抛出错误
- asp.net-mvc – 404处理Azure网站
- ASP.NET MVC =具有.NET类库的经典ASP.真?
- asp.net-mvc – 在ASP.NET MVC视图中递归
- asp.net – linq中的switch语句
- asp.net – 和debug =“false”有什么区别?
- asp.net – 从两个表(join)获取数据,并使用linq返回结果
推荐文章
站长推荐
- 验证 – Asp.Net MVC:子请求的执行失败.请查看I
- ASP.NET如何访问公共属性?
- 使用VSCode,DNX和kestrel运行第一个ASP.NET 5应用
- asp.net – MVC 6 WebAPI返回序列化的HttpRespon
- asp.net-mvc-3 – 在控制器操作完成后使用Javasc
- asp.net-mvc – 无法加载汇编WebPages.Deploymen
- asp.net-mvc – 如何从剃刀视图访问My.Resources
- asp.net – SOAP与HTTP
- ASP.NET UpdatePanel库引用错误
- asp.net-mvc – 使用ValueInjecter在具有不同属性
热点阅读
