发布的网站服务器上发生应用程序错误

时间:2014-05-15 19:34:43

标签: c# asp.net

我使用Visual Studio 2013,ASP.NET和C#为我的最后一年项目创建了一个网站。 它是一个在线简历创建者,因此用户输入他们的详细信息并按提交并生成PDF(iTextSharp)。

问题是它从Visual Studio运行良好但是当我在线发布它时,它给我一个错误,可以在下面找到。

  

运行时错误
   描述:服务器上发生应用程序错误。此应用程序的当前自定义错误设置可防止远程查看应用程序错误的详细信息(出于安全原因)。但是,它可以由运行在本地服务器计算机上的浏览器查看。   详细信息:要在远程计算机上查看此特定错误消息的详细信息,请在" web.config"中创建标记。配置文件位于当前Web应用程序的根目录中。然后该标签应该具有"模式"属性设置为"关"。

 <!-- Web.Config Configuration File -->
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
 <!-- Web.Config Configuration File -->
<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>
enter code here

我网站的链接是http://myonlinecvcreator.azurewebsites.net/CV

1 个答案:

答案 0 :(得分:1)

在服务器上,在应用程序的文件夹中,您将找到名为web.config的文件。

在此文件中,您必须将这些行添加到其中:

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

实际上,标签配置已经在其中。因此,您必须在“配置”中插入其他3行。

然后,再次运行你的cv创建者,看看真正的错误是什么。

ps:新错误=新问题。但是在再次发布之前先搜索一下,否则人们会生气。