We help IT Professionals succeed at work.

I want to use iis 7 instead of iis express in visual web developer 2010

MonCapitan
MonCapitan used Ask the Experts™
on
Hi,

I am having some trouble setting up my vwd 2010 environment to run under my local iis 7.5 instead of iis express.

Whenever I go to the project properties and select the 'web' tab, I choose under Servers, 'Local iis web server'. It automatically puts in the  Project URL http://localhost/myprojectname.

I click Create Virtual Directory and it comes up with this warning,,,

'Unable to create the virtual directory. The site ofr the url http://localhost/myprojectname exists on both the local IIS Web server and the IIS Express web server. You need to edit the 'c:\Users\Mike\Documents\iisexpress\config\applicationhost.config' file to change the port number in use by iis express or use iis manager to change the sites binding(s) in iis.'

Your help is greatly appreciated in explaining why I can't use the built in functionality to use iis 7.5 instead of iis express.

Thank you in advance.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AndyAinscowFreelance programmer / Consultant

Commented:
Have you done what the error message tells you to do ?

Author

Commented:
Yes. The virtual directory does not get created so I can't use iis manager. I did though try and create the virtual directory in iis manager so I can change the bindings but that didn't make a difference.

I changed the port number in the iis express configuration file but that didn't work either.

I also removed the site entry in the configuration file to see if I could create the virtual directory via vwd but that didn't work either.

I don't why it is even looking at iis express when I have asked it use locall iis 7.5 server.
AndyAinscowFreelance programmer / Consultant

Commented:
OK - no further thoughts.  (It is surprising how many people just ignore the advice in the error message).
Most Valuable Expert 2012
Top Expert 2008

Commented:
What do you have in the applicationhost.config file, under the <sites> element?

Example:

           <site name="CannonicalRESTWebApp" id="2">
                <application path="/" applicationPool="Clr4IntegratedAppPool">
                    <virtualDirectory path="/" physicalPath="C:\Users\Bob\Downloads\Downloaded Source\WCF WebApi REST Entity Service\C#\CannonicalRESTWebApp" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:1128:localhost" />
                </bindings>
            </site>

Open in new window


There should be multiple entries, if you have multiple sites.  The port number in the binding information shouldn't conflict with any port that you are trying to use with IIS.
Thanks for your reply.

I changed the port to 8008 but that didn't work either.

So, I vented my anger by uninstalling iis express and gave vwd no option but to use either Cassini or my local iis 7.5, and guess what, everything worked as expected.

So, how do I grade this post now?
Most Valuable Expert 2012
Top Expert 2008

Commented:
You answered your own question.  

I wasn't going to say anything so drastic as uninstalling IIS Express.  Although, if you have Windows 7, and IIS 7, then there really isn't any need for IIS Express.  I believe that it was intended for Windows XP, which only had IIS 5.1.
Top Expert 2016

Commented:
right click on your project (top item)
select properties
select radio button use local iis web server
uncheck use iis express
Either use the default project url or plug in your own.. click create virtual directory
save the project settings and then rebuild your website

Author

Commented:
No solution was found so I took a different direction.