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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????

18516


What are Master Pages in ASP.NET? or What is a Master Page?

613


In order to bind the data from a data source to the Repeater control what property is set and what method must you call in your code,?

597


What are the disadvantages of view state?

595


What can we do with asp.net?

512






What is meant by ispostback in asp net?

544


What is an example of an application service provider?

453


Is session server side or client side?

531


What is autopostback in dropdownlist in asp net?

532


What are the uses of list view control in Asp.net?

617


Explain the benefits of viewstate?

586


What is the difference between pathparam and queryparam?

579


In order to get assembly info which namespace we should import?

524


What is form submit?

520


What are the session variables?

516