Hi Tom,
 
Thanks very much for your lengthy reply. I'm afraid I ended up getting
sidetracked into something else these last few days so haven't been able to
digest what you wrote.
 
I have now succeeded in setting up my new MG app out of the web root so no
XML cong files are exposed and have configured it so that only index.cfm and
application.cfm are sitting in the wwwroot of inetpub, with IIS settings
pointing to the c:\inetpub\wwwroot\myApp. Note, I have no virtual
directories set in IIS.
 
I have now resolved this issue and would like to just outline the steps that
I took for future reference:
 
1. Set mapping in CF Admin named "myAppMapping"  for the c:\myapps\myApp
path
2. Add the code (or at least uncomment it) in index.cfm <cfset
ModelGlue_LOCAL_COLDSPRING_PATH =
expandPath("/myAppMapping/config/ColdSpring.xml") />
3. In ColdSpring set the properties:

<property
name="configurationPath"><value>/myAppMapping/config/modelglue.xml</value></
property>
<property name="viewMappings"><value>/myAppMapping/views</value></property>
 
4. Set <controller name="MyController"
type="myAppMapping.controller.Controller"> in ModelGlue.xml
 
All works perfectly.
 
Thanks for your help.
 
I'll now send you a beer if you give me a paypal email address to send it to
;-)
 
 

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Tom McNeer
Sent: Wednesday, November 12, 2008 5:50 AM
To: [email protected]
Subject: [Model-Glue] Re: Weird error - Follow on from: Best way to deploy
ModelGlue:Unity apps?


Tom,

A few things: as you probably know, you have kind of a non-standard setup.
Generally, most Model-Glue apps are either set up with A) everything at the
root of the site, so no mappings are involved, or B) have nothing in the
web-accessible root except what's absolutely necessary -- index.cfm,
Application.cfc, javascript files, images, stylesheets -- stuff like that.
In the latter case, all the frameworks, all the config files, and the
controllers/model/views are outside the web root, and mapped.

Now -- I understand that your main concern is securing the XML. There's
nothing wrong with doing that alone. I just thought I'd differentiate the
common setups.

Okay -- so -- the IIS stuff doesn't apply. Get rid of the virtual
directories, because ColdFusion doesn't know from IIS virtual directories.
The only way CF knows the location of anything except by means of true paths
is through CF mappings.

You started out by saying, "I was messing around with moving the config
files ...."

That suggests that the app worked before you moved the files. Did it? If so,
start by putting it back the way it worked.

Then slowly and methodically, move forward.

Kill the virtual directories in IIS. Leave the IIS setup for the site
itself. That will mean that a request to http://www.myappsdomain.com will
hit the file at C:\inetpub\wwwroot\myapp\index.cfm, right?

Lose the CF mapping for /myapp. The only thing there would be the config
directory, right?

Everything should still be working.

Now -- move the config directly out of the web root, anywhere you want.
Frankly, I can't remember whether you can map the path in CF Admin and have
it read in the property of the XML file, or whether the value must be a true
path.

The "file not found" message always tells you where your setting is
pointing, though. Just modify the config setting, read the error, adjust as
needed.

Maybe it'll help if I give you an example of how my directories are often
configured: I'll have a directory that holds all the files relevant to the
application, other than core framework files. Let's say, in your case, it's
C:\Inetpub\wwwroot\myapp. Within that directory, I have subdirectories for
config, controller, model, views, etc., -- and webroot. The IIS Web site
home directory points to (in this case) C:\Inetpub\wwwroot\myapp\webroot.
Thus all my config files, CFCs and views are not web accessible.

C:\Inetpub\wwwroot\myapp\config
C:\Inetpub\wwwroot\myapp\controller
C:\Inetpub\wwwroot\myapp\model
C:\Inetpub\wwwroot\myapp\views
C:\Inetpub\wwwroot\myapp\webroot

... and so on.

Both ColdSpring.xml and ModelGlue.xml are, of course, in
C:\Inetpub\wwwroot\myapp\config

In my ColdSpring.xml, in the ModelGlue config, I have:
<property
name="configurationPath"><value>../config/ModelGlue.xml</value></property>

... which describes the relative path from index.cfm to the file.

Regardless, you'll be better off to put everything back where it was, and
get it working again. Then move the files, try adjusting mappings, try
changing the path.



-- 
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560





--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---

Reply via email to