Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 旋转器控制中的错误_Asp.net_.net - Fatal编程技术网

Asp.net 旋转器控制中的错误

Asp.net 旋转器控制中的错误,asp.net,.net,Asp.net,.net,我对ASP.NET非常陌生,我仍在学习基础知识以及如何使用各种控件。 我使用了adRotator控件,还使用下面提到的编码创建了XML文件,但在浏览器中执行时,它会显示错误消息(我在代码之后发布) XML文件: <?xml version="1.0" encoding="utf-8"?> <Advertisement> <Ad> <ImageUrl> images/Logo.gif</ImageUrl> <Na

我对ASP.NET非常陌生,我仍在学习基础知识以及如何使用各种控件。 我使用了adRotator控件,还使用下面提到的编码创建了XML文件,但在浏览器中执行时,它会显示错误消息(我在代码之后发布)

XML文件:

<?xml version="1.0" encoding="utf-8"?>
<Advertisement>
  <Ad>
    <ImageUrl> images/Logo.gif</ImageUrl>
    <NavigateUrl>http://www.google.co.in</NavigateUrl>
    <AlternateTExt> Main </AlternateTExt>
    <Keyword>LogoImage</Keyword>
  </Ad>
  <Ad>
    <ImageUrl> images/RedBik.gif</ImageUrl>
    <NavigateUrl>http://www.yahoo.co.in</NavigateUrl>
    <AlternateTExt> Main2 </AlternateTExt>
    <Keyword>RedBikImage</Keyword>
  </Ad>
</Advertisement>

image/Logo.gif
http://www.google.co.in
主要
标识图像
image/RedBik.gif
http://www.yahoo.co.in
缅因州2
红比克图像
Default.aspx

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

    <asp:AdRotator id="AdRotator1" 
            style="Z-INDEX: 102; LEFT: 32px; 
        POSITION: absolute; TOP: 32px; height: 222px; width: 883px;" 
            runat="server" AdvertisementFile="~/myAds.xml">

    </asp:AdRotator>
    </div>
    </form>
</body>
</html>

无标题页
请注意,我没有在Default.aspx.cs文件中编写任何代码。 我在浏览器中收到的错误消息是:

“/AdRotatorControl”应用程序中出现服务器错误。 运行时错误 描述:服务器上发生应用程序错误。此应用程序的当前自定义错误设置阻止查看应用程序错误的详细信息。 详细信息:若要在本地服务器计算机上查看此特定错误消息的详细信息,请在位于当前web应用程序根目录中的“web.config”配置文件中创建一个标记。然后,该标记的“mode”属性应设置为“RemoteOnly”。要在远程计算机上查看详细信息,请将“模式”设置为“关闭”。

Web.Config

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

注意:通过修改应用程序配置标记的“defaultRedirect”属性以指向自定义错误页URL,可以将当前看到的错误页替换为自定义错误页

<configuration>
    <system.web>
        <customErrors mode="On" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>

有谁能找出错误并帮我解决吗

请帮帮我


提前谢谢

您需要编辑web.config文件以启用详细的错误消息,为此,请将此标记添加到您的web.config:

<customErrors mode="Off"/>

在部署到prod之前,记得重新打开它!