jedistar
asked on
web.config
I have a web.config in my main folder /
How do i edit this web.config to perform <authentication mode="Forms> for subdirectory
/private and authorization to deny users=?
What do i add in main / web.config
How do i edit this web.config to perform <authentication mode="Forms> for subdirectory
/private and authorization to deny users=?
What do i add in main / web.config
ASKER
how does web.config know the authorization is for /private
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hello,
In my web.config..I am trying to add the above code for login process:
<authentication mode="Forms">
<forms name=".ASPXAUTH"
loginUrl="login.aspx"
timeout="30"
path="/private"
protection="All">
</forms>
</authentication>
<authorization>
<deny users="?" />
<allow roles = "WebUserRole" />
<deny roles = "NoRoles, Guest, Visitor" />
</authorization>
...to my current web.config below..but I dont think it likes it:
Can I have more than one sql connection in web.config??
-------------------------- ---------- ----------
<?xml version="1.0"?>
<configuration>
<connectionStrings>
This connection is inherited from the ASP.NET Quickstart Web.config file
Uncomment this section to edit the sample locally
<add name="Pubs" connectionString="Server=( local)\SQL Express;In tegrated Security=True;Database=pub s;Persist Security Info=True"
providerName="System.Data. SqlClient" />
<add name="Northwind" connectionString="Server=( local)\SQL Express;In tegrated Security=True;Database=Nor thwind;Per sist Security Info=True"
providerName="System.Data. SqlClient" />
<add name="Contacts" connectionString="Server=( local)\SQL Express;In tegrated Security=True;Database=Con tacts;Pers ist Security Info=True"
providerName="System.Data. SqlClient" />
<add name="NorthwindOLEDB" connectionString="Provider =Microsoft .Jet.OLEDB .4.0;Data Source=|DataDirectory|Nort hwind.mdb; "
providerName="System.Data. OleDb" />
<add name="ContactsDatabase" connectionString="Data Source=.\SQLEXPRESS;Attach DbFilename =|DataDire ctory|Data base.mdf;I ntegrated Security=True;User Instance=true;"
providerName="System.Data. SqlClient" />
</connectionStrings>
<system.web>
<pages styleSheetTheme="Default"/ >
<caching>
<sqlCacheDependency enabled="true" pollTime="1000">
<databases>
<add name="Pubs" connectionStringName="Pubs "/>
</databases>
</sqlCacheDependency>
</caching>
</system.web>
</configuration>
In my web.config..I am trying to add the above code for login process:
<authentication mode="Forms">
<forms name=".ASPXAUTH"
loginUrl="login.aspx"
timeout="30"
path="/private"
protection="All">
</forms>
</authentication>
<authorization>
<deny users="?" />
<allow roles = "WebUserRole" />
<deny roles = "NoRoles, Guest, Visitor" />
</authorization>
...to my current web.config below..but I dont think it likes it:
Can I have more than one sql connection in web.config??
--------------------------
<?xml version="1.0"?>
<configuration>
<connectionStrings>
This connection is inherited from the ASP.NET Quickstart Web.config file
Uncomment this section to edit the sample locally
<add name="Pubs" connectionString="Server=(
providerName="System.Data.
<add name="Northwind" connectionString="Server=(
providerName="System.Data.
<add name="Contacts" connectionString="Server=(
providerName="System.Data.
<add name="NorthwindOLEDB" connectionString="Provider
providerName="System.Data.
<add name="ContactsDatabase" connectionString="Data Source=.\SQLEXPRESS;Attach
providerName="System.Data.
</connectionStrings>
<system.web>
<pages styleSheetTheme="Default"/
<caching>
<sqlCacheDependency enabled="true" pollTime="1000">
<databases>
<add name="Pubs" connectionStringName="Pubs
</databases>
</sqlCacheDependency>
</caching>
</system.web>
</configuration>
<authentication mode="Forms">
<forms name=".ASPXAUTH"
loginUrl="login.aspx"
timeout="30"
path="/private"
protection="All">
</forms>
</authentication>
<authorization>
<deny users="?" />
<allow roles = "WebUserRole" />
<deny roles = "NoRoles, Guest, Visitor" />
</authorization>