hi there im trying to get a sub domain set up and working. the main domian is cravenby.com the sub domain is forum.cravenby.com i added the subdomain in the control panel all the files for cravenby.com are in the root directory along with a forum subfolder which i am trying to set up as an application. I implemented the url rewrite rule in IIS and then browsed to forum.cravenby.com and got this error : It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. so i did some googling and then went and added the forum directory as an application in iis now when i try to browse to the forum its giving me an error where its trying to load a namespace from the root application web.config why it cant find that namespace i dunno because the main site works fine but its obviously not routing properly if its trying to read that config file. i did the url rewriting as follows: pattern .* added a condition: {HTTP_HOST} Matches the pattern ^(forum.)?cravenby.com$ {PATH_INFO} does not match the pattern ^/forum/ any ideas please? its my first time using url rewrite.
You will need to setup your subfolder as an application folder. Try looking at this kb article. http://support.Winhost.com/KB/a635/what-is-the-application-starting-point-tool.aspx
Hi Ray thanks for your reply /forum is listed as an application starting point in my control panel? still no luck
hi ray url rewriting aside, i removed the url rewrite rule and then just went straight to www.cravenby.com/forum and its still getting that error where its trying to read the config file form the main app, i have set it up as an application like you said, have a look for yourself, essentially i dont mind what the url looks like for now any ideas?
This happens probably because the web.config file in your subfolder inherited some configurations from the web.config of the parent (root) directory. What I'd recommend doing is to temporarily remove web.config file from your root and re-install your web application in your subfolder. This will prevent it from inheriting configurations from your parent web.config.
oh dear! once i re added the webconfig for the main app i get this error? Parser Error Message: The entry 'ApplicationServices' has already been added. Source Error: Line 24: <appSettings/> Line 25: <connectionStrings> Line 26: <add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/> Line 27: <add name="ASPNETDBConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/> Line 28: </connectionStrings> Source File: E:\web\cravenby\forum\web.config Line: 26 it doesnt seem to like the fact that both apps have membership connection strings
i think i might roll my own membership for the main app as i was worried about the 2 membership systems conflicting, ive had it before with 2 visual studio windows open and then managing to log on to the one app through the other although i imagine that's just a cache thing with the browser
You can stop web.config inheritance by adding this line to your web.config file. <location path="." inheritInChildApplications="false"> Try also looking at this link. http://www.kowitz.net/archive/2007/05/16/stopping-asp.net-web.config-inheritance