Problem solving at work-(win2003 ASP. NET) session and the method with page callbacks do not work properly with the solution

Source: Internet
Author: User

Company Bp&it project team. Developed Bp&it software since last month. This month, I started testing my tragic discovery. He altogether not support my computer IE11. Half a month has not been resolved

Let's first analyze the reasons. Home Landing page Normal browsing http://hr.bingjun.cc/

Post-login URL rendering http://hr.bingjun.cc/(F (0-mej-fnv8v-hwrgi2rohfq_0szjqanmebs5p1dkcehwdx-ttu8taz_h6hvgorbm-tatm4zk_ DCSDO8GVQOXWCOOU4YJIVZIHJ1PC9HKE7W1))/default.aspx

Click any link on any page

Key value
Referer http://hr.bingjun.cc/MyTask/MyTaskPage.aspx

Just 302 http://hr.bingjun.cc/.

For URL http://hr.bingjun.cc/(F (0-mej-fnv8v-hwrgi2rohfq_0szjqanmebs5p1dkcehwdx-ttu8taz_h6hvgorbm-tatm4zk_ DCSDO8GVQOXWCOOU4YJIVZIHJ1PC9HKE7W1))/default.aspx

Analysis we can find it easy to find. This is a link to a URL that uses no cookie mode. And the F-head can tell that our Bp&it project group uses forms form validation

And the jump page is a http://hr.bingjun.cc/MyTask/MyTaskPage.aspx without a cookie URL so that the cookie is lost more conceivable rely on the cookie work Session and login status

Why did the page jump and didn't bring cookieurl? I think it's because their code didn't use the server path "~/" because only using the server path, ASP, would help us automate the Cookieurl segment.

Ask Bp&it project group immediately after discovery why my IE11 can't use the internal Web site (answer I'm Microsoft Bug)

Altogether is like that. The bug that is based on what I know can cause this problem is that ASP. NET will recognize IE11 as a cookie-free browser.

Well, that would be a lot of solution. Start at the server level

We know that the ASP is not cookie-free and is identified by a library of its own, so we can add something to this library.

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\Browsers

Open this directory to find a lot of files after that. This is the library that ASP. NET is used to identify the browser. Open IE.browser

Add a browser configuration node

<browser id="IE11"Parentid="Mozilla"> <identification> <useragent match="trident\/7.0; rv: (? ') Version ' (? ') Major ' \d+) (\. (? ') Minor ' \d+)?) (?‘ Letters ' \w*)) (? ') Extra ' [^]]*)"/> <useragent nonmatch="Iemobile"/> </identification> <capture> <useragent match="trident/(? ') Layoutversion ' \d+)"/> </capture> <capabilities> <capability name="Browser"Value="IE"/> <capability name="Layoutengine"Value="Trident"/> <capability name="layoutengineversion"Value="${layoutversion}"/> <capability name="Extra"Value="${extra}"/> <capability name="IsColor"Value="true"/> <capability name="Letters"Value="${letters}"/> <capability name="MajorVersion"Value="${major}"/> <capability name="MinorVersion"Value="${minor}"/> <capability name="screenbitdepth"Value="8"/> <capability name="type"Value="Ie${major}"/> <capability name="version"Value="${version}"/> </capabilities> </browser>

This problem is resolved for all sites under the v4.0.30319 version on this server

2 Bp&it also said they found a solution to the configuration file on the server they dare not use the server on the site too much afraid of crashing ah ~ ~ Don't know how to say they

Do you not know that the ASP. config file site can be appended or overwritten globally? (PS: Under the config of the above path is the global configuration)

Since it is possible to overwrite the new browser file in the project, it's OK. As for how to create a new browser file this should not be I said it (blog Park pictures altogether to outside the chain or I add a few steps come in)

3 If this is too busy or afraid of the future there will be similar unrecognized browser then change the value of cookieless

Open Web. config to add or modify a node under system.web

<sessionstate mode="InProc"cookieless="UseUri"Customprovider="Defaultsessionprovider"> <providers> <add name="Defaultsessionprovider"Type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, version=1.0.0.0, Culture=neutral, Publickeytoken=31bf3856ad364e35"Connectionstringname="defaultconnection"/> </providers> </sessionState> <authentication mode="Forms"> <forms cookieless="UseUri"Loginurl="~/account/login"timeout="2880"Defaulturl="~/"/> </authentication>

Configure cookieless= "UseCookies" This also all browsers use browser cookies instead of Urlcookie (say you have seen browsers that do not support cookies), regardless of browser support cookies? PS: I have seen it)

I think it's almost over here.

Ps:ie11 appears--_dopostback not defined is also the browser does not recognize the problem oh, but not because the browser does not recognize the cookie but that he does not support JavaScript through the first 2 methods of the same solution on the focus is to add the following 2 sentence in the configuration

<capability name="javascript"           value="true" />  <capability name="cookies"              value="true" />

(PS: Have you seen browsers that do not support JavaScript?) I've never seen it before. This Microsoft. Hairy! Default Chengdu support Much better to write the configuration file not very well.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.