C# .NET - how to pubilsh - Asked By hiren dhameliya on 14-Dec-11 04:36 PM

hey
i completed one website which is job agency. I know how to publish . publish website then install iis server to my pc but problem is that .


This page contains the following errors:

error on line 1 at column 2: StartTag: invalid element name

Below is a rendering of the page up to the first error.




every page have same problem code of is
<%@ Page Title="Log In" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Login.aspx.cs" Inherits="Account_Login" %>   
show s error which i mark red color  i dont how to slove..

if there is way is wrong to publish plese tell me ..........
Anoop S replied to hiren dhameliya on 14-Dec-11 11:39 PM
It appears as if the browser tries to display what it thinks is an XML file, since it gives an error on the second character of the first line. So I think the file is not parsed, but simply returned as is immediately. Check if your IIS server is configured correctly and that it actually parses your ASP tags before returning the page. or select correct .net framework version from virtual directory
dipa ahuja replied to hiren dhameliya on 15-Dec-11 02:31 AM
You can run your project by hosting in IIS

Step 1 : Build - > Publish Web Site

Step 2 : Publish it in the IIS server's folder : C:\inetpub\wwwroot

Step 3: Open IIS 

Step 4:  Expand the Root Node of the IIS in the left panel. In the Sites node you will get you published site

Step 5 : Right click on the your site and Choose Convert to Application:



Step 6: Now it will be converted to application  Now Right click on it and choose Browse :



Done!