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 are the layouts of ASP.NET Pages?
Explain the differences between managed and unmanaged code?
explain code with multi inhertance
Is there any limit for query string? Means what is the maximum size?
How to disable validator control by client side JavaScript?
Explain difference between dataset and recordset?
1.can we add connection string in global.asax?????????? 2.what are the default files included when we create new web application????
What is hidden field in asp.net?
How to create a db connection at one place/page so that we can use that connection for all pages/forms/windows.what r the steps ned to be performed if question not clear,let me know
Which validator control you use if you need to make sure the values in two different controls matched?
How can you ensure a permanent cookie?
Explain the different types of directives in .net?
What is difference between abstract class and an interface?
1.what is the application pool. 2.what is the HttpModile and Http Handler. 3.C# 3.0 Features ? 4.Anonoymous Type,methopd and claas in 3.0? 5.difference between statsic and const ? 6.session vs application 7.state management clint side and server side ? 8.Genric list 9.c# 3.0 vs 3.5
What is a web pool?