Knowledgebase

A Simple Hello World Asp.net page Print

  • 1

You want to create simple Asp.net page to verify Asp.net is working?


Create hello.aspx file and upload to hosting space via ftp. Sample code is below:



<html>
<body>
<p>
<b>You are browsing this site with:</b>
<%Response.Write(Request.ServerVariables("http_user_agent"))%>
</p>
<p>
<b>Your IP address is:</b>
<%Response.Write(Request.ServerVariables("remote_addr"))%>
</p>
<p>
<b>The DNS lookup of the IP address is:</b>
<%Response.Write(Request.ServerVariables("remote_host"))%>
</p>
<p>
<b>The method used to call the page:</b>
<%Response.Write(Request.ServerVariables("request_method"))%>
</p>
<p>
<b>The server's domain name:</b>
<%Response.Write(Request.ServerVariables("server_name"))%>
</p>
<p>
<b>The server's port:</b>
<%Response.Write(Request.ServerVariables("server_port"))%>
</p>
<p>
<b>The server's software:</b>
<%Response.Write(Request.ServerVariables("server_software"))%>
</p>
</body>
</html>


Was this answer helpful?

« Back

Powered by WHMCompleteSolution


malware removal and website security

© Tech Logic Solutions Inc. All Rights Reserved

Bradford - Newmarket - Barrie - Toronto - Halifax - Vancouver - Calgary - Edmonton - Regina - Winnipeg - Ottawa - Montreal - Canada - USA - UK