webservice请求用户名和密码用于重定向到登录页面的服务器 [英] webservice ask for Username and Password For server insted of redirecting to login page
问题描述
我有一个asp.net页面,当点击div .i时,使用web服务和$ .ajax()完成此项目后,可以检索所有食物项目。即时通讯使用表单身份验证和表单身份验证票证方法为我的web.problem是当身份验证到期时,Web服务要求输入用户名和密码。如果按钮点击或链接点击重定向,它不会重定向到登录窗口。如果我打开这个页面的网址为两个选项卡并在一个选项卡中注销页面,然后尝试从下一个选项卡访问Web服务,然后还要求页面询问服务器凭据
使用身份验证
i have a asp.net page which retrive all food item when click on a div .i done this using web service and $.ajax(). i m using form authentication and form authentication ticket method for my web.problem is when authentication expires web service ask for Username and Password.It does not redirect to login window as button click or link click redirect.If i open url for this page in two tab and sign out page in one tab,then try to access web service from next tab then also page ask for credentials for server
use authentication
<system.web>
<authentication mode="Forms">
<forms loginUrl="Index.aspx" protection="All" name=".OTS"></forms>
</authentication>
</system.web>
i想要在身份验证时重定向到登录页面 登出。我是网络服务PLZ帮助的初学者,也很抱歉我的英文不好
i want to redirect to login page when authentication is sign out. i am a beginner in Web service plz Help ,also sorry for my bad english
推荐答案
.ajax()。即时通讯使用表单身份验证和表单身份验证票证方法为我的web.problem是当身份验证到期时,Web服务要求输入用户名和密码。如果按钮点击或链接点击重定向,它不会重定向到登录窗口。如果我打开这个页面的网址为两个选项卡并在一个选项卡中注销页面,然后尝试从下一个选项卡访问Web服务,然后还要求页面询问服务器凭据
使用身份验证
.ajax(). i m using form authentication and form authentication ticket method for my web.problem is when authentication expires web service ask for Username and Password.It does not redirect to login window as button click or link click redirect.If i open url for this page in two tab and sign out page in one tab,then try to access web service from next tab then also page ask for credentials for server
use authentication
<system.web>
<authentication mode="Forms">
<forms loginUrl="Index.aspx" protection="All" name=".OTS"></forms>
</authentication>
</system.web>
i想要在身份验证时重定向到登录页面 登出。我是网络服务PLZ帮助的初学者,也很抱歉我的英文不好
i want to redirect to login page when authentication is sign out. i am a beginner in Web service plz Help ,also sorry for my bad english
http://stackoverflow.com/questions/1879136/forms-authentication-and-post-requests-from-ajax?answertab=active#tab-top [ ^ ]
这项工作对我来说
http://stackoverflow.com/questions/1879136/forms-authentication-and-post-requests-from-ajax?answertab=active#tab-top[^]
this work for me
这篇关于webservice请求用户名和密码用于重定向到登录页面的服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!