2.0 and Custom Error Pages

C

cpnet

I'm playing with the last Beta for VS 2005 and trying to build an ASP.NET
web app. I have been using the built-in development web server so far, but
I think I may need to switch to IIS. The reason is that I want to redirect
404 errors to an .aspx page that will do some special handling of that
article (based on an article from asp.NET magazine). I couldn't figure out
a way to customize the error pages for the built in webserver. If there is
a way to do this, I'd prefer to avoid IIS for now, but if not...

I'm running IIS on a XP Pro SP2 (so I'm assuming it's IIS 5). It looks like
the Visual Studio install installed ASP.NET into IIS. I've used the Visual
Studio "Copy Web Site...", tool to copy my website to my local IIS server.
That did seem to create the directories and move all files. However, when I
try to browse to http://localhost/res/default.asp, I get an error message
of, "The XML page cannot be displayed". So it seems IIS doesn't realize
that this is an .aspx page it should compile and run, rather than server
raw. I'm not sure how to set this up properly. Once I get my project
basically working, what do I need to do to allow debugging (i.e. so I can
use my local IIS as my development web server)? Once that's all figured
out, I think I know how to do the 404 redirection.

Thanks
 
C

cpnet

Well, this was pretty easy. Once I had used the VS2005 tool to copy my app
to the local IIS server, I simply had to close it, and then use "Open | Web
Project..." and choose local IIS, and browse to the newly copied website.
VS2005 then asked me if it should set up IIS for the ASP.NET app, I said
yes, and it worked! (Well I had to enable Windows Authentication for the
root folder for my IIS web app to get debugging to work, but after that it
was great.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top