locked
HttpModul doesn't work on server RRS feed

  • Question

  • User-1380475428 posted

     Hi Any one.

    I use a httpmodule for urlRewriting in my web site.

    At local i use a "SimpleRewriter" class in App_code and Set

    Webconfig as here:

    <add name="SimpleRewriter" type="SimpleRewriter, App_Code"/>

    But When i Upload my site on server it doesn't work and give Some Error as "Page Requested not found".

    I think on server asp.net doesn't have reach to my module and cant access it.

    Any help?

    Thanks.

    Friday, November 28, 2008 9:02 AM

Answers

  • User-1380475428 posted

     Thank you .My problem Solved.

    We must set Out http module in webServer Section for iis7.

    But there is some error on a page.

    Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.

     

    I use session in another page .But i think because i using url rewrite in a module and came to this page from that module i lost session!!!

    Any help or idea?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 28, 2008 11:48 AM

All replies

  • User-99544339 posted
    Do you have some more error info? maybe you can find some in the eventlog.
    Friday, November 28, 2008 9:31 AM
  • User-1380475428 posted

     

    Thanks for your kidnes.

    HTTP Error 404.0 - Not Found

    The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

    <fieldset><legend>Detailed Error Information</legend>
    Module IIS Web Core
    Notification MapRequestHandler
    Handler StaticFile
    Error Code 0x80070002
    Requested URL http://www.DDDD.com:80/Preview-Champaign-title1-1
    Physical Path E:\web\DDDD\htdocs\Preview-Champaign-title1-1
    Logon Method Anonymous
    Logon User Anonymous
    </fieldset>
    <fieldset><legend>Most likely causes:</legend>
    • The directory or file specified does not exist on the Web server.
    • The URL contains a typographical error.
    • A custom filter or module, such as URLScan, restricts access to the file.
    </fieldset>
    <fieldset><legend>Things you can try:</legend>
    • Create the content on the Web server.
    • Review the browser URL.
    • Create a tracing rule to track failed requests for this HTTP status code and see which module is calling SetStatus. For more information about creating a tracing rule for failed requests, click here.
    </fieldset><fieldset>I change my module to reditect all request to see if it work,But no thing happend.</fieldset><fieldset>If i request For a url that need to be rewriten the server dont send it to my modul for change and rewrite it and so it rais error.</fieldset><fieldset>for example carslist/2/3 must be rewrited to carslist?cat?=2&mad=3</fieldset><fieldset>but my module cant reach it to rewrite request.
    </fieldset>
    Friday, November 28, 2008 9:45 AM
  • User-99544339 posted

    Can you post some code?

    Does it work on your local machine?

    You can also use a open source alternative, you can download it here: http://urlrewriter.net/

    Friday, November 28, 2008 10:54 AM
  • User-1380475428 posted

     Thank you .My problem Solved.

    We must set Out http module in webServer Section for iis7.

    But there is some error on a page.

    Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration.

     

    I use session in another page .But i think because i using url rewrite in a module and came to this page from that module i lost session!!!

    Any help or idea?

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, November 28, 2008 11:48 AM
  • User-99544339 posted

    Did you remove all modules? or turned the session off?

    Monday, December 1, 2008 3:13 AM