By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 1,876 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

Possible to have common assembly dir w/o GAC?

P: n/a
Hi,

It is possible to reference an assembly in a directory other than in the bin
subdir without registering in ghe GAC?

For instance, I would love to have all my web apps on one server reference
assemblies from a c:\inetpub\wwroot\common directory shared by the apps on
that web server.

Thanks for any ideas.

Dave
Nov 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
If the DLL(s) was thread safe, you could probably create an instance of your
object(s) in the global.asax application_onstart event
and place that object in an application variable. Then all web pages have
access to it as they do to the application objects.

This isn't however a recommended approach and you should use the GAC or
replicate your DLL.
--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
----------------------------------------------------------------------------
------------------------------------
<blatant plug>
Professional .NET for Java Developers with C#- ISBN: 1-861007-91-4
Professional Windows Forms - ISBN: 1861005547
Professional JSP 2nd Edition - ISBN: 1861004958
Professional JSP - ISBN:
1861003625
Beginning JSP Web Development - ISBN: 1861002092
</blatant plug>
----------------------------------------------------------------------------
------------------------------------

"Dave Kolb" <Da**************@remove.sas.com> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
Hi,

It is possible to reference an assembly in a directory other than in the bin subdir without registering in ghe GAC?

For instance, I would love to have all my web apps on one server reference
assemblies from a c:\inetpub\wwroot\common directory shared by the apps on
that web server.

Thanks for any ideas.

Dave

Nov 18 '05 #2

P: n/a
What about creating a junction point for each web app that wants to use a
common assembly dir higher up the root using the linkd.exe and then using a
<probing> directive somehow? What are the asp.net runtime rules for locating
assemblies?

Any reason it would not be a nice future asp.net feature to allow a
web.config to reference a common assembly dir to load from without resorting
to the complications of strong names and GAC registration?

Thanks,
Dave

"John Timney (Microsoft MVP)" <ti*****@despammed.com> wrote in message
news:u1**************@TK2MSFTNGP11.phx.gbl...
If the DLL(s) was thread safe, you could probably create an instance of your object(s) in the global.asax application_onstart event
and place that object in an application variable. Then all web pages have
access to it as they do to the application objects.

This isn't however a recommended approach and you should use the GAC or
replicate your DLL.

Regards

John Timney
Microsoft Regional Director
Microsoft MVP <snip> "Dave Kolb" <Da**************@remove.sas.com> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
Hi,

It is possible to reference an assembly in a directory other than in the

bin
subdir without registering in ghe GAC?

For instance, I would love to have all my web apps on one server reference assemblies from a c:\inetpub\wwroot\common directory shared by the apps on that web server.

Thanks for any ideas.

Dave

Nov 18 '05 #3

P: n/a
This seems to work fine:

1. cd c:\inetpub\wwwroot\myapp
2. do a "linkd bin2 c:\inetpub\wwwroot\common"
3. put needed modules in the common dir.
4. Add the following to web.config for the app and the app runs with them
and fails if they are not there.
<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<probing privatePath="bin2"/>

</assemblyBinding>

</runtime>

"Dave Kolb" <Da**************@remove.sas.com> wrote in message
news:#g*************@TK2MSFTNGP12.phx.gbl...
What about creating a junction point for each web app that wants to use a
common assembly dir higher up the root using the linkd.exe and then using a <probing> directive somehow? What are the asp.net runtime rules for locating assemblies?

Any reason it would not be a nice future asp.net feature to allow a
web.config to reference a common assembly dir to load from without resorting to the complications of strong names and GAC registration?

Thanks,
Dave

"John Timney (Microsoft MVP)" <ti*****@despammed.com> wrote in message
news:u1**************@TK2MSFTNGP11.phx.gbl...
If the DLL(s) was thread safe, you could probably create an instance of your
object(s) in the global.asax application_onstart event
and place that object in an application variable. Then all web pages have
access to it as they do to the application objects.

This isn't however a recommended approach and you should use the GAC or
replicate your DLL.

Regards

John Timney
Microsoft Regional Director
Microsoft MVP

<snip>
"Dave Kolb" <Da**************@remove.sas.com> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
Hi,

It is possible to reference an assembly in a directory other than in
the bin
subdir without registering in ghe GAC?

For instance, I would love to have all my web apps on one server

reference assemblies from a c:\inetpub\wwroot\common directory shared by the
apps on that web server.

Thanks for any ideas.

Dave


Nov 18 '05 #4

P: n/a
Sounds like you have a solution ..............

--
Regards

John Timney
Microsoft Regional Director
Microsoft MVP
----------------------------------------------------------------------------
------------------------------------
<blatant plug>
Professional .NET for Java Developers with C#- ISBN: 1-861007-91-4
Professional Windows Forms - ISBN: 1861005547
Professional JSP 2nd Edition - ISBN: 1861004958
Professional JSP - ISBN:
1861003625
Beginning JSP Web Development - ISBN: 1861002092
</blatant plug>
----------------------------------------------------------------------------
------------------------------------

"Dave Kolb" <Da**************@remove.sas.com> wrote in message
news:uu**************@tk2msftngp13.phx.gbl...
This seems to work fine:

1. cd c:\inetpub\wwwroot\myapp
2. do a "linkd bin2 c:\inetpub\wwwroot\common"
3. put needed modules in the common dir.
4. Add the following to web.config for the app and the app runs with them
and fails if they are not there.
<runtime>

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

<probing privatePath="bin2"/>

</assemblyBinding>

</runtime>

"Dave Kolb" <Da**************@remove.sas.com> wrote in message
news:#g*************@TK2MSFTNGP12.phx.gbl...
What about creating a junction point for each web app that wants to use a
common assembly dir higher up the root using the linkd.exe and then using
a
<probing> directive somehow? What are the asp.net runtime rules for

locating
assemblies?

Any reason it would not be a nice future asp.net feature to allow a
web.config to reference a common assembly dir to load from without

resorting
to the complications of strong names and GAC registration?

Thanks,
Dave

"John Timney (Microsoft MVP)" <ti*****@despammed.com> wrote in message
news:u1**************@TK2MSFTNGP11.phx.gbl...
If the DLL(s) was thread safe, you could probably create an instance of your
object(s) in the global.asax application_onstart event
and place that object in an application variable. Then all web pages

have access to it as they do to the application objects.

This isn't however a recommended approach and you should use the GAC
or replicate your DLL.

Regards

John Timney
Microsoft Regional Director
Microsoft MVP

<snip>
"Dave Kolb" <Da**************@remove.sas.com> wrote in message
news:ud**************@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> It is possible to reference an assembly in a directory other than in

the bin
> subdir without registering in ghe GAC?
>
> For instance, I would love to have all my web apps on one server

reference
> assemblies from a c:\inetpub\wwroot\common directory shared by the

apps
on
> that web server.
>
> Thanks for any ideas.
>
> Dave



Nov 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.