Reputation: 23
I am using Visual Studio 2008 for .net project.
I have configured to use IIS as debug web server in the project property page.
I have two projects under c:\project, project1 and project 2. I can run project 1 with no problem. However when I try to run project 2 I got an error message, saying the web.config file is missing binary file from bin folder. The server is trying to load the web.config file from project1 instead of project2.
I have checked the virtual path settings and project settings and could not find anything wrong.
Does anyone have such experience?
I could not find useful information on google.
Thanks, Lewis
Upvotes: 2
Views: 5099
Reputation: 11
I found out that ON IIS manager, Default Web Site -> Basic Setting -> Physical path was set to perticular project.
I've changed it to C:\inetpub\wwwroot now when I run individual applicaiton they go and pick up correct config files
Upvotes: 1
Reputation: 2511
I also had this problem, it turned out I had mistakenly set up my website incorrectly in IIS.
I was pointing my default website to files for project 1, while a sub-application inside the default website was pointing to files for project 2, which was of course inheriting the web.config of project 1.
Upvotes: 0
Reputation: 20617
EDIT: How are your directories defined in IIS? If they are virtual directories, they must be defined as applications, otherwise it will try to use the root web.config.
Try this:
Upvotes: 0
Reputation: 77627
Make sure that project1 is an application whose base folder is the project1 directory and that project2 is an application whose base folder is the project2 directory. sounds like project1 is an application pointing to c:\project.
Upvotes: 0