Web Application as Virtual Directory of EPiServer site in IIS

Vote:
 

Hi,

I have an EPiServer CMS 6 R2 site running fine in IIS 7. However I wish to add another web application as a virtual directory within that EPiServer site in IIS.

I have ensured that the path to this virtual directory is excluded by EPiServer in the URLRewriter. When I try to hit the URL of the web application I have added, I get the following error:

CS1519: Invalid token ',' in class, struct, or interface member declaration

Has anyone ever managed to successfully add a web application as a virtual directory of an EPiServer site in IIS before?

Thanks.

#52973
Aug 23, 2011 18:09
Vote:
 

In the child virtual folder wrap the <system.web> and <system.webServer> elements as follows:

<location path="." inheritInChildApplications="false">
  <system.web>
    <!-- ... -->
  </system.web>
</location>

    

<location path="." inheritInChildApplications="false"> 
  <system.webServer>
    <!-- ... -->
  </system.webServer>
</location>

This should stop you inheriting settings from the parent application.

#52975
Edited, Aug 23, 2011 23:29
Vote:
 

Thanks for your response David. I tried your suggestion but unfortunately it didn't work.

Do you mean add the lines of code you suggested in the web.config of the EPiServer site, or the virtual folder site? And I assume I should replace path="." with path="myvirtualfolderpath"?

#52988
Aug 24, 2011 12:55
Vote:
 

I've just realised I was wrapping the location tag around the system.web and system.webServer in the wrong area of the web.config.

I've placed it in the correct area now and it works! Thanks David.

#53001
Edited, Aug 24, 2011 17:24
Vote:
 

Great stuff, glad I could help Mohammed :)

#53002
Aug 24, 2011 17:55
Vote:
 

Hi, I'm having the same issue right now.

Could anyone please tell me how this should be wrappet into web.config?

I would really appreciate.

Thanx.

#60746
Aug 23, 2012 10:28
Vote:
 

Well, I fixed it as well.

Thanks anyway.

#60747
Aug 23, 2012 10:51
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.