Running .do files as .aspx

Discussion in 'ASP.NET / ASP.NET Core' started by icedeocampo, May 5, 2009.

  1. I have to conform to a specification of my clients, wherein their old application uses .do extension, I have replicated all the necessary functionalities of the old system, and the only thing left to do is to rename my find.aspx to find.do, but when I do this, the find.do gets downloaded off the site.

    Attached is a copy of my web.config file, the web.config files works on my test machine here at work running vista and iis7, however when i upload it to discountasp.net, it won't work.


    Hope you can help me.


    For quick reference, here's what I added to my local machine's web.config

    I have added:

    <compilation>
    <buildProviders>
    <add extension=".do" type="System.Web.Compilation.PageBuildProvider"/>
    </buildProviders>
    </compilation>


    and

    <httphandlers>
    <add verb="*" path="*.do" validate="true" type="System.Web.UI.PageHandlerFactory"/>
    </httphandlers>

    I have added the modifications above to both the root web.config and the web.config in the application directory.
     

    Attached Files:

    • web.zip
      File size:
      2.8 KB
      Views:
      266
  2. Did you map the .do extension to the ASP.Net ISAPI. If you are on an IIS 6 platform you will need to do this. If you are on IIS 7 you do not need to map the extension.
     
  3. I am on IIS7

    http://216.32.60.233/icetest/ice.aspx.do

    you can actually try it out here, and depending on the browser, it will either render it as HTML or have you download the ice.aspx.do file.

    Running properly it should display

    "Hello World"
     
  4. Whats the Pipe line mode you have setup on your account. You can find out by logging into your hosting control panel and go to IIS tools/ASP.Net Version.
     
  5. Integrated,

    I had to set it up using Integrated for some AJAX stuff
     
  6. You should add the handler in the system.webServer/handlers section instead.

    Code:
    <system.webServer>
      <handlers>
        <add name="DO-PageHandlerFactory-Integrated" path="*.do" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode" />
      </handlers>
    <system.webServer>
    
     
  7. I have modified to my web.config file as you suggested but I still can't get it to run.

    Hope to have other ideas
     
  8. Thanks!

    I could have not done without your help!

    I'm glad I chose DISCONTASP.NET

    Thanks Aristotle and raymondp

    Keep up the good work
     

Share This Page