.aspx extension names of web pages

Posted on 2005-02-26
Medium Priority
Last Modified: 2013-11-19

What's the best practice on deploying aspx pages?

1. the index site should be .aspx or html (main web page)?

2. how come other site doesn't have .extension (yahoo.com/mail) ?

3. when i place the test.aspx to iis, how can I just type http://localhost/mywebtest instead of http://localhost/mywebtest/test.aspx ?

Question by:lynnton
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Assisted Solution

Joeisanerd earned 400 total points
ID: 13411132
1. That's up to you on whether you want or need an ASP.NET page on the first page. If your main web page is all static information then you could use an HTML page, which would load faster than an aspx page.

2. You can have a website show a default file so that when you go to it initially that it won't show the filename.

3. In IIS look at the properties of your Application. There is a Documents tab where you can specify which documents that IIS should try to load if the exist, if test.aspx is there then you will get the result you are looking for.

Author Comment

ID: 13411186

1. Is it a good idea to hide the extension ?

2. Is there an error logs ? like we can see what they user did (sql statements create by the aspx site) before the error occured.

3. how do we properly handle errors? (like in vb we create a log and save to a txt file)


Accepted Solution

Maulik Modi earned 800 total points
ID: 13411619
Well, I don have much idea on goodness of hiding extension...so, i am opting for other two..

A-2 : Its nice to have a decent error log which displays info about exceptions occured when users have navigated thru our site...I mean you can create xml file and send all errors to xml file in catch block like XMLErroLog.LogException(ex.source + ex.stacktrace)...and build one page which renders xml in desired format accessible to only administrator...you can log your sql statements too for debugging purposes...

A-3 Its same as A-2 if you are asking for webApp but one more addition is you can send  combined email evereday containing
All successful transactions(not required but its good to track user activity) and all caught exceptions..

LVL 26

Assisted Solution

Rejojohny earned 800 total points
ID: 13426985
u cannot hide extensions .. its only that when u default page is set to some aspx page .. and when u use the url http://urSite/ ... it shows the default page, the one u have set and the address in the address bar does not change .. but lets say u have a link within this firstpage which redirects u to another page say .. http//ursite/secondpage.aspx, then this would be shown in the address bar .. unless u r using frames and ur redirect is done within these frames ...

for error handling .. .net provides u with try ... catch .. end try blocks ..
Example in the page load
    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
                ............ ur code here ......
        Catch ex As Exception
            HandleError(ex) ............... HandleError is a global function which handles ur error
        End Try
    End Sub
(read more about this in MSDN)
use these within ur code to catch any exception .. the handlerror function mentioned above could log the error to text files, database, windows log event, send mails etc ..

Author Comment

ID: 13427397

Thanks for the information, please kindly guide me on how we can achieve the code part for catching error and loging them to a text file in the web server.

log format:
sql query- (if this was the process that returned an error)
site navigated-
event triggered-(which function or sub)
error number-
error details- (which line in the programing code)


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question