0

I have installed windows 8 on my system and I am using visual studio 2012 and IIS 8 Express. when I try to create a virtual directory for web project the message box shows the error message like

"Unable to create virtual Directory. To access Websites on the local IIS Web server, You must run visual studio under an Administrator account"

Please help me how to run visual studio under administrator Account, Thank you.

2 Answers2

0

Right click on the shortcut then "Run as administrator" or create another shortcut using the "runas" dos command

http://technet.microsoft.com/en-us/library/cc771525%28v=ws.10%29.aspx

Serge
  • 6,554
  • 5
  • 30
  • 56
  • I just run as administrator and virtual directory was Created. thanks for that and after that I tried to run web project, on the web application I got the error message "The website encountered an error while retrieving http://localhost/MvcDemo/. It may be down for maintenance or configured incorrectly." – atchyut kumar May 08 '13 at 12:19
  • Check in iis that localhost website is running and at least one of its binding port is 80. – Serge May 08 '13 at 12:23
  • Excuse me, Can explain a bit more. I am new for IIS. Thank you – atchyut kumar May 08 '13 at 12:26
  • When selecting the website where MvcDemo is (most likely "Default Web Site"), check that "Start" button isn't available (otherwise, click it) then click "Binding" to make sure the site is listening on port 80. – Serge May 08 '13 at 12:28
  • the start button is disabled on iis server and the port80 is already on – atchyut kumar May 08 '13 at 12:35
  • It's weird, can you browse to the website? You could try restarting iis (doc comman : iisreset) or even your computer. – Serge May 08 '13 at 12:39
0

Create the empty project for the asp.net after creating the asp.net empty project . open the solution explorer then right click on the solution go to the propety of the project then go to web tab then use the iis as a local host then after chocie the iis local host click the blow check box then create the directory your virtual directory is created