My website has around 100 aspx. Out of this, a certain 20
aspx files should be made available to the users only
if they are logged in. How can I achieve this with the
web.config file?



My website has around 100 aspx. Out of this, a certain 20 aspx files should be made available to t..

Answer / rajesh

<configuration>
<appSettings>
<add key="DSN" value="user id=user;password=user;data
source=192.168.0.102;database=shp_cart"/>
</appSettings>
<connectionStrings>
</connectionStrings>
<system.web>
<authentication mode="Forms">
<forms cookieless="UseCookies"
defaultUrl="private/productcatalogue.aspx"
loginUrl="Index.aspx" timeout="30" protection="All"
name="LoginPage">
<credentials passwordFormat="SHA1"></credentials>
</forms>
</authentication>
<authorization>
<allow users="*"/>
</authorization>
<compilation debug="true"/>
</system.web>
<location allowOverride="true" path="private">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
<compilation debug="true"/></system.web>
</location>
</configuration>

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More ASP.NET Interview Questions

What tag do you use to add a hyperlink column to the DataGrid?

2 Answers   Siebel Systems,


Difference between ADO.net Dataset , ADO Record Set & ADO Data Reader?

3 Answers   HCL, NIIT,


What is the life cycle of web page?

0 Answers  


Where is session data stored in asp net?

0 Answers  


Disable Mouse right click on web page in asp.net?

0 Answers   HCL,






Which methods validate all the controls on a page?

0 Answers  


Is it possible to use two versions of assembly at the same time?If possible explain with code?

3 Answers   Tech Mahindra,


What is true about application service provider?

0 Answers  


How do I create a web form?

0 Answers  


Where can I get information on cookies in asp.net?

0 Answers  


What is advantage and disadvantage of viewstate

3 Answers  


What is the difference between session and application?

0 Answers  


Categories