Hello peoples,
Php expert, but IIS noob here....
I'm currently learning c# by porting a PHP class to .net, with the last .net 3.5 version of the framework.
Everything's fine, but I struggle to a simple thing: how to install and configure IIS on windows XP to run ASP.Net applications ?
When I've installed the Visual Studio Express edition, a small web server comes bundled with it (ASP .net development server) , which is launched when I ask VS to display the site.
So far, Ok.
But now, I would like to map every "/xsl/" requests to a resource subfolder of my project, how do I do that ?
In apache, I was using
Code:
RewriteRule ^xsl/(.*)$ /libs/xml/xsl.php?path=$1 [NC,L]
I have found this page:
http://msdn2.microsoft.com/en-us/library/ms972974.aspx
Which is at the same time so overloaded with informations and so sparse about where and how to implement them that I don't understand the way to go...
I thought that using the ISAPI level of rewritting would be the simplier, so, as advised by the article, I have added the module and the handler
Code:
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add verb="*" path="*.aspx" type="URLRewriter.RewriterFactoryHandler, URLRewriter" />
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add type="URLRewriter.ModuleRewriter, URLRewriter" name="ModuleRewriter" />
</httpModules>
Now, the article says that I must add a <rewriterConfig> section, but where ???
At which level into that web.config file should I put it. I've tried several levels (sibling of the modules and handler definition, and as a sibling of the first level) but it just won't do...
Am I missing something obvious ???
Oh, and thanks not flaming me (too much) about my noobness....
I'm not used to it anymore... It's what happens when you become the reference amongst your colleagues and you start a whole new language again...
Thanks.
Thierry.