Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

.aspx extension names of web pages

Posted on 2005-02-26
5
Medium Priority
?
406 Views
Last Modified: 2013-11-19
Hi,

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 ?

Thanks.
0
Comment
Question by:lynnton
5 Comments
 
LVL 9

Assisted Solution

by:Joeisanerd
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.
0
 
LVL 1

Author Comment

by:lynnton
ID: 13411186
Joeisanerd,

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)

Thanks.
0
 
LVL 6

Accepted Solution

by:
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..

REgards.
MaulikCE
0
 
LVL 26

Assisted Solution

by:Rejojohny
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
        Try
                ............ 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 ..
0
 
LVL 1

Author Comment

by:lynnton
ID: 13427397
maulikCE,

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:
date-
time-
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)

Thanks.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

571 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