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
1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????
What are Master Pages in ASP.NET? or What is a Master Page?
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,?
What are the disadvantages of view state?
What can we do with asp.net?
What is meant by ispostback in asp net?
What is an example of an application service provider?
Is session server side or client side?
What is autopostback in dropdownlist in asp net?
What are the uses of list view control in Asp.net?
Explain the benefits of viewstate?
What is the difference between pathparam and queryparam?
In order to get assembly info which namespace we should import?
What is form submit?
What are the session variables?