I opened Visual Studio 2012 Express for Web on my Windows 7 machine. I created an ASP.NET Empty Web Application named "EduPortal". I added a Web User Control to the project. In this User Control I put a button and a textbox and a button in a form. This is the code I used:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs" Inherits="EduPortal.WebUserControl1" %>
<form runat="server">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:Button ID="Button1" runat="server" Text="Button" />
</form>
I then built and ran the program. I got an error page from IIS Express, which instructed me to run these two commands on a command prompt in the IIS Express Install Directory:
appcmd set config /section:system.webServer/directoryBrowse /enabled:true
appcmd set config ["SITE_NAME"] /section:system.webServer/directoryBrowse /enabled:true
The first command ran without error. The second command, however, gave this message:
ERROR ( message:Cannot find SITE object with identifier "[SITE_NAME]". )
Anyway, I ignored the error. I rebuilt my project in Visual Studio. Now when I run the project I get this page:
(Posting the image didn't work, so go to
http://i.imgur.com/tJWui2G.png to see the page)
Why is this happening, and what steps can I take to fix it?