/phalanger (in apache) config, seems must start with that .
12 posts
• Page 1 of 2 • 1, 2
/phalanger (in apache) config, seems must start with that .
as documented, the phalanger setup in apache uses
/phalanger
i wanted to change this to something else, i.e.
/snd
but when i do , i get a error
Node cannot be used in configuration file located on virtual path ':machine:' because it defines application wide configuration.
yet i can change it to
/phalanger2
/phalangersnd
and its ok,
for professionalism of a web site URL, i really need to get something
else in there other then /phalanger.
any thoughts?
The phalanger process seems to insist the first letters of the path are "phalanger".
I could use mod_rewrite but not sure i want to use that if it throws in other side effects.
-tl
/phalanger
i wanted to change this to something else, i.e.
/snd
but when i do , i get a error
Node cannot be used in configuration file located on virtual path ':machine:' because it defines application wide configuration.
yet i can change it to
/phalanger2
/phalangersnd
and its ok,
for professionalism of a web site URL, i really need to get something
else in there other then /phalanger.
any thoughts?
The phalanger process seems to insist the first letters of the path are "phalanger".
I could use mod_rewrite but not sure i want to use that if it throws in other side effects.
-tl
- tleslie
- Posts: 32
- Joined: August 3rd, 2012, 4:42 am
Re: /phalanger (in apache) config, seems must start with th
Thats weird. Phalanger on Apache is standard ASP.NET application. It does not even look at the path.
This must be some configuration issue.
This must be some configuration issue.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: /phalanger (in apache) config, seems must start with th
in more experimentation,
i tried /phalange
and it works
/phalang
and nope it gives
System.Configuration.ConfigurationErrorsException: Node cannot be used in configuration file located on virtual path ':machine:' because it defines application wide configuration.
at PHP.Core.PhpConfigurationContext.EnsureApplicationConfig (System.Xml.XmlNode node) [0x00000] in <filename unknown>:0
at PHP.Core.ConfigurationSectionHandler.Create (PHP.Core.PhpConfigurationContext parent, System.Web.Configuration.HttpConfigurationContext context, System.Xml.XmlNode section) [0x00000] in <filename unknown>:0
at PHP.Core.ConfigurationSectionHandler.Create (System.Object parent, System.Object configContext, System.Xml.XmlNode section) [0x00000] in <filename unknown>:0
so the path to kick in phalanger must start with
/phalang<plus whatever>
This has to be something in PHP.Core that is demanding to see this
(for some reason).
as, why else would
/phalanger
/phalangersnd
/phalange
work
and
/phalang
/<anything else>
not work?
conf file is:
root@ublanger:/etc/mono-server4# more mono-server4-hosts.conf
# Default configuration, don't edit it!
<IfModule mod_mono.c>
MonoUnixSocket default /tmp/.mod_mono_server4
MonoServerPath default /usr/bin/mod-mono-server4
AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx .php
MonoApplicationsConfigDir default /etc/mono-server4
MonoPath default /usr/lib/mono/4.0:/usr/lib
Alias /phalang "/var/www-phalanger"
AddMonoApplications default "/phalang:/var/www-phalanger"
<Location /phalang>
SetHandler mono
</Location>
</IfModule>
[above conf doesn't work, simple change /phalang to /phalange and it does.
-tl
i tried /phalange
and it works
/phalang
and nope it gives
System.Configuration.ConfigurationErrorsException: Node cannot be used in configuration file located on virtual path ':machine:' because it defines application wide configuration.
at PHP.Core.PhpConfigurationContext.EnsureApplicationConfig (System.Xml.XmlNode node) [0x00000] in <filename unknown>:0
at PHP.Core.ConfigurationSectionHandler.Create (PHP.Core.PhpConfigurationContext parent, System.Web.Configuration.HttpConfigurationContext context, System.Xml.XmlNode section) [0x00000] in <filename unknown>:0
at PHP.Core.ConfigurationSectionHandler.Create (System.Object parent, System.Object configContext, System.Xml.XmlNode section) [0x00000] in <filename unknown>:0
so the path to kick in phalanger must start with
/phalang<plus whatever>
This has to be something in PHP.Core that is demanding to see this
(for some reason).
as, why else would
/phalanger
/phalangersnd
/phalange
work
and
/phalang
/<anything else>
not work?
conf file is:
root@ublanger:/etc/mono-server4# more mono-server4-hosts.conf
# Default configuration, don't edit it!
<IfModule mod_mono.c>
MonoUnixSocket default /tmp/.mod_mono_server4
MonoServerPath default /usr/bin/mod-mono-server4
AddType application/x-asp-net .aspx .ashx .asmx .ascx .asax .config .ascx .php
MonoApplicationsConfigDir default /etc/mono-server4
MonoPath default /usr/lib/mono/4.0:/usr/lib
Alias /phalang "/var/www-phalanger"
AddMonoApplications default "/phalang:/var/www-phalanger"
<Location /phalang>
SetHandler mono
</Location>
</IfModule>
[above conf doesn't work, simple change /phalang to /phalange and it does.
-tl
- tleslie
- Posts: 32
- Joined: August 3rd, 2012, 4:42 am
Re: /phalanger (in apache) config, seems must start with th
tleslie wrote:System.Configuration.ConfigurationErrorsException: Node cannot be used in configuration file located on virtual path ':machine:' because it defines application wide configuration.
at PHP.Core.PhpConfigurationContext.EnsureApplicationConfig (System.Xml.XmlNode node)
This exception is thrown when configuration is nested within subfolder of web application.
Moreover the path ':machine:' is definitely wrong. ':machine:' string as a virtual path may cause issues similar to yours, so I guess this should be fixed in Apache itself (but we can workaround it in Phalanger)
Are you running Windows (.NET) or Linux (Mono)? Maybe on windows/apache, internally, ':machine:' as a virtual path is used instead of empty string on root web.config? ... i guess
(ref. HttpConfigurationContext.VirtualPath Property)
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: /phalanger (in apache) config, seems must start with th
its on linux/apache/mono
The fact it keys in on /phalange[....]
as needed, and anything else fails,
not sure how it can be a apache issue?
on windows iis setup, it doesn't care about a v-path in front or whatever it may
be. (i use /snd on windows, or /, both work).
-tl
The fact it keys in on /phalange[....]
as needed, and anything else fails,
not sure how it can be a apache issue?
on windows iis setup, it doesn't care about a v-path in front or whatever it may
be. (i use /snd on windows, or /, both work).
-tl
- tleslie
- Posts: 32
- Joined: August 3rd, 2012, 4:42 am
Re: /phalanger (in apache) config, seems must start with th
I think this is the relevant code,
in particular why this logic?:
virtualPath.Length > HttpRuntime.AppDomainAppVirtualPath.Length
i seem to have "/phalanger" or "phalanger" in one of the strings,
and if i have anything shorter the "phalanger".Lenght() in other,
kaboom? I am just not sure what value this logic is?
I believe virtualPath is what is in the apache mod mono config,
but where is HttpRuntime.AppDommainAppVirtualPath set,
seems if they match in length, or one is longer, i am fine.
public bool IsSubApplicationConfig()
{
return virtualPath != null && virtualPath.Length > HttpRuntime.AppDomainAppVirtualPath.Length;
}
/// <summary>
/// Checks whether the context is associated with the Machine.config file.
/// </summary>
/// <returns>Whether the configuration is machine wide.</returns>
public bool IsMachineConfig()
{
return virtualPath == null;
}
/// <summary>
/// Ensures that the configuration is stated on at least application level since it cannot be
/// used in sub-application one.
/// </summary>
/// <param name="node">The node.</param>
/// <exception cref="ConfigurationErrorsException">We are on sub-application level.</exception>
public void EnsureApplicationConfig(XmlNode node)
{
if (IsSubApplicationConfig())
{
throw new ConfigurationErrorsException(CoreResources.GetString("invalid_node_location", virtualPath,
CoreResources.GetString("defines_app_wide_config")), node);
}
}
/// <summary>
/// Ensures that the configuration is stated on the machine level.
/// </summary>
/// <param name="node">The node.</param>
/// <exception cref="ConfigurationErrorsException">We are not on machine level.</exception>
public void EnsureMachineConfig(XmlNode node)
{
if (!IsMachineConfig())
{
throw new ConfigurationErrorsException(CoreResources.GetString("invalid_node_location", virtualPath,
CoreResources.GetString("defines_app_wide_config")), node);
}
}
in particular why this logic?:
virtualPath.Length > HttpRuntime.AppDomainAppVirtualPath.Length
i seem to have "/phalanger" or "phalanger" in one of the strings,
and if i have anything shorter the "phalanger".Lenght() in other,
kaboom? I am just not sure what value this logic is?
I believe virtualPath is what is in the apache mod mono config,
but where is HttpRuntime.AppDommainAppVirtualPath set,
seems if they match in length, or one is longer, i am fine.
public bool IsSubApplicationConfig()
{
return virtualPath != null && virtualPath.Length > HttpRuntime.AppDomainAppVirtualPath.Length;
}
/// <summary>
/// Checks whether the context is associated with the Machine.config file.
/// </summary>
/// <returns>Whether the configuration is machine wide.</returns>
public bool IsMachineConfig()
{
return virtualPath == null;
}
/// <summary>
/// Ensures that the configuration is stated on at least application level since it cannot be
/// used in sub-application one.
/// </summary>
/// <param name="node">The node.</param>
/// <exception cref="ConfigurationErrorsException">We are on sub-application level.</exception>
public void EnsureApplicationConfig(XmlNode node)
{
if (IsSubApplicationConfig())
{
throw new ConfigurationErrorsException(CoreResources.GetString("invalid_node_location", virtualPath,
CoreResources.GetString("defines_app_wide_config")), node);
}
}
/// <summary>
/// Ensures that the configuration is stated on the machine level.
/// </summary>
/// <param name="node">The node.</param>
/// <exception cref="ConfigurationErrorsException">We are not on machine level.</exception>
public void EnsureMachineConfig(XmlNode node)
{
if (!IsMachineConfig())
{
throw new ConfigurationErrorsException(CoreResources.GetString("invalid_node_location", virtualPath,
CoreResources.GetString("defines_app_wide_config")), node);
}
}
- tleslie
- Posts: 32
- Joined: August 3rd, 2012, 4:42 am
Re: /phalanger (in apache) config, seems must start with th
I guess there is ':machine:' as virtual path instead of null.
The code checks whether the application runs nested of root machine application (because some configuration is not allowed for nested apps).
The code checks whether the application runs nested of root machine application (because some configuration is not allowed for nested apps).
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: /phalanger (in apache) config, seems must start with th
Any ideas where i would find :machine: ?
but doesn't the fact it works on
/phalange
/phalanger
/phalanger<...>
but not
/phalang
/phalan
seem to still point partially to a phalanger code bug?
-tl
but doesn't the fact it works on
/phalange
/phalanger
/phalanger<...>
but not
/phalang
/phalan
seem to still point partially to a phalanger code bug?
-tl
- tleslie
- Posts: 32
- Joined: August 3rd, 2012, 4:42 am
Re: /phalanger (in apache) config, seems must start with th
I think, the length of the path matters, not it does start with "phalange".
Also I guess ":machine:" is some Apache/Mod_AspDotNet "feature". Are you running Windows/Apache/Mod_AspDotNet or Linux/Apache/Mod_Mono ? There might be something with mod_aspdotnet. (When using IIS, Phalanger gets relative path of the config file.)
Also I guess ":machine:" is some Apache/Mod_AspDotNet "feature". Are you running Windows/Apache/Mod_AspDotNet or Linux/Apache/Mod_Mono ? There might be something with mod_aspdotnet. (When using IIS, Phalanger gets relative path of the config file.)
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: /phalanger (in apache) config, seems must start with th
this is occurring on linux/mono environment,
with mod_mono
-tl
with mod_mono
-tl
- tleslie
- Posts: 32
- Joined: August 3rd, 2012, 4:42 am
12 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 23 guests