在服务器IIS 7.5中部署后,web.config文件错误 [英] web.config file error after deploying in server IIS 7.5
问题描述
在服务器IIS 7.5中部署Web应用程序之后.
而当我尝试运行它时,它会显示类似的错误.
500-内部服务器错误.
您正在寻找的资源有问题,并且无法显示
在我当地,它工作正常.通过谷歌,我知道错误在于web.config文件..但我无法解决.
这是我的服务器的web.config文件.
After deploying my web application in server IIS 7.5.
And when I am trying to run it It''s showing the error like.
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed
In my local it''s working fine. through google I came to know that error lies in web.config file..but I could not solve it.
Here''s my server web.config file.
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<appsettings>
<add key="ChartImageHandler" value="storage=file;timeout=20;" />
</appsettings>
<connectionstrings>
<add name="ApplicationServices" connectionstring="Data Source=ITCSERVER;Initial Catalog=ForecasteChart;User ID=weblogin;Password=Mazha$villu@77504" providername="System.Data.SqlClient" />
<add name="strforecastConnectionString" connectionstring="Data Source=ITCSERVER;Initial Catalog=ForecasteChart;User ID=weblogin;Password=Mazha$villu@77504" providername="System.Data.SqlClient" />
<!--<add name="strforecastConnectionString" connectionstring="Data Source=PRADEEP\SQLEXPRESS;Initial Catalog=ForecasteChart;User ID=sa;Password=sa123" providername="System.Data.SqlClient" />
<add name="ApplicationServices" connectionstring="Data Source=PRADEEP\SQLEXPRESS;Initial Catalog=ForecasteChart;User ID=sa;Password=sa123" providername="System.Data.SqlClient" />-->
</connectionstrings>
<system.web>
<httphandlers>
<add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
validate="false" />
</add></httphandlers>
<pages>
<controls>
<add tagprefix="asp" namespace="System.Web.UI.DataVisualization.Charting">
assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</add></controls>
</pages>
<customerrors mode="Off" />
<compilation debug="true" targetframework="4.0">
<assemblies>
<add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</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>
</system.web>
<system.webserver>
<modules runallmanagedmodulesforallrequests="true" />
<handlers>
<remove name="ChartImageHandler" />
<add name="ChartImageHandler" precondition="integratedMode" verb="GET,HEAD,POST">
path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</add></handlers>
</system.webserver>
</configuration>
有帮助吗?
谢谢你
Pradeep Anugu.
Any help?
Thank u
Pradeep Anugu.
推荐答案
villu @ 77504" providername System.Data.SqlClient" / < 添加 =" strforecastConnectionString" 连接字符串 数据源= ITCSERVER;初始目录= ForecasteChart;用户ID = weblogin;密码= Mazha
villu@77504" providername="System.Data.SqlClient" /> <add name="strforecastConnectionString" connectionstring="Data Source=ITCSERVER;Initial Catalog=ForecasteChart;User ID=weblogin;Password=Mazha
villu @ 77504" 提供商名称 =" / > <!- < add name ="strforecastConnectionString" connectionstring =数据源= PRADEEP \ SQLEXPRESS;初始目录= ForecasteChart;用户ID = sa;密码= sa123"providername =" System.Data.SqlClient"/> < add name ="ApplicationServices" connectionstring ="Data Source = PRADEEP \ SQLEXPRESS; Initial Catalog = ForecasteChart; User ID = sa; Password = sa123" providername ="System.Data.SqlClient"/> -> < /connectionstrings > < system.web > < httphandlers > < 添加 =" ChartImg.axd" 动词 GET ,HEAD,POST" 类型 System.Web.UI.DataVisualization.Charting.ChartHttpHandler,System.Web.DataVisualization,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35" > validate ="false"/> < /add > < /httphandlers > < 页面 > < 控件 > < 添加 =" asp" 命名空间 System.Web .UI.DataVisualization.Charting" > assembly ="System.Web.DataVisualization,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = 31bf3856ad364e35"/> < /add > < /controls > < /页面 > < customerrors =" 关闭" / < 编译 =" true" targetframework > 4.0" > < 装配体 > < 添加 程序集 System.Web.DataVisualization,Version = 4.0.0.0,Culture =中性,PublicKeyToken = 31BF3856AD364E35" / < /assembly > < /compilation > < 身份验证 =" 表单" < 表单 =" 〜/Account/Login.aspx" 超时 =" / > < /authentication > < 成员资格 > < 提供者 > < 清除 > < 添加 =" AspNetSqlMembershipProvider" 类型 System.Web .Security.SqlMembershipProvider" 连接字符串名称 ApplicationServices" 启用密码检索 =" =" true" 要求提问并回答 =" requiresuniqueemail =" maxinvalidpassword尝试 最小密码长度 =" 必需的非字母数字字符 =" 密码尝试窗口 10"应用名称 =" / >> ; < /提供者 > < /成员身份 > < 个人资料 > < 提供者 > < 清除 > < 添加 =" AspNetSqlProfileProvider" 类型 System.Web .Profile.SqlProfileProvider" 连接字符串名 ApplicationServices" 应用名称 =" > < /提供者 > < /profile > < rolemanager =" false" < 提供者 > < 清除 > < 添加 =" AspNetSqlRoleProvider" 类型 System.Web .Security.SqlRoleProvider" 连接字符串名 ApplicationServices" 应用名称 =" > < 添加 =" AspNetWindowsTokenRoleProvider" 类型 System.Web .Security.WindowsTokenRoleProvider" 应用程序名称 /" / > < /提供者 > < /rolemanager > < /system.web > < system.webserver > < 模块 =" true" / < 处理程序 > < 删除 =" ChartImageHandler" / < 添加 =" ChartImageHandler" 前提条件 integratedMode" 动词 =" GET,HEAD,POST" < /add > < /handlers > < /system.webserver > < /configuration >
villu@77504" providername="System.Data.SqlClient" /> <!--<add name="strforecastConnectionString" connectionstring="Data Source=PRADEEP\SQLEXPRESS;Initial Catalog=ForecasteChart;User ID=sa;Password=sa123" providername="System.Data.SqlClient" /> <add name="ApplicationServices" connectionstring="Data Source=PRADEEP\SQLEXPRESS;Initial Catalog=ForecasteChart;User ID=sa;Password=sa123" providername="System.Data.SqlClient" />--> </connectionstrings> <system.web> <httphandlers> <add path="ChartImg.axd" verb="GET,HEAD,POST" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> validate="false" /> </add></httphandlers> <pages> <controls> <add tagprefix="asp" namespace="System.Web.UI.DataVisualization.Charting"> assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </add></controls> </pages> <customerrors mode="Off" /> <compilation debug="true" targetframework="4.0"> <assemblies> <add assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> </assemblies> </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> </system.web> <system.webserver> <modules runallmanagedmodulesforallrequests="true" /> <handlers> <remove name="ChartImageHandler" /> <add name="ChartImageHandler" precondition="integratedMode" verb="GET,HEAD,POST"> path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> </add></handlers> </system.webserver> </configuration>
有帮助吗?
谢谢你
Pradeep Anugu.
Any help?
Thank u
Pradeep Anugu.
修复链接
ASP.NET-IIS7部署错误500 [ 500-ASPX页的内部服务器错误 [
Fix links
ASP.NET - IIS7 Deployment Error 500[^]
500 - Internal server error for ASPX page[^]
这篇关于在服务器IIS 7.5中部署后,web.config文件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!