Can you create a .asp page with asp.net

Last post 05-16-2009 11:27 AM by JDL1475. 3 replies.

Sort Posts:

  • Can you create a .asp page with asp.net

    05-15-2009, 10:04 PM
    • Participant
      826 point Participant
    • zoltac007
    • Member since 04-06-2006, 4:25 PM
    • Posts 1,560

    I converted from classic ASP to ASP.NET a while back.  I saw in my stats hundreds of attempts to a page ..../redir.asp

    This page does not exist in the new website but there are many links to it on other website pages.

    It is possible to create an classic .asp page with ASP.NET so I can redirect it to the new /default.aspx homepage?

     

     

     

  • Re: Can you create a .asp page with asp.net

    05-16-2009, 12:59 AM
    • Member
      553 point Member
    • JDL1475
    • Member since 08-21-2008, 8:22 PM
    • Tucson, Arizona, US
    • Posts 124

    Hi there, it should work if you add URL Mappings to your web.config file

    Add something like this to the system.web node of the web.config

            <urlMappings enabled="true">
                <add url="~/redir.asp"
                    mappedUrl="~/default.aspx"/>
            </urlMappings>
     
    If answer returned you're solution, then please return the favor by selecting the answer.

    My blog is coming soon...
    Web Programming Tutorials
    ASP.Net Tutorials
  • Re: Can you create a .asp page with asp.net

    05-16-2009, 1:50 AM
    • Participant
      826 point Participant
    • zoltac007
    • Member since 04-06-2006, 4:25 PM
    • Posts 1,560

    Thank you - that certainly looks like it should work but it does not appear to have any effect. 

    I have this customError mode set - is it overriding the urlMappings code?

    <customErrors mode="RemoteOnly" defaultRedirect="ProgramErrorPage.aspx">
    <
    error statusCode="404" redirect="ProgramErrorPage.aspx"/>
    </
    customErrors>

     

  • Re: Can you create a .asp page with asp.net

    05-16-2009, 11:27 AM
    • Member
      553 point Member
    • JDL1475
    • Member since 08-21-2008, 8:22 PM
    • Tucson, Arizona, US
    • Posts 124

    I don't think the custom error has anything to do with it not working.  For some reason it worked on my localhost, but I just read that urlMappings are only for .Net extensions, so if that is the case then that would be the issue.

    However, I think this article has exactly what you should need.


    URL Rewrites:

    http://www.codeproject.com/KB/aspnet/urlrewriter.aspx

     

    If answer returned you're solution, then please return the favor by selecting the answer.

    My blog is coming soon...
    Web Programming Tutorials
    ASP.Net Tutorials
Page 1 of 1 (4 items)