Reply
.net 3.5, c# and IIS: How do Imake everything run together ?
Old 02-13-2008, 05:28 PM .net 3.5, c# and IIS: How do Imake everything run together ?
tripy's Avatar
Fetchez la vache!

Posts: 1,855
Name: Thierry
Location: In the void
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.
__________________
Listen to the ducky: "This is awesome!!!"

tripy is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 05-21-2008, 02:40 AM Re: .net 3.5, c# and IIS: How do Imake everything run together ?
Average Talker

Posts: 26
XP professional disc should comes with IIS. Just install the IIS and make virtual dir there....everything should work fine. do some configuration in IIS if needed.
idisplayforless is offline
Reply With Quote
View Public Profile Visit idisplayforless's homepage!
 
Old 06-08-2008, 03:12 AM Re: .net 3.5, c# and IIS: How do Imake everything run together ?
RabidSniper's Avatar
Skilled Talker

Posts: 57
Name: Jesse
Location: Phoenix, AZ
Right... In XP, use the ADD REMOVE PROGRAMS Admin option and then select Add / Remove windows components. DRill down and install IIS..

After IIS install, download and install all of the .NET frameworks.. make sure you get 2.0, 3.0 and 3.5 and all the Service packs using windows update or something. (thats really the quickest way).

ONce that is done, you can use the IIS MMC Console to create a new virtual directory and "Application". Make sure you go into the .NET Framework tab of the web application properties pane and select Framework 2.0 (it defaults to 1.1).

At that point, IIS will read and understand the web.config file put into its directory.
For example, if I create a new web application in IIS called MYAPP, It would default to pointing to something like c:\inetpub\wwwroot\MYAPP

In that directory, you could manually place (or use some sort of tool like Visual Studio Web Developer) to create a web.config file, that would then do the URL rewriting that the article you linked to, describes.

Hope that helps.

Last edited by RabidSniper : 06-08-2008 at 03:14 AM.
RabidSniper is offline
Reply With Quote
View Public Profile
 
Old 06-10-2008, 02:53 PM Re: .net 3.5, c# and IIS: How do Imake everything run together ?
Learning Newbie's Avatar
Moderator

Latest Blog Post:
What Does This Look Like?
Posts: 4,733
Name: John Alexander
I have to admit, http handlers and the like aren't an area of IIS I'm very familiar with. How goes the progress?
__________________
4 ways to improve the lives of the "bottom billion"

"HEY YOU KIDS GET OFF MY LAWN!" -John McCain
Learning Newbie is online now
Reply With Quote
View Public Profile
 
Old 06-10-2008, 04:31 PM Re: .net 3.5, c# and IIS: How do Imake everything run together ?
tripy's Avatar
Fetchez la vache!

Posts: 1,855
Name: Thierry
Location: In the void
I have to say that I've paused that project a couple of month ago. A necro thread monger revived it.

And since my most advanced service is done in python, I'm currently rewriting a whole site with Django.
It's not as simple as with PHP (but probably because I have almost 10 years of PHP after me) but I'm starting to get where I want.

The only drawback, is that every web framework (or almost) in python assume that you want to use an ORM.
And when 80% of the business logic is in stored procedures, it's a bit like swimming against the river...
__________________
Listen to the ducky: "This is awesome!!!"

tripy is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to .net 3.5, c# and IIS: How do Imake everything run together ?
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12560 seconds with 13 queries