locked
RewritePath RRS feed

  • Question

  • User-1698182716 posted
    Hello!

    I'm trying to use RewritePath (<mshelp:link tabindex="0" xmlns:mshelp="http://msdn.microsoft.com/mshelp" keywords="T:System.String">string</mshelp:link> path,<mshelp:link tabindex="0" xmlns:mshelp="http://msdn.microsoft.com/mshelp" keywords="T:System.Boolean">bool</mshelp:link> rebaseClientPath) method with rebaseClientPath argument set to true. While debugging everything goes well (all file paths on page are rewritten, also included css and image files)... but in production enviroment everything goes wrong. Aspx file path is rewritten but not css and image files.

    Can anybody help me, please?

    Thanks and regards

    David
    Wednesday, June 28, 2006 4:49 AM

All replies

  • User-2001980297 posted

    Are you using asp.net 2.0? To asp.net 2.0, it is normal. The development server is different from IIS. For development server, each request is passed to asp.net engine to handle. However, for IIS, only asp.net related request (for example, aspx,asmx) is passed to asp.net engine. Those static files (jpg, css) is handled by IIS and returned to client directly. That is the problem.

    There are two solutions, I think.

    1, For static files, use absolute path rather than relative path.

    2. In IIS, map the static files to asp.net engine anf let asp.net to handle it.

    Thursday, June 29, 2006 3:44 AM