Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Web.Config file problem... Any Help?

Web.Config file problem... Any Help?

Scheduled Pinned Locked Moved C#
helpwindows-adminsecurityquestionworkspace
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rashadaliarshad
    wrote on last edited by
    #1

    I developed a web application, which has two sections Client Section: that is visible to local users Control Panel: allows admin of the site to control the contents of the web application. I created a cpanel folder on the root of the web application, and all the pages and functionality of Control Panel section goes there. The sample structure of the files is as in below section: /Default.aspx 'Client Side File /contactUs.aspx 'Client Side File /Aboutus.aspx 'Client Side File /Web.config 'Main Configuration file ( admin section uses connectionstring from 'the same web.config file /AppCode/DAL/Classes.vb ' Contains all the classes used in both client and cpanel section /CPanel/Default.aspx ' Admin side File /Cpanel/UpdateContactus.aspx ' Admin Side File /Cpanel/UpdateAboutus.aspx ' Admin Side File Now problem is that, i need to Secure Pages in CPANEL by adding Authenticating process, now if i add the authentication information in /Web.Config /Main configuration file then it will apply on both client side and Cpanel side as well... but i need this authentication only in CPanel side, so what i did is add a new configuration file with appropriate instructions and a Login Page, where person trying to open CPanel will be redirected if he/she has not logged in using proper username and password. here i added those files at place /CPanel/Web.Config /CPanel/Login.aspx but when i try to open any page, it gives me an error message 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 ---- The code for Web.config ----- Any Solution? 1- Can we merge two different projects with different web.config files with each others?

    :- Rashid Ali -:

    E 1 Reply Last reply
    0
    • R rashadaliarshad

      I developed a web application, which has two sections Client Section: that is visible to local users Control Panel: allows admin of the site to control the contents of the web application. I created a cpanel folder on the root of the web application, and all the pages and functionality of Control Panel section goes there. The sample structure of the files is as in below section: /Default.aspx 'Client Side File /contactUs.aspx 'Client Side File /Aboutus.aspx 'Client Side File /Web.config 'Main Configuration file ( admin section uses connectionstring from 'the same web.config file /AppCode/DAL/Classes.vb ' Contains all the classes used in both client and cpanel section /CPanel/Default.aspx ' Admin side File /Cpanel/UpdateContactus.aspx ' Admin Side File /Cpanel/UpdateAboutus.aspx ' Admin Side File Now problem is that, i need to Secure Pages in CPANEL by adding Authenticating process, now if i add the authentication information in /Web.Config /Main configuration file then it will apply on both client side and Cpanel side as well... but i need this authentication only in CPanel side, so what i did is add a new configuration file with appropriate instructions and a Login Page, where person trying to open CPanel will be redirected if he/she has not logged in using proper username and password. here i added those files at place /CPanel/Web.Config /CPanel/Login.aspx but when i try to open any page, it gives me an error message 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 ---- The code for Web.config ----- Any Solution? 1- Can we merge two different projects with different web.config files with each others?

      :- Rashid Ali -:

      E Offline
      E Offline
      Edwin Syarief
      wrote on last edited by
      #2

      Hi Rashid, U should try ASP.NET Configuration. I believe U will get your answer there. Regard, Edwin

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups