473,785 Members | 2,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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\wwwr oot. Which option had I have
forgotten?
And why do I receive c:/inetpub/wwwroot instead of http:\\localhos t?
This is the code:

<% Page language="C#" %>
<script runat="server">
void Page_Load(Objec t 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 " +
"combinatio n 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
1 1751
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\wwwr oot. Which option had I have
forgotten?
And why do I receive c:/inetpub/wwwroot instead of http:\\localhos t?
This is the code:

<% Page language="C#" %>
<script runat="server">
void Page_Load(Objec t 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 " +
"combinatio n 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2813
by: Jerry Tovar | last post by:
I am using .Net 2003 on a XPPro running IIS. I am unable to view any of my ASPX webforms in a browser unless I modify the .ASPX file and replace Codebehind="employee.aspx.cs" with src="employee.aspx.cs". It looks like my bin/employee.dll file is not being used. Instead, my employee.aspx.cs file is being used.
5
1540
by: Steve | last post by:
Hi... new to ASP.NET... I am creating a DLL using VB.NET which my ASPX page will be calling. I have a class in the DLL (MyClass) which has a property (MyProperty). If the value assigned to MyProperty is set by my ASPX page to be out of bounds, I want to raise an exception that gets captured in the ASPX page, causing it to fail. This is working OK. However, when the page fails, in the browser the SOURCE ERROR part of the error page is...
9
3209
by: sck10 | last post by:
Hello, I have a page with an ImageButton that is used to redirect to another page. When the page first opens, everything looks as expected. However, when I click on the image, the new page opens as expected. However, when I go back to the original page, all the font sizes are larger. Its as if by clicking on the ImageButton, my CSS formatting was discarded. When I look at the source for the following code, this is what I get:
3
1707
by: chedderslam | last post by:
I am just starting with .net. I have done a new install of iis 5.1 and changed the default document to index.aspx. I have written a simple aspx document in wwwroot. However, when I browse to 127.0.0.1/, I just get the code contained in the page displayed in the browser as an xml document. Here's the contents of index.aspx(this is what is displayed in the browser): - <html> - <head> <title>Simple ASPX Page</title> </head>
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10357
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10162
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5396
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5528
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2893
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.