程序调试的时候正常
单身发布后,点一个连接的时候 连接的那个页面出现的错误。
url: http://localhost/Single.aspx?age=""&sex=""&city=""&keyword=""下面是错误提示
编译错误 
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误信息: CS0030: 无法将类型“ASP.single_aspx”转换为“float”源错误: 行 126:        public single_aspx() {
行 127:            string[] dependencies;
行 128:            ((Single)(this)).AppRelativeVirtualPath = "~/Single.aspx";
行 129:            if ((global::ASP.single_aspx.@__initialized == false)) {
行 130:                global::ASP.single_aspx.@__stringResource = this.ReadStringResource();
 源文件: c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\13ddd3f9\de571d52\App_Web_single.aspx.cdcab7d2.iw8b-tbo.0.cs    行: 128 
 

解决方案 »

  1.   

    无法转换类型.debug到出错的行查查看哪个变量类型不对
      

  2.   

    为什么在程序调试的时候 不出现错误呢 你说的是应该是 url传值的某个值 有问题么?
      

  3.   

    你的.net框架有问题,重装下框架和IIS,再试试
      

  4.   

    你看看·是不是传值有没有中文··我前几天也遇到过··不行的话·是重新装下IIS
    在Vs的命令提示符下:
    输入:aspnet_regiis -i
      

  5.   

    有中文值 。我代码
     SqlHelper helper = new SqlHelper();
        string _sql = string.Empty;
        protected void Page_Load(object sender, EventArgs e)
        {
            string _city = string.Empty;
            string _key = string.Empty;
            string _sex = string.Empty;
            string _age = string.Empty;
            string _conditionsql = string.Empty;
          string _countsql = string.Empty;
            _city=Request.QueryString["city"].ToString();
            _sex = Request.QueryString["sex"].ToString();
            _age = Request.QueryString["age"].ToString();
            _key = Request.QueryString["keyword"].ToString();
            _city = string.IsNullOrEmpty(_city) ? "" : Uri.UnescapeDataString(_city);//关键字
            _key = string.IsNullOrEmpty(_key) ? "" : Uri.UnescapeDataString(_key);//关键字
             //对搜索进行筛选
            if (!string.IsNullOrEmpty(_city) & _city !="")
            {
                _conditionsql = "where UserHotFlag=1 and UserFrom '%" + _city + "%'";
            }
            else
            {
                _conditionsql = "where UserHotFlag=1 ";
            }
            if (!string.IsNullOrEmpty(_sex) &&_sex !="")
            {
                _conditionsql += " and UserSex=" + _sex;
            }
            else
            {
                _conditionsql += "";
            }
            if (!string.IsNullOrEmpty(_age) && _age!="")
            {
                if (_age == "0")
                {
                    _conditionsql += "";
                }
                else if (_age == "1")
                {
                    _conditionsql += "and UserAge<=20 ";
                }
                else if (_age == "2")
                {
                    _conditionsql += "and UserAge between 20 and 35 ";
                }
                else
                {
                    _conditionsql += "and UserAge>=35 ";
                }
            }
            else
            {
                _conditionsql += "";
            }
            if (!string.IsNullOrEmpty(_key) && _key !="")
            {
                _conditionsql += "and UserSign like '%" + _key + "%'";
            }
            else
            {
                _conditionsql += " ";
            } 
            _sql = "select * from SinglePass_base "+_conditionsql;
            _countsql = "select count(*) from SinglePass_base " + _conditionsql;
            if (!IsPostBack)
            {
                AspNetPager1.RecordCount=(int)Socut.Data.ExecuteScalar(_countsql);
            }
        }
      

  6.   

    我觉得是参数有问题,是不是有了多余的"&"
      

  7.   

    url:http://localhost/Single.aspx?age=""&sex=""&city=""&keyword=""
    没有多。其他的页面在IIS里面正常 就点连接到这个的时候出错了。但是在vs自带的IIS的运行是正常的。
    发布后放到IIS中就 出现这样的问题。出错的代码是 内部窗体代码。原因不知道,请各位指教啊
      

  8.   

    url:http://localhost/Single.aspx?age=&sex=&city=&keyword=
    这样是表示空,没有"",不知道你""这个是啥意思
      

  9.   

    最开始 是这样的。
    http://localhost/Single.aspx?age=""&sex=""&city=""&keyword="" 因为这样不行  才换的。
      

  10.   

    知道了,是你的Sql字串的问题了,你打印出_conditionsql就能得到答案了,找到ASP.single_aspx,慢慢分析
      

  11.   

      ASP.single_aspx是窗体内部代码。在程序调试的时候似乎通过的。就是发布以后出的错误。我是想有没其他的引发这个错误。我开始发上的sql语句,是有个错误。问题是他提示的不是这个错误。是提示内部的代码错误。代码是看不到的。
    就这点比较郁闷 不晓得 怎么去调试。
      

  12.   

    编译警告:编译器警告消息:
    警告: CS0108: “ASP.single_aspx.Profile”隐藏了继承的成员“Single.Profile”。如果是有意隐藏,请使用关键字 new。
    源错误:c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\web_dna\4c42edf0\4535112f\App_Web_single.aspx.cdcab7d2.bifcejuh.0.cs  
    行 140:        }
    行 141:        
    行 142:        protected System.Web.Profile.DefaultProfile Profile {
    行 143:            get {
    行 144:                return ((System.Web.Profile.DefaultProfile)(this.Context.Profile));
     警告: CS0108: “ASP.single_aspx.ApplicationInstance”隐藏了继承的成员“Single.ApplicationInstance”。如果是有意隐藏,请使用关键字 new
      

  13.   

    哈哈。自己解决了。
      页面产生冲突了,
    继承Single.aspx的时候冲突了。
      
      

  14.   

     ((Single)(this)).AppRelativeVirtualPath = "~/Single.aspx"; 
    你的字符串怎么会转换成 single 呢 ???晕