程序调试的时候正常
单身发布后,点一个连接的时候 连接的那个页面出现的错误。
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
单身发布后,点一个连接的时候 连接的那个页面出现的错误。
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
在Vs的命令提示符下:
输入:aspnet_regiis -i
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);
}
}
没有多。其他的页面在IIS里面正常 就点连接到这个的时候出错了。但是在vs自带的IIS的运行是正常的。
发布后放到IIS中就 出现这样的问题。出错的代码是 内部窗体代码。原因不知道,请各位指教啊
这样是表示空,没有"",不知道你""这个是啥意思
http://localhost/Single.aspx?age=""&sex=""&city=""&keyword="" 因为这样不行 才换的。
就这点比较郁闷 不晓得 怎么去调试。
警告: 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
页面产生冲突了,
继承Single.aspx的时候冲突了。
你的字符串怎么会转换成 single 呢 ???晕