For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > July 2004 > Shared aspx files









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Shared aspx files
kimpton

2004-07-30, 8:56 am

Hi,

I'm trying to create a library of shared code, some of which are ascx and aspx files. I'm pretty much following the procedure outlined in http://support.microsoft.com/defaul...b;EN-US;Q324785 . This has been working fine when working on my local
machine. I have moved the shared code to a remote machine, updated my virtual directory to point to the remote machine path, and added a reference to the remote dll. All is otherwise setup exactly as when the shared code was local. However I am now getti
ng 'Could not load type' error when the compiler is parsing the first line of the shared apsx page (which does have code behind).
The referenced dll is copied locally and I can reference and interact with it in my local code.

Any ideas why the type is not being loaded when referenced from the aspx page at runtime?

Cheers for any help
Kimpton
bruce barker

2004-07-30, 3:58 pm

did you copy the shared dll to bin directory, this will be done if you use a
VS deploy project, otherwise you must manually copy the dll to each vdir's
bin that uses the shared code, ie, only the aspx and asc files are shared,
the dll's must be copied to each project (vs does this for you when you run
your project)

-- bruce (sqlwork.com)

"kimpton" <kimpton@discussions.microsoft.com> wrote in message
news:5B6114FC-62CE-4DBA-80E1-4548480566C1@microsoft.com...
> Hi,
>
> I'm trying to create a library of shared code, some of which are ascx and

aspx files. I'm pretty much following the procedure outlined in
http://support.microsoft.com/defaul...b;EN-US;Q324785 . This has
been working fine when working on my local machine. I have moved the shared
code to a remote machine, updated my virtual directory to point to the
remote machine path, and added a reference to the remote dll. All is
otherwise setup exactly as when the shared code was local. However I am now
getting 'Could not load type' error when the compiler is parsing the first
line of the shared apsx page (which does have code behind).
> The referenced dll is copied locally and I can reference and interact

with it in my local code.
>
> Any ideas why the type is not being loaded when referenced from the aspx

page at runtime?
>
> Cheers for any help
> Kimpton



kimpton

2004-07-30, 3:58 pm

Yep. The shared dll is in the local bin path. I can even instantiate the type within the code behind of a local page, even though it won't load via the shared aspx.

I think it something to do with the fact that the virtual directory to the shared code is mapped to a file share. If I point my virtual directory to a local copy of the shared code (i.e. using c:\inetpub\shared\) all works fine. If I map the virtual direc
tory to the same local folder but via a file share (i.e. using \\mymachine\shared) I get the can't load type message.

So it's nothing to do with the fact the server is remote, but the fact that access path is via a share.....I think...??



"bruce barker" wrote:

> did you copy the shared dll to bin directory, this will be done if you use a
> VS deploy project, otherwise you must manually copy the dll to each vdir's
> bin that uses the shared code, ie, only the aspx and asc files are shared,
> the dll's must be copied to each project (vs does this for you when you run
> your project)
>
> -- bruce (sqlwork.com)
>
> "kimpton" <kimpton@discussions.microsoft.com> wrote in message
> news:5B6114FC-62CE-4DBA-80E1-4548480566C1@microsoft.com...
> aspx files. I'm pretty much following the procedure outlined in
> http://support.microsoft.com/defaul...b;EN-US;Q324785 . This has
> been working fine when working on my local machine. I have moved the shared
> code to a remote machine, updated my virtual directory to point to the
> remote machine path, and added a reference to the remote dll. All is
> otherwise setup exactly as when the shared code was local. However I am now
> getting 'Could not load type' error when the compiler is parsing the first
> line of the shared apsx page (which does have code behind).
> with it in my local code.
> page at runtime?
>
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com