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" %>
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?
Loading
Biswa Pujarini MohapatraPosted Jan 19, 2014, 5:49 AM
Nitesh KejriwalPosted Jan 18, 2014, 10:00 AM
It seems you have created only a user control. You should place the user control in a ASPX page and set the ASPX page as the Startup Page for the Project.
Thanks,
Nitesh