IIS support

483 views
Skip to first unread message

Bilal

unread,
Nov 26, 2011, 2:52:12 PM11/26/11
to mod_cfml
Jordan,
I posted a new version of the BonCode IIS connector which has the
support for the new header you need (x-tomcat-docroot).
I have added a setting flag that is for now called
EnableHeaderDataSupport.
Thus, to enable this you would need to add the following to setting
file:
<EnableHeaderDataSupport>True</EnableHeaderDataSupport>

Best,
Bilal

Jordan Michaels

unread,
Nov 26, 2011, 8:20:30 PM11/26/11
to mod cfml
Awesome! I will install and test soon! Thank you *so much* for your support!

-Jordan

Jordan Michaels

unread,
Jan 6, 2012, 5:28:59 PM1/6/12
to mod_...@googlegroups.com
Hey Bilal,

Okay, I'm testing this and there is a problem with the docroot that's
being sent. The docroot that gets sent needs to be the docroot of the
currently requested host, but the connector appears to be returning the
docroot of the default host and not the docroot of the requested host:

Here's what's being returned in the railo-stdout[date].log

----------------
DocRoot Value => C:\inetpub\wwwroot\
Host Value => utdream.org
----------------

but the actual docroot for the utdream.org domain is (screen shot):
C:\inetpub\utdream.org

The mod_cfml valve has it's own issues on Windows too. It looks like the
Tomcat Home directory is resolving differently on Windows then it does
on Linux, so the valve is attempting to create context files in the
windows system32 directory. >.<

----------------
Creating Directory: C:\Windows\System32\conf\Catalina\utdream.org
Creating Context File:
C:\Windows\System32\conf\Catalina\utdream.org/ROOT.xml
----------------

I'll have to be more specific I guess. So... while you can test with the
Alpha3 valve I posted (via the logs), it doesn't actually work yet either.

Warm Regards,
Jordan Michaels

utdream-org_testhome.png

Bilal S

unread,
Jan 6, 2012, 5:38:57 PM1/6/12
to mod_...@googlegroups.com
OK.
I will look this weekend.

Jordan Michaels

unread,
Jan 6, 2012, 5:41:54 PM1/6/12
to mod_...@googlegroups.com
Thank you! =)

Warm Regards,
Jordan Michaels

On 01/06/2012 02:38 PM, Bilal S wrote:
> OK.
> I will look this weekend.
>
> On Fri, Jan 6, 2012 at 5:28 PM, Jordan Michaels <jor...@viviotech.net
> <mailto:jor...@viviotech.net>> wrote:
>
> Hey Bilal,
>
> Okay, I'm testing this and there is a problem with the docroot
> that's being sent. The docroot that gets sent needs to be the
> docroot of the currently requested host, but the connector appears
> to be returning the docroot of the default host and not the docroot
> of the requested host:
>
> Here's what's being returned in the railo-stdout[date].log
>
> ----------------
> DocRoot Value => C:\inetpub\wwwroot\

> Host Value => utdream.org <http://utdream.org>
> ----------------
>
> but the actual docroot for the utdream.org <http://utdream.org>
> domain is (screen shot):
> C:\inetpub\utdream.org <http://utdream.org>


>
> The mod_cfml valve has it's own issues on Windows too. It looks like
> the Tomcat Home directory is resolving differently on Windows then
> it does on Linux, so the valve is attempting to create context files
> in the windows system32 directory. >.<
>
> ----------------

> Creating Directory: C:\Windows\System32\conf\__Catalina\utdream.org
> <http://utdream.org>
> Creating Context File:
> C:\Windows\System32\conf\__Catalina\utdream.org/ROOT.xml
> <http://utdream.org/ROOT.xml>


> ----------------
>
> I'll have to be more specific I guess. So... while you can test with
> the Alpha3 valve I posted (via the logs), it doesn't actually work
> yet either.
>
> Warm Regards,
> Jordan Michaels
>
> On 11/26/2011 11:52 AM, Bilal wrote:
>
> Jordan,
> I posted a new version of the BonCode IIS connector which has the
> support for the new header you need (x-tomcat-docroot).
> I have added a setting flag that is for now called
> EnableHeaderDataSupport.
> Thus, to enable this you would need to add the following to setting
> file:

> <EnableHeaderDataSupport>True<__/EnableHeaderDataSupport>
>
> Best,
> Bilal
>
>

Jordan Michaels

unread,
Jan 6, 2012, 6:03:49 PM1/6/12
to mod_...@googlegroups.com
Attached is a working valve jar for Windows. It resolves the tomcat home
directory correctly on both Windows and Linux.

Will be helpful to test with one that works I think. ;)

Thank you again!

Warm Regards,
Jordan Michaels

mod_cfml-valve.jar

Bilal S

unread,
Jan 7, 2012, 11:48:15 AM1/7/12
to mod_...@googlegroups.com
Jordan,
I am not able to recreate this.
I changed an existing site and recreated a new site and both times things seem to be working.

Can I get get some more background on the type of server (windows version?, bit type, application pool version on IIS, .net version installed?)

I am assuming you are using v0.9.2.7?

-Bilal
docroot2.gif
docroot1.gif

Jordan Michaels

unread,
Jan 7, 2012, 11:59:29 AM1/7/12
to mod cfml
Hi Bilal,

Thanks for looking into this for me. I was using a Win 7 pro VirtualBox image and it was all pretty much out of the box. I installed Win 7, installed IIS, Installed Railo, and then downloaded the latest connector from tomcatiis.riaforge.com. I then ran the connector installer. All seemed to go well. I added the settings file to the BIN directory in the default site to add the custom property, and then installed the mod_cfml valve. I set up a dummy utdream.org domain and tried to get the connector to add it, and ran into the issue I mentioned.

I'll try it again on my home computer and see if I can get it again. That way I can give you specific details.

Thanks again for taking the time to look into this with me!

-Jordan

-Bilal


Thank you! =)

Warm Regards,
Jordan Michaels

<mailto: jor...@viviotech.net >> wrote:

Hey Bilal,

----------------
Creating Directory: C:\Windows\System32\conf\__ Catalina\ utdream.org

< http://utdream.org >
Creating Context File:

C:\Windows\System32\conf\__ Catalina\ utdream.org/ROOT.xml

Jordan Michaels

unread,
Jan 7, 2012, 10:12:52 PM1/7/12
to mod cfml
Okay, I tried the same thing at home here, but this time I forgot to create the dummy utdream.org host until after I installed the boncode connector. I got the following error:

####################################
Server Error in '/' Application.
--------------------------------------------------------------------------------

Could not load type 'BonCodeIIS.BonCodeCallHandler'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Could not load type 'BonCodeIIS.BonCodeCallHandler'.

Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace:
[HttpException (0x80004005): Could not load type 'BonCodeIIS.BonCodeCallHandler'.]
System.Web.Compilation.BuildManager.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase) +11245200
System.Web.Configuration.HandlerFactoryCache.GetHandlerType(String type) +23
System.Web.Configuration.HandlerFactoryCache..ctor(String type) +25
System.Web.HttpApplication.GetFactory(String type) +91
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +338
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +263

--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5456
####################################

I'll try re-installing the connector again to see if anything changes, but thought you might appreciate a bug report.

Regarding the application pool, when I created the dummy utdream.org host it looked like it created it's own application pool just for the site. I admit I don't use IIS much other then testing things on it, so I'm just guessing this is what happened on the Windows 7 instance I had in the VirtualBox VM as well.

As always, thanks for your hard work on this.

Jordan Michaels

unread,
Jan 8, 2012, 2:06:15 AM1/8/12
to mod cfml
Hi Bilal,

Okay, I got it working. The problem had to do with my ignorance on how your connector works. I didn't realize the BIN directory had to be created in each site and that the settings had to be copied over as well. After playing with it a bit it's got a lot of the same concepts as the isapi_redirect, but it implements them in nicer ways. =)

I don't suppose there's a way to make the BonCode connector automatically apply to every site (even ones created after install) on a system is there?

Either way, the good news is that mod_cfml works great with the BonCode Connector. Thank you!

-Jordan

----- Original Message -----
From: "Bilal S" <bilal...@gmail.com>
To: "mod cfml" <mod_...@googlegroups.com>
Sent: Saturday, January 7, 2012 8:48:15 AM
Subject: Re: [mod_cfml] IIS support - for Bilal

-Bilal


Thank you! =)

Warm Regards,
Jordan Michaels

<mailto: jor...@viviotech.net >> wrote:

Hey Bilal,

----------------
Creating Directory: C:\Windows\System32\conf\__ Catalina\ utdream.org

< http://utdream.org >
Creating Context File:

C:\Windows\System32\conf\__ Catalina\ utdream.org/ROOT.xml

Bilal S

unread,
Jan 8, 2012, 11:26:30 AM1/8/12
to mod_...@googlegroups.com
Cool. 
Glad to hear it.

You could install the dlls into the global assembly cache. This would make them available throughout windows and you would not need to copy files.
This requires a recompile of the project with strong named and signed key pairs. It would make it hard for other people to build it from source as the steps become very involved.
I will experiment to see whether this can be decoupled easily.

I am making some changes to get the v.1 ready in the next few weeks since we have been in beta for 9 month and the reported errors have declined substantially. Mainly installer related, but also some cleanups on timeouts and defaults.

Best,
Bilal

Bilal S

unread,
Jan 8, 2012, 1:22:18 PM1/8/12
to mod_...@googlegroups.com
Jordan:
I posted an update (0.9.2.8) which has signed files to allow for it to be deployed server wide one time (all sites) in the global assembly cache. This is probably v.1 release candidate. Should make install easier if that is the goal (more like Adobe CF).

I am working on the updated installer routines at the moment.

Best,
Bilal



On Sun, Jan 8, 2012 at 2:06 AM, Jordan Michaels <jor...@viviotech.net> wrote:

Jordan Michaels

unread,
Jan 8, 2012, 3:17:46 PM1/8/12
to mod cfml
Awesome! This is excellent news! Are the basic steps to install it the same or what would the steps be to install the connector in the global assembly cache?

Or, maybe I should just wait for your updated installer and test with you on that one? =)

Happy to help test, just need some basic direction at first. As always, thanks for your excellent work here! Exciting times...

Bilal S

unread,
Jan 9, 2012, 9:04:24 AM1/9/12
to mod_...@googlegroups.com
No problem.
It's going to be couple of weekends for me to finish this. But here is my take on GAC installs:

The steps are slightly different the main problem will be getting the installation done.

You will have to download the .net SDK:
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=19988

Use the
"Microsoft .NET Framework Configuration" control panel app to manage the GAC. This is the easiest way to do this for testing.

Right Click on the "Assembly Cache" node and select "Add..." from the menu. Then point to the connector dll files. That should do the trick.

For installation with Bitrock Installers you will need a little utility program also in the SDK called gacutil.exe.
Use is described here:
http://msdn.microsoft.com/en-us/library/ex0ss12c%28v=vs.71%29.aspx

Most windows centric installers have already a built in mechanism for deployment in GAC so they would not need to use gacutil.exe.

The next change is in how you reference the handlers in the handlers section of IIS. If you do this for the IIS server root it will propagate to all websites.

In the "type" declaration of the managed handler in IIS instead of:

BonCodeIIS.BonCodeCallHandler

use the full strong name of the assembly (ideally it should be selectable from the drop down menu):

BonCodeIIS.BonCodeCallHandler, BonCodeIIS, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ad590a40d40745cf

That's all there is to it. If you create new sites everything keeps on working, no more messing with any settings etc.

Best,
-Bilal
Reply all
Reply to author
Forward
0 new messages