Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 04, 2010 08:12 PM by Mikesdotnetting
Nov 02, 2010 09:18 AM|LINK
I would please like to know the steps for creating a Virtual Directory for Webmatrix.
I referred the post http://forums.asp.net/p/1586631/4010126.aspx but could not understand how it can be done.
Thanks in advance.
Nov 02, 2010 12:40 PM|LINK
I found the applicationhost.config file under MyDocuments/IISExpress/Config and could set up the directory.
I would like to know how the site can be setup.
Nov 02, 2010 01:42 PM|LINK
i've tried this before you need to use the appcmd.exe in the webmatrix folder ,you will be able du create a virtual directory.
I dont think you can do anything about it in the app.config file , but i may be wrong.
Nov 03, 2010 06:46 AM|LINK
Hi, I was able to create three virtual directories for my site.
I went to Visual Studio and modified the port number accordingly for my project.
I then referred the steps in http://www.intrepidstudios.com/blog/2010/7/11/debug-your-net-web-project-with-iis-express-t.aspx
However when I run the project, I get the following error:
HTTP Error 500.0 - Internal Server Error
ASP.NET application initialization failed.
My Operating System is Windows Vista Home Premium.
Please can someone throw light on this?
Nov 04, 2010 04:58 AM|LINK
I created the virtual directories again. When I run the site this time, I get this error:
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. It shows a section highlighted in red in the Web.config
Another point is that I am working on ASP.NET MVC 2 application and the three virtual directories of my site each contain models, views, controllers, scripts and Web.config files,etc.
Any help would be greatly appreciated.
Nov 04, 2010 03:39 PM|LINK
did you try what i suggested with appcmd ?
for exemple , if the app is "Link Directory/" ( check the name with appcmd list site)
you can add a vdir with :
appcmd add vdir /app.name:"Link Directory/" /path:/subdir /physicalPath:c:Temp
now if you are dealing with mvc you may post your question in the mvc or iis forum , it makes sense to me.
appcmd webmatrix razor
Nov 04, 2010 08:12 PM|LINK
I agree with camus. You should post your question to the forums at IIS.net:
http://forums.iis.net/. They share the same membership as this site, so you can use your existing user name and password to log in.
I don't understand why you are using WebMatrix for MVC. It won't work. Well, you can use WebMatrix to edit files, but MVC applications are not a supported scenario as far as WebMatrix goes.