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

Which namespace in used to connction web cam

3 Answers  


What is shared and private assembly?

1 Answers   Accenture,


To call a Web service SOAP which transport protocol you use?

3 Answers   Siebel,


What do you mean by authentication?

0 Answers  


How to bind all the binding controls in a page at once in ASP.NET?

0 Answers   Viscus Infotech,






Suppose, I have 3 pages, Page1.aspx, Page2.aspx, Page3.aspx. All pages are in diff. server. When user req. for a page, Page1.aspx opens Ist & a session established. If user req. for IIn page, second session established. Similarly, 3rd session established if user req. 3rd page. In this scenario, tot. 03 sessions are established. How we can minimize it so that it will work with only one session?

3 Answers   TCS, Wipro,


Please brief not about xsd,xslt & xml?

0 Answers  


can we pass coditions in swtich case?

3 Answers  


What is the current version of asp.net?

0 Answers  


“~” means in asp.net application?

4 Answers   IBS,


What are the events that happen when a client requests an asp.net page from iis server?

0 Answers  


I’m having some trouble with cas. How can I diagnose my problem?

0 Answers  


Categories