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
What is an example of an application service provider?
What are the advantages of using sql stored procedures instead of adhoc sql queries in an asp.net web application?
What is css and what is it used for?
Is viewstate secure?
What is query string with example?
What is advantage of asp.net?
What is the difference between WindowsDefaultLocation and WindowsDefaultBounds?
What symbol would you use to denote, the start of a code block in aspx views?
Explain program to call the js function when the change is being made in the dropdown list made in asp.net mvc? : asp.net mvc
Describe a bubbled event and how it is used ?
What is difference between asp.net and asp?
What is asp according to you?
What is the difference between the get method () and post method ()?
What are sql joins?
How is it possible for .NET to support many languages?