注册 登录
编程论坛 ASP技术论坛

网站搬家后出错了

liyan0102034 发布于 2012-10-29 20:59, 1072 次点击
程序搬家后,网站后台上会产品图片出错!~不知道是什么原因。
程序代码:
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Administrator/MasterPage.master"
    CodeFile
="ProductsEdit.aspx.cs" Inherits="ProductsEdit" Title="编辑页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table cellspacing="1" cellpadding="0" width="100%" class="formitem">
        <caption>
            编辑产品</caption>
        <tr>
            <th>
              产品名称:
            </th>
            <td>
                <asp:TextBox ID="txtTitle" runat="server" Style="width: 61%"></asp:TextBox>
            
            </td>
        </tr>
        

        <tr>
            <th>
                产品分类:
            </th>
            <td>
                <asp:DropDownList ID="ddlType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlType_SelectedIndexChanged">
                </asp:DropDownList>
                <asp:DropDownList ID="DropDownList1" runat="server">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <th>
             产品型号 :
            </th>
            <td>
                <asp:TextBox ID="txtModel" runat="server" Style="width: 61%"></asp:TextBox>
               
            </td>
        </tr>
      
        <tr>
            <th>
                图片<%--(最佳尺寸:宽:344px;高:198px;)--%>
            </th>
            <td>
                <BinCoder:UploadTools ID="CtrlBpic" runat="server" Action="doubleThumbnail" FilePath="../Attachs/Pic/"
                 DoubleThumbnailSize
="210*160|700*420"   TxtID="txtFileName1" ImgPruId="imgbpic">
                </BinCoder:UploadTools>
                <img src="" id="imgbpic" alt="" />
            </td>
        </tr>
      
         <tr>
            <th>
              点击量:
            </th>
            <td>
                <asp:TextBox ID="TextBox1" runat="server" Text="0" Style="width: 61%" ReadOnly="True"></asp:TextBox>
              
            </td>
        </tr>
        <tr>
            <th>
              排序:
            </th>
            <td>
                <asp:TextBox ID="txtorder" runat="server" Text="0" Style="width: 61%" ></asp:TextBox>
              
            </td>
        </tr>
        <%--<tr>
            
<th>
                小图:(宽:125px;高:115px;)
            
</th>
            
<td>
               
<BinCoder:UploadTools ID="CtrlSpic" runat="server" Action="sourceFiles" FilePath="../Attachs/Pic/"
                    TxtID
="txtFileName2" ImgPruId="imgspic">
               
</BinCoder:UploadTools>
               
<img src="" id="imgspic" alt="" />
            
</td>
        
</tr>--%>
        <tr>
            <th>
                产品介绍:
            </th>
            <td>
                <BinCoder:FCKeditor ID="txtDetail" Width="87%" runat="server" />
            </td>
        </tr>
          <tr style="display:none;">
            <th>
                产品图片:
            </th>
            <td>
                <BinCoder:FCKeditor ID="FCKeditor1" Width="87%" runat="server" />
            </td>
        </tr>
          <tr>
            <th>
                产品参数:
            </th>
            <td>
                <BinCoder:FCKeditor ID="FCKeditor2" Width="87%" runat="server" />
            </td>
        </tr>
        <tr>
            <th>
                产品规格:
            </th>
            <td>
                <BinCoder:FCKeditor ID="FCKeditor3" Width="87%" runat="server" />
            </td>
        </tr>
      
            <tr>
            <th>
                添加时间:
            </th>
            <td>
                <asp:TextBox ID="txtAddTime" runat="server" Style="width: 61%" CssClass="txt_calendar"></asp:TextBox>
            </td>
        </tr>
      
        <tr>
            <th style="width: 10%">
                是否推荐首页:
            </th>
            <td>
                <asp:CheckBox ID="chkIsHot" runat="server" />
            </td>
        </tr>
      
    </table>
    <table width="100%" cellpadding="0" cellspacing="0" class="formitem_pagestyle">
        <tr>
            <td class="pagebutton">
                <asp:Button ID="btnEdit" runat="server" Text="提 交" OnClick="btnEdit_Click"></asp:Button>
                <input id="btnBack" class="btnblue" onclick="javascript:history.back()" type="button"
                    value
="返回" />
            </td>
        </tr>
    </table>
</asp:Content>




[ 本帖最后由 liyan0102034 于 2012-10-29 21:02 编辑 ]
4 回复
#2
hu9jj2012-10-29 21:02
会不会是文件路径出了问题。
#3
liyan01020342012-10-29 21:04
是点本地图片然后上传到服务器的。可是一直显不了本地地址
#4
liyan01020342012-10-29 21:05
出现这样的错误代码
程序代码:
Server Error in '/' Application.
--------------------------------------------------------------------------------

A generic error occurred in GDI+.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.

Source Error:


Line 55:                     break;
Line 56:                 case "DoubleThumbnail":
Line 57:                     CtrlTools.GDI.MakeThumbnail(SourceFiles, SPicFolder, int.Parse(BSThumbnailSize[0].Split('*')[0]), int.Parse(BSThumbnailSize[0].Split('*')[1]), "A");//小图
Line 58:                     CtrlTools.GDI.MakeThumbnail(SourceFiles, BPicFolder, int.Parse(BSThumbnailSize[1].Split('*')[0]), int.Parse(BSThumbnailSize[1].Split('*')[1]), "A");//大图
Line 59:                     _FileName = Config.GetByKey("SPicFolder") + _FileName;

 

Source File: f:\www\web\\wwwroot\Administrator\IOFile.aspx    Line: 57

Stack Trace:


[ExternalException (0x80004005): A generic error occurred in GDI+.]
   CtrlTools.GDI.MakeThumbnail(String originalImagePath, String thumbnailPath, Int32 width, Int32 height, String mode) in D:\MyProject\Toolsolution\CtrlTools\GDI.cs:140
   ASP.administrator_iofile_aspx.btnUpLoad_Click(Object sender, EventArgs e) in f:\www\web\\wwwroot\Administrator\IOFile.aspx:57
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565


 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3082; Version:2.0.50727.3082
1