Microsoft JScript运行时错误:访问被拒绝.在jQuery中. [英] Microsoft JScript runtime error: Access is denied. in jquery.

查看:149
本文介绍了Microsoft JScript运行时错误:访问被拒绝.在jQuery中.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我在asp.net应用程序中使用jquery代码.我用了网址:-https:tk2 ....
插入了http:localhost .....
当我尝试跟踪时,我发现了以上错误消息.这是返回错误消息的函数.

任何人都请帮助我,非常紧急

hi ,
i m using jquery code in my asp.net application . i used url:- https:tk2....
insted of http:localhost.....
when i am try traced i found an above error message. this is the function returning the error message.

any one please help me , very urgent

function CallService() {
                $.ajax({
                    type: varType, //GET or POST or PUT or DELETE verb
                    beforeSend: function(xhr) {
                        xhr.withCredentials = true;
                        xhr.setRequestHeader('Authorization', 'Basic ' + $.base64.encode($("#tbxUserName").val() + ':' + $("#tbxPassword").val()));
                    },
                    url: varUrl, // Location of the service
                    data: varData, //Data sent to server
                    contentType: varContentType, // content type sent to server
                    dataType: varDataType, //Expected data format from server
                    processdata: varProcessData, //True or False
                    success: function(msg) {//On Successfull service call
                        //alert('success');
                        ServiceSucceeded(msg);
                    },
                    error: function(msg) {//On UnSuccessfull service call
                        alert('failed');
                        ServiceFailed(msg);
                    }
                });
            }

推荐答案

.ajax({ 类型:varType,// GET或POST或PUT或DELETE动词 beforeSend:功能(xhr){ xhr.withCredentials = true ; xhr.setRequestHeader(' Authorization'' 基本' +
.ajax({ type: varType, //GET or POST or PUT or DELETE verb beforeSend: function(xhr) { xhr.withCredentials = true; xhr.setRequestHeader('Authorization', 'Basic ' +


.base64.encode(
.base64.encode(


(" ).val()+ ' :' +
("#tbxUserName").val() + ':' +


这篇关于Microsoft JScript运行时错误:访问被拒绝.在jQuery中.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆