是不是iis有问题,蹊跷

还是江筱吧 2011-03-10 09:47:47
问题描述:网站主题分成两部分,一部分应用vs2005(vb.net客户端回调技术),一部分应用vs2008(c#.net +scriptmanager+updatepanel),在局域网内建立站点后,(应用服务器win server2003+iis6),客户端访问经常会出现ie不响应的状况(点下按钮之后,ie没有任何反应,服务器处理结果不会返回,),刷新几次页面之后会好点,不是一直不响应,只是偶尔,但是只是应用vs2005客户端回调 做的那些页面存在这个问题,vs2008 下的那些页面工作正常 ,

测试情况:本地ie登陆网站的话,情况如上所述,但是应用vs调试模式下运行,情况又都正常了。

猜测: 是不是iis需要那些配置工作没有做,还是应用服务器?

提醒:虽然客户端回调技术已经过时了,这个而我知道,但是领导定了 我也没办法,这个问题在回帖时就不要讨论了。
...全文
99 22 打赏 收藏 转发到动态 举报
写回复
用AI写文章
22 条回复
切换为时间正序
请发表友善的回复…
发表回复
还是江筱吧 2011-03-25
  • 打赏
  • 举报
回复
TX们 ,结贴了,虽然没有彻底解决。还得说一声:wed下的压力可不是闹得,iis的确是个鸟东西
还是江筱吧 2011-03-22
  • 打赏
  • 举报
回复
站点分开之后,情况明显好转
还是江筱吧 2011-03-17
  • 打赏
  • 举报
回复
[Quote=引用 16 楼 theforever 的回复:]
代码很多,事前对处理逻辑不了解,看起来也很困难。
只能说唯一再检查一下程序的方法就是把收到后进行处理的代码注释,服务端那面也简化一下,其它代码都注释掉,只输出个测试串即可,接收端
function ReceiveServerData(rValue) {
alert(rValue);
/*
后面的处理代码
*/
象这样最简化的方式测试一下。包括在其它可疑的地方。
如果最简化的方式都走……
[/Quote]
因为系统已经上线,这样测试不太可能,单独测试有没有真实环境的压力
julian 2011-03-17
  • 打赏
  • 举报
回复
是的
[Quote=引用 1 楼 fengyarongaa 的回复:]
应当不会是服务器的问题
如果是服务器的问题
哪怕是一点的堵塞也会无法响应
检查程序 和 配置
[/Quote]
还是江筱吧 2011-03-16
  • 打赏
  • 举报
回复
同志们,有一个重要情况没有说明,
我的iisweb服务器在虚拟服务集群当中,应用vmware做的虚拟集群,主机是esx4.3 做web服务器的虚拟机装的是32为的03server,会不会是虚拟化的问题。
我查阅资料发现虚拟化iis后大多会有安全问题,容错和负载均衡、资源利用问题,都和我的问题不相关呀,顶多就是资源利用预分配问题。有啥想法?
fszd2010 2011-03-14
  • 打赏
  • 举报
回复
还行吧
  • 打赏
  • 举报
回复
代码很多,事前对处理逻辑不了解,看起来也很困难。
只能说唯一再检查一下程序的方法就是把收到后进行处理的代码注释,服务端那面也简化一下,其它代码都注释掉,只输出个测试串即可,接收端
function ReceiveServerData(rValue) {
alert(rValue);
/*
后面的处理代码
*/
象这样最简化的方式测试一下。包括在其它可疑的地方。
如果最简化的方式都走不通,再重点关注配置问题。
还是江筱吧 2011-03-13
  • 打赏
  • 举报
回复
其实iis做web服务器,还是需要优化配置的,并不是安装站点就行,对于大量访问的站点,建议到微软的官网去看看,有很多资料
http://www.iis.net/
还是江筱吧 2011-03-13
  • 打赏
  • 举报
回复
代码存在问题的可能性不大,vs2005 中atlas项目,有公用的回调框架和说明,都是公开的,但是回调时的数据量不小。
还是江筱吧 2011-03-13
  • 打赏
  • 举报
回复
实际上问题基本可以定位到 session丢失,但是我查看httperr.LOG 显示timer_connetionidle 很多链接都是闲置的,我就奇怪我的那些session哪去啦?昨天把两站点分开了,安装了不同点的framework,并且对iis做了优化,更改了session的存储模式为stateserver。就看周一的运行状况了。

不过有点资料还是很有用的,在微软官网上,有一段警告:
http://msdn.microsoft.com/zh-cn/library/ms178586(v=vs.80).aspx
如果您通过在应用程序的 Web.config 文件的 processModel 元素中将 webGarden 属性设置为 true,从而启用网络园模式,请不要使用 InProc 会话状态模式。如果使用此模式,则在同一会话的不同请求由不同的辅助进程进行处理时,可能会发生数据丢失。


提示 web园模式和进程内会话管理可能导致数据丢失,我没找到我哪里设置了web园。但是数据的确是没有回调,尤其是压力打的时候,丢的厉害,基本不能正常使用,平时没事。

目前来看 原因基本就是这个。
winteredchengxu 2011-03-12
  • 打赏
  • 举报
回复
这个问题我也搞不明白,是服务器问题还是代码错误?
还是江筱吧 2011-03-11
  • 打赏
  • 举报
回复


if (trowid >=0 && tcolid == -1) {
if (trowid < o.rows.length - ftrows ) {
cols = vals[1].split("\t");
var r = trowid + hdrows;
for (var c = 0; c < Math.min(o.rows[r].cells.length, cols.length); c++) {
WriteCell(o.rows[r].cells[c],cols[c],o.dataFld);
}
} continue ;
}
if (trowid ==-1 && tcolid == -1) {
rows = vals[1].split("\n");
for (var r = hdrows; r < Math.min(o.rows.length - ftrows, rows.length + hdrows); r++) {
cols = rows[r - hdrows].split("\t");
for (var c = 0; c < Math.min(o.rows[r].cells.length, cols.length); c++) {
WriteCell(o.rows[r].cells[c],cols[c],o.dataFld);
}
}
var modirows = r;
for (var r = modirows; r < o.rows.length - ftrows; r++) {
for (var c = 0; c < o.rows[r].cells.length; c++) {
ClearCell(o.rows[r].cells[c]);
}
} continue ;
}
}
if (vals[0] == "_cellbgcolor") {
rows = vals[1].split("\n");
for (var r = hdrows; r < Math.min(o.rows.length - ftrows, rows.length + hdrows); r++) {
cols = rows[r - hdrows].split("\t");
for (var c = 0; c < Math.min(o.rows[r].cells.length, cols.length); c++) {
if (cols[c] =="" ) { continue;}
if (o.rows[r].cells[c].childNodes.length < 2) { o.rows[r].cells[c].style.backgroundColor = cols[c]; continue; }
oo = o.rows[r].cells[c].childNodes[0];
if (oo.id == undefined) { oo = o.rows[r].cells[c].childNodes[1]; }
if (oo.tagName == "SPAN") {oo.style.backgroundColor = cols[c];}
}
}
}
// Update Footer Row in Table
if (vals[0] == "_footrow") {
cols = vals[1].split("\t");
var r = o.rows.length -1 ;
for (var c = 0; c < Math.min(o.rows[r].cells.length, cols.length); c++) {
WriteCell(o.rows[r].cells[c],cols[c],o.dataFld);
} continue;
}
// Update ForeColor
if (vals[0] == "_color") {
if (type == "table") {
if (trowid >=0 && trowid < o.rows.length - ftrows && tcolid == -1 ) {
var r = trowid + hdrows;
for (var c = 0; c < o.rows[r].cells.length; c++) {
if (o.rows[r].cells[c].childNodes.length < 2) { o.rows[r].cells[c].style.color = vals[1]; continue; }
oo = o.rows[r].cells[c].childNodes[0];
if (oo.id == undefined) { oo = o.rows[r].cells[c].childNodes[1]; }
oo.style.color = vals[1];
}
} continue;
}
o.style.color = vals[1]; if (oo != null) { oo.style.color = vals[1]; }
if (type == "panel") {
for (var r = 0; r < o.children.length * 2; r++) {
if (o.childNodes[r].id == null) { continue; }
o.childNodes[r].style.color = vals[1];
}
} continue;
}
// Update BackColor
if (vals[0] == "_bgcolor") {
if (type == "table") {
if (trowid >=0 && trowid < o.rows.length - ftrows && tcolid == -1 ) {
var r = trowid + hdrows;
for (var c = 0 ; c < o.rows[r].cells.length ; c++) {
if (o.rows[r].cells[c].childNodes.length < 2) { o.rows[r].cells[c].style.backgroundColor = vals[1]; continue; }
oo = o.rows[r].cells[c].childNodes[0];
if (oo.id == undefined) { oo = o.rows[r].cells[c].childNodes[1]; }
oo.style.backgroundColor = vals[1];
}
} continue;
}
o.style.backgroundColor = vals[1]; if (oo != null) { oo.style.backgroundColor = vals[1]; }
if (type == "panel") {
for (var r = 0; r < o.children.length * 2; r++) {
if (o.childNodes[r].id == null) { continue; }
o.childNodes[r].style.backgroundColor = vals[1];
}
} continue;
}
// Update Disabled
if (vals[0] == "_disabled") {
if (type == "table") {
o.dataFld = vals[1];
for (var r = hdrows; r < o.rows.length - ftrows; r++) {
for (var c = 0; c < o.rows[r].cells.length; c++) {
if (o.rows[r].cells[c].childNodes.length < 2) { continue; }
oo = o.rows[r].cells[c].childNodes[0];
if (oo.id == undefined) { oo = o.rows[r].cells[c].childNodes[1]; }
if (oo.style.display != "none") {oo.disabled = parseInt(vals[1]);}
还是江筱吧 2011-03-11
  • 打赏
  • 举报
回复

//get data from server
function ReceiveServerData(rValue) {
var opts = new Array();
var vals = new Array();
var rows = new Array();
var cols = new Array();
var o = null;
var oo = null;
var type;
var trowid = -1;
var tcolid = -1;
var addnum = 0;
var ftrows = 0;
var hdrows = 0;
var doc = null;
var tab = null;
var conid = "" ;

//new
var Ip1 ="";
var Ip2 ="";
var Ip3 ="";
var Ip4 ="";
cols =LODOP.GET_SYSTEM_INFO("NetworkAdapter.1.IPAddress").split(".");
Ip1=cols[0];
Ip2=cols[1];
Ip3=cols[2];
Ip4=cols[3];
// end new

if (evtid != "") {
var eo = document.getElementById(evtid);
eo.disabled = false;
}
opts = rValue.split("\f");
for (var i = 0; i < opts.length; i++) {
vals = opts[i].split("=");
// Get ID of object
if (vals[0] == "_id") {
o = document.getElementById(vals[1]);
oo = null;
trowid =-1;tcolid =-1;addnum =1;ftrows=0;hdrows=0;conid = ""; continue; ;
}
if (o == null || o.id == null) { continue; }
// Get TYPE of object
if (vals[0] == "_type") {
type = vals[1];
// Get header rows in Table
if (type == "table") {
hdrows = 0;
for (var r = 0; r < o.rows.length; r++) {
if (o.rows[r].cells[0].tagName == "TH") { hdrows = hdrows + 1; } else {break;}
}
}
if (type == "check" || type == "radio") { oo = o.nextSibling; } continue;
}
// Update Text
if (vals[0] == "_text") {
if (type == "text" || type == "button") { o.value = vals[1]; }
if (type == "label") { o.innerText = vals[1]; }
if (oo != null) { oo.innerText = vals[1]; } continue;
}
// Update Checked
if (vals[0] == "_checked") { o.checked = parseInt(vals[1]); continue; }
// Update Allow modify
if (vals[0] == "_modify") { o.title = "Allow_Modify"; continue; }
// Update container
if (vals[0] == "_container") {conid = vals[1];continue;}
// Update set of Options
if (vals[0] == "_options") {
if (conid != "" && type == "ddlist") {
var ddlid = o.id.substring( conid.length + 7);
for (var c =102; c < 200; c++) {
var strid = conid + "_ctl" + c.toString().substring(1) + "_" + ddlid;
oo = document.getElementById(strid);
if (oo == null) { break ;}
if (vals[1] == "") {
for (var r = oo.options.length - 1; r >= 0; r--) { oo.options.remove(r); }
}
else {
rows = vals[1].split("\n");
for (var r = 0; r < rows.length; r++) {
cols = rows[r].split("\t");
var newopt = document.createElement("OPTION");
newopt.text = cols[0];
newopt.value = cols[1];
oo.options.add(newopt);
}
}

} continue;
}
if (type == "list" || type == "ddlist") {
if ( type == "ddlist" ) {o.datatextfield = "";}
if ( vals[1] == "") {
for (var r = o.options.length - 1; r >= 0; r--) { o.options.remove(r); }
}
else {
rows = vals[1].split("\n");
for (var r = 0; r < rows.length; r++) {
cols = rows[r].split("\t");
var newopt = document.createElement("OPTION");
newopt.text = cols[0];
newopt.value = cols[1];
o.options.add(newopt);
}
} continue;
}
if (type == "radiolist" || type == "checklist") {
rows = vals[1].split("\n");
for (var r = 0; r < o.cells.length; r++) {
if (r < rows.length) {
cols = rows[r].split("\t");
o.cells(r).style.display = "";
o.cells[r].childNodes[1].innerText = cols[0];
o.cells[r].childNodes[0].value = cols[1];
o.cells[r].childNodes[0].checked = false;
} else { o.cells(r).style.display = "none"; }
} continue;
}
}
// Update SelectedValue
if (vals[0] == "_selvalue") {
if (type == "list" || type == "ddlist") { o.value = vals[1]; }
if (type == "radiolist") {
for (var r = 0; r < o.cells.length; r++) {
o.cells[r].childNodes[0].checked = false;
if (o.cells[r].childNodes[0].value == vals[1]) { o.cells[r].childNodes[0].checked = true; }
}
} continue;
}
// Update set of Selecteds
if (vals[0] == "_selects") {
rows = vals[1].split("\n");
for (var r = 0; r < Math.min(rows.length, o.cells.length); r++) {
o.cells[r].childNodes[0].checked = parseInt(rows[r]);
} continue;
}
// Update ImageUrl
if (vals[0] == "_src") { o.src = vals[1]; }
// Get footer rows in Table
if (vals[0] == "_footer") {
ftrows = parseInt(vals[1]);
}
// Clear cells in Table
if (vals[0] == "_clearcell") {
for (var r = hdrows; r < o.rows.length - ftrows; r++) {
for (var c = 0; c < o.rows[r].cells.length; c++) {
ClearCell(o.rows[r].cells[c]);
}
} continue;
}
// Get rowindex,colindex
if (vals[0] == "_row") { trowid = parseInt(vals[1]); }
if (vals[0] == "_col") { tcolid = parseInt(vals[1]); }
// Update cells in table
if (vals[0] == "_cells") {
if (o.dataFld == "") {if (o.disabled==false){o.dataFld="0";}else{o.dataFld="1";}}
if (trowid >=0 && tcolid >= 0) {
if (trowid < o.rows.length - ftrows ) {
if (tcolid < o.rows[trowid].cells.length ) {
var r = trowid + hdrows ;
var c = tcolid;
WriteCell(o.rows[r].cells[c],vals[1],o.dataFld);
}

} continue ;
}

还是江筱吧 2011-03-11
  • 打赏
  • 举报
回复
以下是js的代码,是回发函数,另一个处理回调另外发上来

// 发送客户端控件属性到服务器
function toServer() {
var vid = null;
var eo = window.event.srcElement;
eo.disabled = true;
evtid = eo.id;
vid = evtid;
if (eo.parentElement.tagName == "TD" ) {
var mypart = new Array();
// mypart = eo.name.split("$");
mypart = eo.id.split("_");
srcTabID = mypart[0];
srcTabRow = mypart[1].substring(3) - 2;
vid = mypart[2];
}
var val = "_eventsrc=" + vid;
if (eo.tagName == "IMG") {
val = val + "\f_id=" + vid + "\f_type=image" + "\f_currx=" + window.event.offsetX + "\f_curry=" + window.event.offsetY;
}
//获取 INPUT 类的控件属性
var os = document.getElementsByTagName("INPUT");
for (var i = 0; i < os.length; i++) {
var o = os[i];
if (o.parentElement.tagName == "TD") { continue; }
if (o.id != null) { vid = o.id; }
if (o.type == "text") { val = val + "\f_id=" + vid + "\f_type=text" + "\f_text=" + o.value; continue; }
if (o.type == "checkbox") { val = val + "\f_id=" + vid + "\f_type=check" + "\f_checked=" + o.checked; continue; }
if (o.type == "radio") { val = val + "\f_id=" + vid + "\f_type=radio" + "\f_checked=" + o.checked; }
}
//获取 SELECT 类的控件属性
var os = document.getElementsByTagName("SELECT");
for (var i = 0; i < os.length; i++) {
var o = os[i];
if (o.parentElement.tagName == "TD") { continue; }
if (o.id != null) { vid = o.id; }
if (o.type == "select-one") {
val = val + "\f_id=" + vid;
if (o.size == 0) { val = val + "\f_type=ddlist"; } else { val = val + "\f_type=list"; }
var selid = o.selectedIndex;
if (selid == -1) { val = val + "\f_seltext=\f_selvalue="; }
else { val = val + "\f_seltext=" + o.options[selid].text + "\f_selvalue=" + o.options[selid].value; }
}
}
//获取容器为 TABLE 类的控件属性
var os = document.getElementsByTagName("TABLE");
for (var i = 0; i < os.length; i++) {
var o = os[i];
if (o.id != null) { vid = o.id; }
val = val + "\f_id=" + vid;
if (o.cells.length == o.rows.length || o.rows.length == 1) {
if (o.cells[0].childNodes[0].type == "checkbox") {
val = val + "\f_type=checklist" + "\f_selects=";
for (var j = 0; j < o.cells.length; j++) {
if (j > 0) { val = val + "\n"; }
val = val + o.cells[j].childNodes[0].checked;
}
continue;
}
if (o.cells[0].childNodes[0].type == "radio") {
val = val + "\f_type=radiolist";
for (var j = 0; j < o.cells.length; j++) {
var oo = o.cells[j].childNodes[0];
if (oo.checked) { val = val + "\f_seltext=" + o.cells[j].innerText + "\f_selvalue=" + oo.value; break; }
}
continue;
}
}
//获取 TABLE 类的控件属性
val = val + "\f_type=table";
val = val + "\f_top=" + o.offsetParent.scrollTop;
if (vid == srcTabID) { val = val + "\f_row=" + srcTabRow ;}
val = val + "\f_cells=";
for (var j = 0; j < o.rows.length; j++) {
if (o.rows[j].cells[0].tagName != "TD") { continue; }
for (var k = 0; k < o.rows[j].cells.length; k++) {
if (k > 0) { val = val + "\t"; }
if (o.rows[j].cells[k].childNodes.length ==0 || (o.rows[j].cells[k].childNodes.length ==1 && o.rows[j].cells[k].childNodes[0].id==undefined)) { continue; } //{val = val + o.rows[j].cells[k].innerText; continue;}
var oo = o.rows[j].cells[k].childNodes[0];
if (oo.id == undefined) { oo = o.rows[j].cells[k].childNodes[1]; }
if (oo.type == "text") { val = val + oo.value; continue; }
if (oo.type == "select-one") { val = val + oo.value; continue; }
if (oo.type == "checkbox") { val = val + oo.checked; continue; }
if (oo.type == "radio") { val = val + oo.checked; continue; }
if (oo.tagName == "SPAN") { val = val + oo.innerText }
}
if (j < o.rows.length - 1) { val = val + "\n"; }
}
}
//发送属性字符串
//document.getElementById("lblFootMsg").innerText = val;
CallServer(val, "");
}

还是江筱吧 2011-03-10
  • 打赏
  • 举报
回复
和多用户并发访问肯定是有关系,但是同样的并发环境下,应用scriptmanager的就没事(只是反应稍微延时一点,影响不大),客户端回调的就完全不行了,一点反应都不该,甚至都不知道是请求没有发送到服务器端,还是客户端没有收到回调结果。
问题基本锁定 回调技术和iis的配置,程序看了,通用的框架,有问题的可能性比较小,下午在找人看看吧

现在关键是应用这个回调技术的基本寥寥无几(其实早就过时了),
还是江筱吧 2011-03-10
  • 打赏
  • 举报
回复
收的各位的建议,我看看程序先
  • 打赏
  • 举报
回复
网站的,可能因多用户同时并发请求导致反应延缓。和你的程序架构(你提的那个客户端回调就很值得怀疑,是否有其它因素,具体情况只有你了解)和某段具体的代码都可能有关系。

总之先好好检查一下程序。
还是江筱吧 2011-03-10
  • 打赏
  • 举报
回复
我觉得需要补充描述一下,我这里的客户端回调是这样工作的(不是我做的,只是看了一下流程):
每次回发前,客户端js会对页面上的主要控件(好像只有九种)进行序列化(制定格式编码,)回发到服务器端,处理后将结果发回客户端,客户端不响应是一般都是页面内容较多的时候,与这个回传字符串有关系否?

以前没遇到过,一切都只是猜测
还是江筱吧 2011-03-10
  • 打赏
  • 举报
回复
我还以是客户端回调那个烂架构弄得,可有不敢说。vs2008下的站都没问题,唯独vs2005的下的就不行,但是本地应用 vs浏览为什么就都行了? vs不是自带的一个iis嘛? 这个 怎么解释?
ycproc 2011-03-10
  • 打赏
  • 举报
回复
应当不会是服务器的问题
如果是服务器的问题
哪怕是一点的堵塞也会无法响应
检查程序 和 配置
加载更多回复(2)

8,327

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 IIS
社区管理员
  • IIS
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧