网址在Internet Explorer中无法正确形成,但适用于Chrome和Mozilla [英] URL not formed correctly in Internet Explorer but works on Chrome and Mozilla
问题描述
我有一个ASP.Net应用程序。每当我在登录页面之后运行应用程序时,有些东西会在URL' s之间连接起来。
例如:考虑我的原始网址是
something.com/Manager/Inventory/ProjDetails.aspx
但是在IE中它正在形成
something.com /经理/(F(35SRZWWvc5L4xa3tgb8hfVUw_x3t9ctYZvC_Ov ......_ N96f8Xg2))/库存/ ProjDetails.aspx
注意:这里是我的项目在文件夹管理器下。
只有在IE中才能正确形成URL,Chrome和Mozilla的URL形成正确,我只能在生产,在开发人员的环境中,即使在IE中,URL也正确形成(即没有连接的字符串)
我希望你们理解我的问题并感谢你们回复。
今天,我遇到了同样的问题,它是表单身份验证数据,IE正在将其附加到URL使用cookie,即使启用了cookie。我不知道为什么只有IE这样做,可能是由于IIS中的一些设置,我们需要配置。
任何方式,我修复了这个通过将cookieless =UseCookies属性添加到Web配置中的Form标记,下面是我的Web配置中的身份验证部分
< 身份验证 mode = 表格 >
< 表格 loginUrl = 〜/ Account / Login.aspx timeout = 2880 cookieless = UseCookies / >
< / authentication >
< 授权 >
希望这将有助于你
不要在URL中使用空格,也可以在STRING类型中分配你的URL如果变量那么请使用这个
string url = @ / URL / URL;
Hi,
I have an ASP.Net application. Whenever I run the application after the login page some thing get concatenated in between the URL's
Eg: Consider my original URL is
something.com/Manager/Inventory/ProjDetails.aspx
But in IE it is forming as
something.com/Manager/(F(35SRZWWvc5L4xa3tgb8hfVUw_x3t9ctYZvC_Ov......_N96f8Xg2))/Inventory/ProjDetails.aspx
Note: Here my project is under the folder Manager.
URL is not forming correctly only in IE, Chrome and Mozilla's URL are formed correctly and I am getting this only in the production, In Developer's environment even in IE, URL is forming correctly (i.e without the concatenated strings in-between)
I hope you guys understand my question and thanks for your reply.
Today, I experienced the same issue, It is the form authentication data, IE is appending it to the URL instead of using cookies, even if the cookies are enabled. I don't know why only IE is doing this, may be due to some settings in the IIS, which we need to configure.
Any way, I fixed this by addingcookieless="UseCookies"property to the Form tag in Web config, below is the authentication section from my web config
<authentication mode="Forms"> <forms loginUrl="~/Account/Login.aspx" timeout="2880" cookieless="UseCookies" /> </authentication> <authorization>
Hope this will help you
DON'T USE SPACE IN URL AND ALSO IF ASSIGN YOUR URL IN STRING TYPES IF VARIABLE SO PLEASE USE LIKE THIS
string url=@"/url/url";
这篇关于网址在Internet Explorer中无法正确形成,但适用于Chrome和Mozilla的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!