IIS不能发布asp.net 应用程序
2009-08-21 20:01
267 查看
IIS不能发布asp.net 应用程序
最近在写程序的时候,突然项目经理想发布一下网站看一下做的效果当我发布的时候遇到 下面的错误:
:使用 XSL 样式表无法查看 XML 输入。请更正错误然后单击 刷新按钮,或以后重试。 名称以无效字符开头
的解决办法是打开 vs2005 命令运行窗口输入:aspnet_regiis.exe /i,就ok了。
var commentAuthorHasChecked = false;
var commentAuthorIsValid = false;
var commentUrlIsValid = true;
var commentEmailIsValid = true;
var authenCodeHasChecked = false;
var authenCodeIsValid = true;
function PostComment() {
var isValid = true;
if($("#wrapAuthenCode").css("display")=="none"){
ShowAuthenCode();
$("#tip_AuthenCode").css("color","red");
$("#tip_AuthenCode").html("请输入验证码!");
isValid = false;
}
if(!commentAuthorHasChecked){
CheckAuthor();
}
if(!commentAuthorIsValid){
isValid = false;
}
if(!authenCodeHasChecked){
CheckAuthenCode();
}
if(!authenCodeIsValid){
isValid = false;
}
if(!commentUrlIsValid){
isValid = false;
}
if(!commentEmailIsValid){
isValid = false;
}
if(!CheckCommentContent()){
isValid = false;
}
if(!isValid){
return;
}
var content = $("#tbCommentBody").val();
if(content.length>2000){
alert("评论内容过长!不允许发布!");
return;
}
if ($("#span_comment_posted").html()!='' && $("#span_comment_posted").html()==content){
alert("该评论已发表过!");
return;
}
$("#tip_comment").html("评论提交中...");
$("#span_comment_posted").html(content);
//content = content.replace("'", "\\'");
var email = $("#tbCommentEmail").val();
var authenNum = $("#tbAuthenCode").val();
var authenId = $("#span_comment_test").html();
var comment = {};
comment.authenNum = authenNum;
comment.authenId= authenId;
comment.parentId = 1308601;
comment.blogId = 37082;
comment.sourceUrl = 'http://www.cnblogs.com/hooei/archive/2008/10/11/1308601.html';
comment.author = $("#tbCommentAuthor").val();
comment.url = $("#tbCommentAuthorUrl").val();
comment.authenCode = $("#tbAuthenCode").val();
comment.email = email;
comment.title = '使用 XSL 样式表无法查看 XML 输入。请更正错误然后单击 刷新按钮,或以后重试。 ';
comment.content = content;
comment.parentCommentId = $("#span_parentcomment_id").html();
$.ajax({
url: '/ws/CommentService.asmx/AddAnonymousComment',
data: $.toJSON(comment),
type: "post",
dataType: "json",
contentType: "application/json; charset=utf8",
success: function(data) {
if (data.d["IsSuccess"]) {
ShowCommentMsg("感谢您的回复:)");
//RereshComments2(comment.parentId);
$("#tbCommentBody").val('');
//$("#divCommentShow").html(data.d["ReturnData"]+content.replace(/\n/g,"
")+"
");
$("#divCommentShow").html($("#divCommentShow").html()+data.d["ReturnData"]);
$("#tip_AuthenCode").html('');
RefreshAuthenCode();
$("#tbAuthenCode").val("");
CommentNotify(data.d["CommentID"]);
}
else {
ShowCommentMsg(data.d["ReturnData"]);//"抱歉!评论提交失败!请与管理员联系。");
$("#span_comment_posted").html('');
}
},
error: function(xhr) {
ShowCommentMsg("抱歉!评论提交失败!请与管理员联系。");
$("#span_comment_posted").html('');
//alert(xhr.responseText);
}
}
);
}
function RefreshAuthenCode(){
AjaxPost("/ws/CommentService.asmx/RefreshAuthenCode","{}",RefreshImg);
$("#lnkRereshAuthenCode").html("刷新中...");
return false;
}
function RefreshImg(response){
$("#imgAuthenCode").attr("src","/Modules/CaptchaImage/ValidCodeImage.aspx?id="+encodeURIComponent(response));
$("#span_comment_test").html(response);
$("#lnkRereshAuthenCode").html("看不清,换一个");
}
function ShowAuthenCode(){
//if($("#wrapAuthenCode").css("display")=="none"){
// AjaxPost("/ws/CommentService.asmx/RefreshAuthenCode","{}",ShowAuthenCodeOk);
//}
$("#wrapAuthenCode").show();
}
function ShowAuthenCodeOk(response){
UpdateAuthenCode();
$("#tbAuthenCode").val("");
$("#wrapAuthenCode").show();
$("#tip_AuthenCode").html('');
}
function CheckAuthor(isOnblur){
commentAuthorHasChecked = true;
var maxLength = 30;
if($("#tbCommentAuthor").val().length == 0){
$("#tip_author").html("请输入您的昵称!");
commentAuthorIsValid = false;
return false;
}
else if($("#tbCommentAuthor").val().length > maxLength){
$("#tip_author").html("昵称不允许超过" + maxLength + "个字符!");
commentAuthorIsValid = false;
return false;
}
else{
//if(isOnblur){
AjaxPost("/ws/CommentService.asmx/IsAuthorExist","{author:'"+$("#tbCommentAuthor").val()+"'}" ,OnCheckAuthorExist);
//}
//else{
// $("#tip_author").html("");
// commentAuthorIsValid = true;
//}
return true;
}
}
function OnCheckAuthorExist(response){
if(!response){
$("#tip_author").html("");
commentAuthorIsValid = true;
}
else{
$("#tip_author").html("该昵称已被使用,请更换昵称");
commentAuthorIsValid = false;
}
}
function CheckUrl(){
var maxLength = 50;
var url = $("#tbCommentAuthorUrl").val();
if(url.length == 0){
commentUrlIsValid = true;
return true;
}
else if(url.length > maxLength){
$("#tip_url").html("主页地址不允许超过" + maxLength + "个字符!");
commentUrlIsValid = false;
return false;
}
else if(url.indexOf("http://")!=0 || url.indexOf(".") < 0){
$("#tip_url").html("主页地址要以“http://”开头");
commentUrlIsValid = false;
return false;
}
else{
$("#tip_url").html("");
commentUrlIsValid = true;
return true;
}
}
function CheckEmail(){
var email = $("#tbCommentEmail").val();
if(email.length>0){
var regExp = new RegExp("\\w+@((\\w|\-)+\\.)+[a-z]{2,3}");
if(!regExp.test(email)){
$("#tip_email").html("请输入正确的邮件地址!");
commentEmailIsValid = false;
}
else{
commentEmailIsValid = true;
$("#tip_email").html("");
}
}
else{
commentEmailIsValid = true;
$("#tip_email").html("");
}
}
function CheckAuthenCode(){
authenCodeHasChecked = true;
var num = $("#tbAuthenCode").val();
var id = $("#span_comment_test").html();
$("#tip_AuthenCode").css("color","red");
if(num.length==0){
authenCodeIsValid = false;
$("#tip_AuthenCode").html("请输入验证码!");
return;
}
else if(num.length!=4){
authenCodeIsValid = false;
$("#tip_AuthenCode").html("请输入四位数字!");
return;
}
else if(new RegExp("(\d+)").test(num)){
authenCodeIsValid = false;
$("#tip_AuthenCode").html("请输入四位数字!");
return;
}
else{
AjaxPost("/ws/CommentService.asmx/CheckAuthenCode","{number:"+num+",id:'"+id+"'}", OnCheckAuthenCode);
}
}
function OnCheckAuthenCode(response){
if(response){
$("#tip_AuthenCode").css("color","green");
$("#tip_AuthenCode").html("验证码输入正确!");
authenCodeIsValid = true;
}
else{
$("#tip_AuthenCode").css("color","red");
$("#tip_AuthenCode").html("验证码输错啦!");
RefreshAuthenCode();
authenCodeIsValid = false;
}
}
function CheckCommentContent(){
if($("#tbCommentBody").val().length==0){
alert("请输入评论内容!");
return false;
}
return true;
}
try {
GS_googleAddAdSenseService("ca-pub-4210569241504288");
GS_googleEnableAllServices();
}
catch (e) { }
try {
GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_commentbox_up");
GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_blogpost_bottom");
GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_blogpost_bottom2");
}
catch (e) { }
try {
GA_googleFetchAds();
} catch (e) { }
刷新评论列表 刷新
最近在写程序的时候,突然项目经理想发布一下网站看一下做的效果当我发布的时候遇到 下面的错误:
:使用 XSL 样式表无法查看 XML 输入。请更正错误然后单击 刷新按钮,或以后重试。 名称以无效字符开头
的解决办法是打开 vs2005 命令运行窗口输入:aspnet_regiis.exe /i,就ok了。
var commentAuthorHasChecked = false;
var commentAuthorIsValid = false;
var commentUrlIsValid = true;
var commentEmailIsValid = true;
var authenCodeHasChecked = false;
var authenCodeIsValid = true;
function PostComment() {
var isValid = true;
if($("#wrapAuthenCode").css("display")=="none"){
ShowAuthenCode();
$("#tip_AuthenCode").css("color","red");
$("#tip_AuthenCode").html("请输入验证码!");
isValid = false;
}
if(!commentAuthorHasChecked){
CheckAuthor();
}
if(!commentAuthorIsValid){
isValid = false;
}
if(!authenCodeHasChecked){
CheckAuthenCode();
}
if(!authenCodeIsValid){
isValid = false;
}
if(!commentUrlIsValid){
isValid = false;
}
if(!commentEmailIsValid){
isValid = false;
}
if(!CheckCommentContent()){
isValid = false;
}
if(!isValid){
return;
}
var content = $("#tbCommentBody").val();
if(content.length>2000){
alert("评论内容过长!不允许发布!");
return;
}
if ($("#span_comment_posted").html()!='' && $("#span_comment_posted").html()==content){
alert("该评论已发表过!");
return;
}
$("#tip_comment").html("评论提交中...");
$("#span_comment_posted").html(content);
//content = content.replace("'", "\\'");
var email = $("#tbCommentEmail").val();
var authenNum = $("#tbAuthenCode").val();
var authenId = $("#span_comment_test").html();
var comment = {};
comment.authenNum = authenNum;
comment.authenId= authenId;
comment.parentId = 1308601;
comment.blogId = 37082;
comment.sourceUrl = 'http://www.cnblogs.com/hooei/archive/2008/10/11/1308601.html';
comment.author = $("#tbCommentAuthor").val();
comment.url = $("#tbCommentAuthorUrl").val();
comment.authenCode = $("#tbAuthenCode").val();
comment.email = email;
comment.title = '使用 XSL 样式表无法查看 XML 输入。请更正错误然后单击 刷新按钮,或以后重试。 ';
comment.content = content;
comment.parentCommentId = $("#span_parentcomment_id").html();
$.ajax({
url: '/ws/CommentService.asmx/AddAnonymousComment',
data: $.toJSON(comment),
type: "post",
dataType: "json",
contentType: "application/json; charset=utf8",
success: function(data) {
if (data.d["IsSuccess"]) {
ShowCommentMsg("感谢您的回复:)");
//RereshComments2(comment.parentId);
$("#tbCommentBody").val('');
//$("#divCommentShow").html(data.d["ReturnData"]+content.replace(/\n/g,"
")+"
");
$("#divCommentShow").html($("#divCommentShow").html()+data.d["ReturnData"]);
$("#tip_AuthenCode").html('');
RefreshAuthenCode();
$("#tbAuthenCode").val("");
CommentNotify(data.d["CommentID"]);
}
else {
ShowCommentMsg(data.d["ReturnData"]);//"抱歉!评论提交失败!请与管理员联系。");
$("#span_comment_posted").html('');
}
},
error: function(xhr) {
ShowCommentMsg("抱歉!评论提交失败!请与管理员联系。");
$("#span_comment_posted").html('');
//alert(xhr.responseText);
}
}
);
}
function RefreshAuthenCode(){
AjaxPost("/ws/CommentService.asmx/RefreshAuthenCode","{}",RefreshImg);
$("#lnkRereshAuthenCode").html("刷新中...");
return false;
}
function RefreshImg(response){
$("#imgAuthenCode").attr("src","/Modules/CaptchaImage/ValidCodeImage.aspx?id="+encodeURIComponent(response));
$("#span_comment_test").html(response);
$("#lnkRereshAuthenCode").html("看不清,换一个");
}
function ShowAuthenCode(){
//if($("#wrapAuthenCode").css("display")=="none"){
// AjaxPost("/ws/CommentService.asmx/RefreshAuthenCode","{}",ShowAuthenCodeOk);
//}
$("#wrapAuthenCode").show();
}
function ShowAuthenCodeOk(response){
UpdateAuthenCode();
$("#tbAuthenCode").val("");
$("#wrapAuthenCode").show();
$("#tip_AuthenCode").html('');
}
function CheckAuthor(isOnblur){
commentAuthorHasChecked = true;
var maxLength = 30;
if($("#tbCommentAuthor").val().length == 0){
$("#tip_author").html("请输入您的昵称!");
commentAuthorIsValid = false;
return false;
}
else if($("#tbCommentAuthor").val().length > maxLength){
$("#tip_author").html("昵称不允许超过" + maxLength + "个字符!");
commentAuthorIsValid = false;
return false;
}
else{
//if(isOnblur){
AjaxPost("/ws/CommentService.asmx/IsAuthorExist","{author:'"+$("#tbCommentAuthor").val()+"'}" ,OnCheckAuthorExist);
//}
//else{
// $("#tip_author").html("");
// commentAuthorIsValid = true;
//}
return true;
}
}
function OnCheckAuthorExist(response){
if(!response){
$("#tip_author").html("");
commentAuthorIsValid = true;
}
else{
$("#tip_author").html("该昵称已被使用,请更换昵称");
commentAuthorIsValid = false;
}
}
function CheckUrl(){
var maxLength = 50;
var url = $("#tbCommentAuthorUrl").val();
if(url.length == 0){
commentUrlIsValid = true;
return true;
}
else if(url.length > maxLength){
$("#tip_url").html("主页地址不允许超过" + maxLength + "个字符!");
commentUrlIsValid = false;
return false;
}
else if(url.indexOf("http://")!=0 || url.indexOf(".") < 0){
$("#tip_url").html("主页地址要以“http://”开头");
commentUrlIsValid = false;
return false;
}
else{
$("#tip_url").html("");
commentUrlIsValid = true;
return true;
}
}
function CheckEmail(){
var email = $("#tbCommentEmail").val();
if(email.length>0){
var regExp = new RegExp("\\w+@((\\w|\-)+\\.)+[a-z]{2,3}");
if(!regExp.test(email)){
$("#tip_email").html("请输入正确的邮件地址!");
commentEmailIsValid = false;
}
else{
commentEmailIsValid = true;
$("#tip_email").html("");
}
}
else{
commentEmailIsValid = true;
$("#tip_email").html("");
}
}
function CheckAuthenCode(){
authenCodeHasChecked = true;
var num = $("#tbAuthenCode").val();
var id = $("#span_comment_test").html();
$("#tip_AuthenCode").css("color","red");
if(num.length==0){
authenCodeIsValid = false;
$("#tip_AuthenCode").html("请输入验证码!");
return;
}
else if(num.length!=4){
authenCodeIsValid = false;
$("#tip_AuthenCode").html("请输入四位数字!");
return;
}
else if(new RegExp("(\d+)").test(num)){
authenCodeIsValid = false;
$("#tip_AuthenCode").html("请输入四位数字!");
return;
}
else{
AjaxPost("/ws/CommentService.asmx/CheckAuthenCode","{number:"+num+",id:'"+id+"'}", OnCheckAuthenCode);
}
}
function OnCheckAuthenCode(response){
if(response){
$("#tip_AuthenCode").css("color","green");
$("#tip_AuthenCode").html("验证码输入正确!");
authenCodeIsValid = true;
}
else{
$("#tip_AuthenCode").css("color","red");
$("#tip_AuthenCode").html("验证码输错啦!");
RefreshAuthenCode();
authenCodeIsValid = false;
}
}
function CheckCommentContent(){
if($("#tbCommentBody").val().length==0){
alert("请输入评论内容!");
return false;
}
return true;
}
try {
GS_googleAddAdSenseService("ca-pub-4210569241504288");
GS_googleEnableAllServices();
}
catch (e) { }
try {
GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_commentbox_up");
GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_blogpost_bottom");
GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_blogpost_bottom2");
}
catch (e) { }
try {
GA_googleFetchAds();
} catch (e) { }
刷新评论列表 刷新
相关文章推荐
- 解决iis版本问题,不能在VS2003中创建asp.net应用程序的方法
- asp.net网站发布到IIS不能浏览(情况四 转)
- asp.net网站发布到IIS不能浏览
- 关于IIS上发布asp.net应用程序让外网用户访问问题
- 为什么在ASP.NET中IIS发布后就不能观看视频了
- IIS web服务器发布ASP.NET 应用程序
- asp.net发布之后不能在IIS连接数据库的解决办法
- Asp.Net 应用程序在IIS发布后无法连接oracle数据库问题的解决方法
- 转:Asp.Net网站项目发布到IIS后验证码不能显示的问题解决
- asp.net web service应用程序的生成、发布+在本地iis服务器部署,调用
- Asp.Net 应用程序在IIS发布后无法连接oracle数据库问题的解决方法
- asp.net mvc项目在iis中发布后视频不能观看
- ASP.NET网站发布到IIS后验证码不能显示与IIS模式
- asp.net发布网站到服务器上时候出现“/web”应用程序中的服务器错误。访问 IIS 元数据库失败。 用于运行 ASP.NET 的进程帐户必须具有对 IIS 元数据库(如 IIS://servername/W3SVC)的读访问权。
- asp.net 不同应用程序在IIS发布后实现Session共享
- Asp.Net 应用程序在IIS发布后无法连接oracle数据库问题的解决方法
- IIS 5.0 和 6.0 的 ASP.NET 应用程序生命周期概述
- 发布 asp.net网站 到本地IIS
- asp.net发布到IIS中出现错误:处理程序“PageHandlerFactory-Integrated”在其模块列表中有一个错误模块“ManagedPipelineHandler”
- 发布 asp.net网站 到本地IIS