Ask a Question related to ASP.NET General, Design and Development.
-
Lucas Fletcher #1
how to reference assemblies from web.configs in subdirs?
Hello,
I was wondering how I can reference assemblies from web.config files
residing in subdirectories without having to create a new project for each
web.config-containing subdirectory?
I would like to use an HttpModule, but only for files in a particular
directory, so I add a web.config file containing this:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<httpModules>
<add name="MessageAuthenticatorModule"
type="Din.MessageAuthenticator,localhost"/>
</httpModules>
</system.web>
</configuration>
to the proper subdirectory. The problem is that the localhost.dll cannot be
found for some reason, even though the web.config file should be part of the
main web project. I really don't want to have to register anything in the
GAC.
Another question: if I have to resort to creating another web project with
its root located at the subdirectory mentioned above, does the web.config
file still inherit values from the main web project? If not, which I suspect
is the case, then creating a separate project is not much of an alternative.
Thank you,
--
Lucas Fletcher
[email]lucas@dealersinnotions.com[/email]
[url]http://dealersinnotions.com[/url]
Lucas Fletcher Guest
-
Net:TFTPd questions - Want to upload configs via TFTP
I am writing a script that will log into my network equipment and backup the configurations to a TFTP server. Since I don't want the security risk... -
Are MS Assemblies in the GAC?
I want to create strongly signed support assemblies so they can be shared by different ASP.NET web apps. This requires that they be installed into... -
Too many assemblies asp.net
I have been developing several web applications in VB.NET. I have started to notice that when I run one of the applications, all the assemblies for... -
Can't reference Assemblies in GAC?
I've just created a simple class library, gave it a strong name using sn.exe, then copied it to c:\winnt\assembly directory. I then created an ASP... -
multiple net configs on laptop
I'm running into divergent opinions and advice... Here's the background info and problem: Laptop with XP Pro configured to logon a Domain at one... -
Lucas Fletcher #2
Re: how to reference assemblies from web.configs in subdirs?
Some additional information:
The subdirectory was a web application, which explains why it was looking in
its own bin directory.
However: Now that I have removed the application at the subdir (so now it's
just a plain virtual directory) the web.config file is not being read at
all.
I also tried using the <location> tag within the root's web.config, but
still no go...
"Lucas Fletcher" <lucas@dealersinnotions.com> wrote in message
news:#iYNKRvVDHA.532@TK2MSFTNGP09.phx.gbl...be> Hello,
>
> I was wondering how I can reference assemblies from web.config files
> residing in subdirectories without having to create a new project for each
> web.config-containing subdirectory?
>
> I would like to use an HttpModule, but only for files in a particular
> directory, so I add a web.config file containing this:
> <?xml version="1.0" encoding="utf-8" ?>
>
> <configuration>
>
>
> <system.web>
>
> <httpModules>
>
> <add name="MessageAuthenticatorModule"
> type="Din.MessageAuthenticator,localhost"/>
>
> </httpModules>
>
> </system.web>
>
> </configuration>
>
> to the proper subdirectory. The problem is that the localhost.dll cannotthe> found for some reason, even though the web.config file should be part ofsuspect> main web project. I really don't want to have to register anything in the
> GAC.
>
> Another question: if I have to resort to creating another web project with
> its root located at the subdirectory mentioned above, does the web.config
> file still inherit values from the main web project? If not, which Ialternative.> is the case, then creating a separate project is not much of an>
> Thank you,
>
> --
> Lucas Fletcher
> [email]lucas@dealersinnotions.com[/email]
> [url]http://dealersinnotions.com[/url]
>
>
Lucas Fletcher Guest
-
John Saunders #3
Re: how to reference assemblies from web.configs in subdirs?
Lucas,
I don't really have a pointer, but it looks like you're at a point where you
could use anything...
I once complained to Microsoft about the following. I had an ASP.NET web
application installed in the root of a web site. Its web.config <add>ed an
HttpModule, AModule. I then created a subapplication. That was a problem:
1) The subapplication would not start, since it couldn't find AModule.
2) The subapplication couldn't <remove> AModule, since it wasn't actually in
the modules list
I eventually had to put a copy of AModule in the bin directory of the
subapplication so that it could <remove> it...
I had similar fun with bad <add> entries not failing. The problem was that
it hadn't gotten that far - it was failing on the <add> entry from the
parent application before it got around to realizing that the <add> in the
child application had invalid attributes.
Good Luck with this. You may have to enter an incident with Microsoft to
reach a resolution.
--
John Saunders
Internet Engineer
[email]john.saunders@surfcontrol.com[/email]
"Lucas Fletcher" <lucas@dealersinnotions.com> wrote in message
news:evUxZl0VDHA.2544@tk2msftngp13.phx.gbl...read> If anyone cares:
>
> Further investigation yields that the subdir's web.config file is beinghas> to some degree. It does raise an error when containing bad xml. (Also I
> notice the JIT recompiling when first viewing a page under it, after itwould).> been edited.) But if I change the add element's name or type attributes to
> garbage,
>
> <add name="garbage" "garbage,garbage"/>
>
> no errors are raised (whereas if this were in the root web.config itbecause>
> This is very puzzling to me. It must be something I am doing wrong,I> I would imagine that many people have successfully done this before, sincelooking> haven't found any other postings on it.
>
> Any pointers would be much appreciated...
>
> "Lucas Fletcher" <lucas@dealersinnotions.com> wrote in message
> news:ePtW$wzVDHA.2328@TK2MSFTNGP12.phx.gbl...> > Some additional information:
> >
> > The subdirectory was a web application, which explains why it wascannot> in> it's> > its own bin directory.
> >
> > However: Now that I have removed the application at the subdir (so now> each> > just a plain virtual directory) the web.config file is not being read at
> > all.
> >
> > I also tried using the <location> tag within the root's web.config, but
> > still no go...
> >
> >
> > "Lucas Fletcher" <lucas@dealersinnotions.com> wrote in message
> > news:#iYNKRvVDHA.532@TK2MSFTNGP09.phx.gbl...> > > Hello,
> > >
> > > I was wondering how I can reference assemblies from web.config files
> > > residing in subdirectories without having to create a new project for> > > web.config-containing subdirectory?
> > >
> > > I would like to use an HttpModule, but only for files in a particular
> > > directory, so I add a web.config file containing this:
> > > <?xml version="1.0" encoding="utf-8" ?>
> > >
> > > <configuration>
> > >
> > >
> > > <system.web>
> > >
> > > <httpModules>
> > >
> > > <add name="MessageAuthenticatorModule"
> > > type="Din.MessageAuthenticator,localhost"/>
> > >
> > > </httpModules>
> > >
> > > </system.web>
> > >
> > > </configuration>
> > >
> > > to the proper subdirectory. The problem is that the localhost.dllof> > be> > > found for some reason, even though the web.config file should be part> the> > the> > > main web project. I really don't want to have to register anything in> with> > > GAC.
> > >
> > > Another question: if I have to resort to creating another web project> web.config> > > its root located at the subdirectory mentioned above, does the>> > suspect> > > file still inherit values from the main web project? If not, which I> > alternative.> > > is the case, then creating a separate project is not much of an> >> > >
> > > Thank you,
> > >
> > > --
> > > Lucas Fletcher
> > > [email]lucas@dealersinnotions.com[/email]
> > > [url]http://dealersinnotions.com[/url]
> > >
> > >
> >
>
John Saunders Guest



Reply With Quote

