3

I have two projects that is on iis like this:

inetpub/wwwroot/mysites/secure/web_application_1 --> has its own web.config

inetpub/wwwroot/mysites/secure/web_application_2 --> has its own web.config

The two applications are totally different applications, however, they both have their own client authentications & custom role & custom membership.

web_application_1 works fine as its the old application.

web_application_2 is the new application, when I ran it on the web, I got errors:

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.

I am not sure what is wrong in the web.config?

The web.config is same with the exception that:

  • connection strings is different as they both uses different db
  • custom membership & custom role is different as they both uses the namespace of the project

The whole IIS & URL was set up for web_application_1; and since it takes like forever to request new setup from my sysadmin, we both suggested i could just do this:

https://www.mywebsite.com/secure/web_application_1

inetpub/wwwroot/mysites/secure/web_application_1 --> has its own web.config
https://www.mywebsite.com/secure/web_application_2

inetpub/wwwroot/mysites/secure/web_application_2 --> has its own web.config
NULL
  • 1,559
  • 5
  • 34
  • 60
  • 1
    Well, if you have trouble with the `web.config` - then **PLEASE SHOW US** that file!! We can't see your screen, can't access your hard drive to have a look ourselves - post it here! – marc_s Sep 16 '13 at 15:39
  • @marc_s I think i understand the problem I have, i would like to know if there is a work around it. so basically, i think the fact that these two applications are in the same "parent" folder, that is the error. i wonder if there is a work around it? – NULL Sep 16 '13 at 15:43
  • How are they configured in IIS. Is web_application_1 configured as a virtual directory or an application? What about web_application_2? – Nate Sep 16 '13 at 15:44
  • 1
    @Nate I just updated my post. i understand the error, the thing is, i don't know the solution? "mysites" is the directory, and web_application_1 is the application that runs the .net applications. – NULL Sep 16 '13 at 15:57
  • You might check this...[Article][1] [1]: http://stackoverflow.com/questions/1712629/section-registered-as-allowdefinition-machinetoapplication-beyond-application/19105006#19105006 – MongooseNX Sep 30 '13 at 22:34

1 Answers1

2

ok found my own solution:

Add the folder “web_application_2” as an application in IIS manager: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/b5488995-fa99-460f-96d7-29d1ddcf3fac.mspx?mfr=true

NULL
  • 1,559
  • 5
  • 34
  • 60