Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h1>R00T CaUsE</h1> <ol> <li><p>Adding</p> <pre><code>&lt;authorization&gt; </code></pre> <p>tag with the code shown in above question would make any anonymous user from accessing any page other than Login, as each request will be redirected to LogIn Page with no other content allowed from server including basic <strong>CSS</strong>. </p></li> <li><p>Suggested solution 1 on the web was to add </p> <pre><code> &lt;location&gt; </code></pre> <p>tag which works for css but causes issue with the System.Linq. </p></li> </ol> <p>Here is the solution for the StUpIdItY. First of since nothing was working I saved web.config contents and deleted web.config and recreated from scratch as follows. </p> <h1>Step1</h1> <pre><code> &lt;?xml version="1.0"?&gt; &lt;configuration&gt; &lt;system.web &gt; &lt;compilation debug="true" targetFramework="4.0"/&gt; &lt;authentication mode="Forms" &gt; &lt;forms loginUrl="~/Login/frmLogin.aspx" /&gt; &lt;/authentication&gt; &lt;authorization &gt; &lt;deny users="?" /&gt; &lt;/authorization&gt; &lt;/system.web&gt; </code></pre> <p></p> <p>This first step took Linq errors away. </p> <h1>Step 2</h1> <p>Problem with this approach is since I am using external CSS file it will not apply to LOGIN page as </p> <pre><code> &lt;authorization &gt; &lt;deny users="?" /&gt; &lt;/authorization&gt; </code></pre> <p>will block any anon user. You can still use CSS by having css in separate folder and adding another web.config file under the folder where your external CSS is. In my case my css file was, StyleSheet.css under Styles folder. So I just added web.config there as follows. </p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;configuration&gt; &lt;system.web&gt; &lt;authorization&gt; &lt;allow users="*"/&gt; &lt;/authorization&gt; &lt;/system.web&gt; &lt;/configuration&gt; </code></pre> <p>Now my css is working fine, as well as I can use LogIn page and Linq. </p> <p>Thanks to MICROSOFT for wasting my time on these issues but I hope I can save frustrations to many in the future. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload