List Info

Thread: .Net 2.0 Sp1 breaks http path for config file in appdomain?




.Net 2.0 Sp1 breaks http path for config file in appdomain?
country flaguser name
United States
2007-12-06 10:33:34
Hello,

I'm having a problem where our application breaks after
installing .Net 2.0
SP1.

Using reflector I see there are code changes in the
System.Uri Class,
specifically this method:

InitializeUri(ByVal err As ParsingError, ByVal uriKind As
UriKind, <Out>
ByRef e As UriFormatException)

This method (after SP1) now makes a call to
"InitializeUriConfig" (which is
new in SP1).

Our application has a stub launcher, which creates a second
AppDomain and
specifies a config file with an http path.
Inside InitalizeUriConfig there is the following call
stack...
    -->Private Shared Sub GetConfig(ByRef idnScope As
UriIdnScope, ByRef
iriParsing As Boolean)
    -->Private Shared Sub ParseConfigFile(ByVal file As
String, <Out> ByRef
idnStateConfig As IdnScopeFromConfig, <Out> ByRef
iriParsingConfig As
IriParsingFromConfig)
    -->FileIOPermission ctor
    -->AddPathList(access, pathListOrig, False, True,
False)
    -->Me.AddPathList(access, AccessControlActions.None,
pathListOrig,
checkForDuplicates, needFullPath, copyPathList)
    -->Friend Shared Function
CreateListFromExpressions(ByVal str As
String(), ByVal needFullPath As Boolean) As ArrayList

CreateListFromExpressions then throws an
"ArgumentException" with
"AbsolutePathRequired"...

Is this a new thing in SP1, only local .config files are
supported?
The following is the code that performs the testing on the
path to the
config file and then throws the exception....

If (((((path.Length < 3) OrElse (path.Chars(1) <>
":"c)) OrElse
(path.Chars(2) <> ""c)) OrElse
(((path.Chars(0) < "a"c) OrElse
(path.Chars(0) > "z"c)) AndAlso ((path.Chars(0)
< "A"c) OrElse
(path.Chars(0) > "Z"c)))) AndAlso
(((path.Length < 2) OrElse (path.Chars(0)
<> ""c)) OrElse (path.Chars(1) <>
""c))) Then
   Throw New
ArgumentException(Environment.GetResourceString("Argume
nt_AbsolutePathRequir
ed"))
End If

It looks like it only supports local drive letters.

I can't believe we're the only ones using an http path for a
config file for
an application.

And i can't believe that System.Uri is not supporting an
http path.  I
suspect that either I missed something, or this is a
breaking chage that
"will" be documented in the release notes.

Does anyone have any insight as to why this change would
have been made.  I
can't find "any"  release notes for the SP1
release of .Net 2.0.
Is anyone able to at least confirm my findings so I know I'm
not going mad?

Thanks
Phil

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


Re: .Net 2.0 Sp1 breaks http path for config file in appdomain?
user name
2007-12-06 10:58:21
<snip>

> Is anyone able to at least confirm my findings so I
know I'm not going mad?

We got bitten by the change to the Uri class. Fortunately,
our unit
tests picked it up, and it was a straight-forward change
(from memory,
I think we were building up a uri, and had ended up with
two
consecutive '/'s, which the class now decided it didn't
like).

Can't comment about the config processing - we do our own,
and that
works very nicely via HTTP (and file access &c).

John

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )