By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,086 Members | 1,919 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,086 IT Pros & Developers. It's quick & easy.

Use of aspx with IIS 5.1 and error with showing in browser

P: n/a
Dear,

I have made an aspx page and I want to start it via explorer to see how it
looks in my browser. But when I click at it I receive the next error:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.

A name was started with an invalid character. Error processing resource
'file:///C:/Inetpub/wwwroot/login.aspx'. Line 1, P...
<% Page language="C#" %>
--^
I use IIS 5.1 and my default web site is c:/inetpub/wwwroot.This page
login.aspx is saved at c:\inetpub\wwwroot. Which option had I have
forgotten?
And why do I receive c:/inetpub/wwwroot instead of http:\\localhost?
This is the code:

<% Page language="C#" %>
<script runat="server">
void Page_Load(Object Sender, EventArgs e)
{
//If the page has posted back results, then check them
if(IsPostBack) {
//Grab the username and password fields
String strUserName = Request["username"];
String strPassword = Request["password"];

//Write out a success/failure message
if((strUserName == "Joe Smith") &&
(strPassword == "secret")) {
Response.Write("<h2>You have successfully logged on "
+ strUserName + "</h2>");
}
else {
Response.Write("<h2>Your username and password " +
"combination was not found.</h2>");
}
}
}
</script>

<html>
<body>
<h2>Welcome to the Sample Login Page</h2>
<form runat="server">
<table>
<tr>
<td>UserName:</td>
<td><input type="text" name="username"></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" value="Login">
</td>
</tr>
</table>
</form>
</body>
</html>
Who can help me?

Thanks you very much,

Hugo
Mar 5 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
DWS
You left out the @
Good Luck
DWS
"Hugo Lefèvre" wrote:
Dear,

I have made an aspx page and I want to start it via explorer to see how it
looks in my browser. But when I click at it I receive the next error:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and
then click the Refresh button, or try again later.

A name was started with an invalid character. Error processing resource
'file:///C:/Inetpub/wwwroot/login.aspx'. Line 1, P...
<% Page language="C#" %>
--^
I use IIS 5.1 and my default web site is c:/inetpub/wwwroot.This page
login.aspx is saved at c:\inetpub\wwwroot. Which option had I have
forgotten?
And why do I receive c:/inetpub/wwwroot instead of http:\\localhost?
This is the code:

<% Page language="C#" %>
<script runat="server">
void Page_Load(Object Sender, EventArgs e)
{
//If the page has posted back results, then check them
if(IsPostBack) {
//Grab the username and password fields
String strUserName = Request["username"];
String strPassword = Request["password"];

//Write out a success/failure message
if((strUserName == "Joe Smith") &&
(strPassword == "secret")) {
Response.Write("<h2>You have successfully logged on "
+ strUserName + "</h2>");
}
else {
Response.Write("<h2>Your username and password " +
"combination was not found.</h2>");
}
}
}
</script>

<html>
<body>
<h2>Welcome to the Sample Login Page</h2>
<form runat="server">
<table>
<tr>
<td>UserName:</td>
<td><input type="text" name="username"></td>
</tr>
<tr>
<td>Password</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td></td>
<td>
<input type="submit" value="Login">
</td>
</tr>
</table>
</form>
</body>
</html>
Who can help me?

Thanks you very much,

Hugo

Mar 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.