|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ASP.NET Authuntication & AuthorizationPlease help me. I would like to know how to add more than one web.config file to an ASP.NET APPLICATION/PROJECT I want this 'coz in my web site some pages need no authuntication and authorization.anonymous users are allowed access some pages.but they are restricted to view some pages which need to proper authuntication and authorization I read that i need to add all secured pages into one sub dir and add another web.config in that folder. But it is giving error.wat i did is : in main web.config. <authentication mode="Forms" /> <authorization> <allow users="*" /> </authorization> in the seconf web.config(created in a subfolder) <authentication mode="Froms" /> <authorization> <allow users="csa" /> <deny users="?" /> </authorization> but its giving following error Server Error in '/satya' Application. ------------------------------------- Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. Source Error: Line 37: by Microsoft that offers a single logon and core profile services for member sites. Line 38: --> Line 39: <authentication mode="Froms" /> Line 40: Line 41: Source File: c:\inetpub\wwwroot\satya\sec\web.config Line: 39 __________________ With Thanks Aditya Ch S You need to make that subdirectory an AppRoot for that second web.config to
work. That is why you get the "virtual directory not being configured as an application" error. -- Show quoteHide quoteMARK RICHMAN "ADITYA CHS" <ADITYA***@discussions.microsoft.com> wrote in message news:2ED1BCB3-98FE-47B0-8FD8-C24C33C25748@microsoft.com... > Hi, > Please help me. I would like to know how to add more than one web.config > file to an ASP.NET APPLICATION/PROJECT > > I want this 'coz in my web site some pages need no authuntication and > authorization.anonymous users are allowed access some pages.but they are > restricted to view some pages which need to proper authuntication and > authorization > > I read that i need to add all secured pages into one sub dir and add > another > web.config in that folder. But it is giving error.wat i did is : > in main web.config. > <authentication mode="Forms" /> > <authorization> > <allow users="*" /> > </authorization> > > in the seconf web.config(created in a subfolder) > <authentication mode="Froms" /> > <authorization> > <allow users="csa" /> > <deny users="?" /> > </authorization> > > but its giving following error > > Server Error in '/satya' Application. > ------------------------------------- > > Configuration Error > Description: An error occurred during the processing of a configuration > file > required to service this request. Please review the specific error details > below and modify your configuration file appropriately. > > Parser Error Message: It is an error to use a section registered as > allowDefinition='MachineToApplication' beyond application level. This > error > can be caused by a virtual directory not being configured as an > application > in IIS. > > Source Error: > > > Line 37: by Microsoft that offers a single logon and core profile services > for member sites. > Line 38: --> > Line 39: <authentication mode="Froms" /> > Line 40: > Line 41: > > > Source File: c:\inetpub\wwwroot\satya\sec\web.config Line: 39 > __________________ > With Thanks > Aditya Ch S > I didnt understand the thing AppRoot.I am a new bee in .NET and in learing
stage.Any way by searching in web I got a solution which solved my probelm. The solution is : <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <authorization> <allow users="Satya"/> <deny users="*" /> </authorization> </system.web> </configuration> The thing is we should remove every thing from inner Web.Config except the above code.What I did is using VS IDE i added a web.config file ,in which there will be built in code given by IDE ,i simply edited the code and added my code.Which is the reason for error.Now after removing all unnesasary code I got the solution. Show quoteHide quote "Mark A. Richman" wrote: > You need to make that subdirectory an AppRoot for that second web.config to > work. That is why you get the "virtual directory not being configured as an > application" error. > > -- > MARK RICHMAN
Appdomain.CreateDomain throws SecurityException
Help with CryptoStream and incomplete files... session manager vs Form authentication in the Global.asax.cs file User.IsInRole is always FALSE Multi-Domain Authentication for Windows Services Provide grouped security Authorization Manager/Windows 2000/ASP.NET throwing UnauthorizedAc policy files and .Net Configuration tool? Sharing login across applications Set concurrent connections on share |
|||||||||||||||||||||||