0

好吧,我已经四处搜索,但没有人的解决方案可以解决我的问题。

这是我得到的错误(无论如何它的屏幕截图):

在此处输入图像描述

当我从 Visual Studio 中运行该站点时,该站点运行良好。

有人有什么想法吗?我以前从未在 IIS7 中运行过站点(或者在 IIS 中),所以我在进行过程中有点生气。

这是我的默认页面源:

<%@ Page Title="" Language="VB" MasterPageFile="~/master/default.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <title>TreyBoard - Chan</title>
    <link rel="stylesheet" type="text/css" href="styles/chan.css" />
    <script src="scripts/jquery.js"></script>
    <script src="scripts/chan.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Body" Runat="Server">
    <span id="sound"></span>
    <form id="CommentForm" method="post" runat="server" enctype="multipart/form-data">
        <table style="margin:auto;margin-top:50px;margin-bottom:50px;">
            <tr><td class="chanlabel">Name</td><td>
                <asp:TextBox ID="inp_Name" runat="server"></asp:TextBox>
                <input type="submit" value="Submit" /></td></tr>
            <tr><td class="chanlabel">Comment</td><td>
                <asp:TextBox ID="inp_Comment" runat="server" TextMode="MultiLine"></asp:TextBox>
                </td></tr>
            <tr><td class="chanlabel">Image</td><td>
                <input id="inp_Image" type="file" runat="server">
                </td></tr>
            <tr><td colspan="2">Supported file types are : GIF, JPG, PNG</td></tr>
            <tr><td colspan="2">Maximum file size allowed is 2048 KB.</td></tr>
            <tr><td colspan="2">Images greater than 250x250 pixels will be thumbnailed.</td></tr>
            <tr><td colspan="2">Read the rules and FAQ before posting.</td></tr>
            <tr><td colspan="2">Type %[SoundBoardname] to put a Trey quote in your comment.</td></tr>

        </table>
    </form>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:TurtleString %>" 
        DeleteCommand="DELETE FROM [ChanPost] WHERE [id] = @id" 
        InsertCommand="INSERT INTO [ChanPost] ([Name], [Image], [Comment]) VALUES (@Name, @Image, @Comment)" 
        SelectCommand="SELECT * FROM [ChanPost] ORDER BY [id] DESC" 

        UpdateCommand="UPDATE [ChanPost] SET [Name] = @Name, [Image] = @Image, [Comment] = @Comment WHERE [id] = @id">
        <DeleteParameters>
            <asp:Parameter Name="id" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Image" Type="String" />
            <asp:Parameter Name="Comment" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="Image" Type="String" />
            <asp:Parameter Name="Comment" Type="String" />
            <asp:Parameter Name="id" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" 
        ViewStateMode="Disabled">
        <ItemTemplate>
            <hr />
            <div class="reply">
                File: <a href='chan\<%# DataBinder.Eval(Container.DataItem, "Image")%>'><%# DataBinder.Eval(Container.DataItem, "Image")%></a>
                            <table style="margin:auto;width:90%;">
                                <tr>
                                    <td width="35%" style="text-align:right;"><img style="max-height:200px;" src='chan\<%# DataBinder.Eval(Container.DataItem, "Image")%>' /></td>
                                    <td width="65%"><div class="replytext"><span style="color:#117743;font-weight:bold;"><%# DataBinder.Eval(Container.DataItem, "Name")%></span> ID::<%# DataBinder.Eval(Container.DataItem, "id")%>[<a href="reply.aspx?id=<%# DataBinder.Eval(Container.DataItem, "id")%>">Reply</a>]<br /><br /><%# DataBinder.Eval(Container.DataItem, "comment")%></div></td>
                    </tr>
                </table>
            </div>
        </ItemTemplate>
    </asp:Repeater>
</asp:Content>

谢谢!

4

0 回答 0