Could not load type

  • Thread starter Thread starter Kevin Quigley
  • Start date Start date
K

Kevin Quigley

Hi,

I have a small web application on my own machine and I am
trying to copy it to our web server. I am doing this by
copying all the files if the project from my machine to a
folder on the web server.

The application runs fine on my machine but when I try to
access it on the web server I get a 'Could not load type
Poll.Global'.

I've tried a variety of different things suggested by
other sites but have had no success.

I built the project before copying it across and the
appropriate dll is present in the bin folder. Thr folder
is set up as a virtual directory. The aspnet user has full
permission to the appropriate folders.

Does anyone have any idea what may be causing this.

Any help would be greatfully appreciated.

Thanks,
Kevin.
 
Its obviously not finding the assembly for some reason. Try doing this in
your Web.Config file in the application's virtual root directory. I've done
this based on the assumption that your assembly's name is Poll.

<configuration>
<compilation>
<assemblies>
<add assembly="Poll" />
</assemblies>
</compilation>
</configuration>
 
Hi Janaka,

Thanks a million, that worked okay. I can now get back to doing some
development work.

Do you have any idea why this would happen ?

I developed the app on XP and the server runs Windows 2000 server would
this have anything to do with it?

Thanks again for your healp.

Kevin.
 
Hey Kevin glad that worked for ya. Without looking at your server I can't
say for certain what the problem is. My guess is that because your
application is running in a virtual directory and not in its own site
directory ASP.NET is looking for the /bin directory of your web root, which
is lower down in the directory structure. If your going to add in other
assemblies you can use a wildcard character <add assembly="*" />
 
Back
Top