您的位置:首页 > 编程语言 > ASP

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) { }

刷新评论列表 刷新
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐