One aplication have 50 pages out of 50 , 5 pages shouldn't ask user name and password other 45 should ask user name and password?how will you write the code in web.config?

Questions by harinath29

Showing Answers 1 - 6 of 6 Answers

Raj

  • Jun 10th, 2006
 

In application if there were 50 pages and out of 50, 5 pages asked user id and password there then 45 pages were show and take there company details, new user detail data, show the visitor about their fruitfull results, FAQ is also available their. And many more like that.

  Was this answer useful?  Yes

meenal

  • Sep 7th, 2006
 

I am confused by your ans .Can you elaborate pls

  Was this answer useful?  Yes

Amritansh

  • Sep 22nd, 2006
 

 

Make sure that the authorization tag in WEB.CONFIG is empty and then after the Globalization tag write the following coding.... make sure to set the start page as the one which does not have a security on it..........

 

<!-- GLOBALIZATION

This section sets the globalization settings of the application.

-->

<globalization

requestEncoding="utf-8"

responseEncoding="utf-8"

/>

</system.web>

<!-- Write the following coding -->

<location path= "WebForm5.aspx">

<system.web>

<authorization>

<deny users="?" />

</authorization>

</system.web>

</location>

</configuration>

Whizkid747

  • Feb 16th, 2007
 

Why cant we put the 5 pages in another folder and create a seperate web.config file for the folder and set Authentication = "none". i think this will do the trick. Comments r welcome.

Put 45 pages in one folder, put 5 files in another folder

Example
Folder1 - 45 pages
Folder2 - 5 pages

1. Add new web config file in 45 pages Folder (Folder1), and add the following contents in that.
<authorization>
      <allow users="*"/>
</authorization>

2. Add new web config file in 5 pages Folder (Folder2), and add the following contents in that.
<authorization>
      <deny users="?"/>
</authorization>

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.