[英]How To remove This Web config error, It works Fine on local host but if i uploaded on the server then Errror occured
This is my Web.config File......Following is the error 这是我的Web.config文件……以下是错误
An application error occurred on the server.
服务器上发生应用程序错误。 The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons).
该应用程序的当前自定义错误设置阻止应用程序错误的详细信息被远程查看(出于安全原因)。
It could, however, be viewed by browsers running on the local server machine. 但是,可以由运行在本地服务器计算机上的浏览器查看它。
<?xml version="1.0"?>
<configuration>
<appSettings>
<add key="SqlCon" value="Data Source=173.192.89.445;Initial Catalog=Rent_Driver; user
</appSettings>
<location path="driversonrent.com" allowOverride="true">
<system.web>
<customErrors mode="Off" />
<roleManager enabled="true"/>
<compilation debug="true" targetFramework="4.0">
<assemblies>
<add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.DynamicData.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>
<authentication mode="None">
<forms name="Loginnew" path="/" loginUrl="Loginnew.aspx" protection="Validation" timeout="30"></forms>
</authentication>
<pages controlRenderingCompatibilityVersion="4.0" clientIDMode="AutoID"/>
</system.web>
在此处添加〜:path =“〜/”或在login.aspx之前,以使服务器采用相对路径。
Although the previous answer is technically correct (and acceptable) but it's normally not a good practice to show raw errors to remote users from your production server as they could potentially contain sensitive information and are a put-off to general public. 尽管上一个答案在技术上是正确的(并且可以接受),但是通常不是从生产服务器向远程用户显示原始错误的好习惯,因为这些错误可能包含敏感信息,并且容易受到公众的欢迎。
You might be better off by: 您可能会受益于:
There are a lot of articles out there to help you with this kind of implementation if that is what you require. 如果您需要的话,有很多文章可以帮助您实现这种实现。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.