简体   繁体   中英

IIS server, web page giving error, some XML ERROR

whenever i needed to test my web site, i used to press ctrl and f5. i recently installed installed iis service.

kept an html page accessed it from host

kept an fully developed default.aspx page in the www directory tried to access gave error of XML something....

that means i can only use HTML pages, ?

so what to do if i am using c# asp.net?

current i do not have the computer with iis installed so i cannot post the exact error message

it was something like

can not render XML

(then it said something like unknown line)

"<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs"
    Inherits="_Default" %>"

If your Default.aspx page hasnt changed, and it was working when "You press Ctrl-F5" (VS Local Server - Cassini).

Then all that is different is instead of local server you're now using IIS, you probably need to setup your website in IIS.

Create the virtual directory in IIS, then right click on your web project in VS, go to properties, web, under servers section change it from "Use Visual Studio Development Server", to "Use Local IIS Web Server", and point it to the virtual directory you created in IIS.

I'd say that you have to register the .net framework on yoir IIS.

use this command

%WindowsDir%\\Microsoft.NET\\Framework\\vx.y.zzzz\\aspnet_regiis.exe -i

Where %WindowsDir% is your windows folder (C:\\Windows for instance) and vx.y.zzzz is the version of the framework (v2.0.50727 for instance)

It would help if you tell us the version of the framework you're trying to use and the version of the IIS.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM