How to configure my application to recognize the bin directory?

P

peelman

Hi,

I have a web server (IIS 6 on Windows 2003) and just ported over my web
app from IIS 5. Everything used to work on IIS 5 but now on IIS 6 my
scripts cannot find the namespace compipiled in the dll in my bin
directory. It crashes at:

MyNameSpace.MyClass var = new MyNameSpace.MyClass();

I get the standard "are you missing a using directive or assembly
reference" asp.net error in the browser. But the dll is in the bin
directory. I have no virtual directories and only one site running at
inetpub\www\, and the bin is inetpub\www\bin\. So why isn't ASP.NET
looking in this bin directory? Do i have to add some configuration
option to the web.config or something?

Regards,
 
P

peelman

It is a compiler error. But it occurs because ASP.NET is not looking
in my directory and finding my code. But I know the code works fine
(and used to work on IIS 5), so my isues is an ASP.NET configuration
one. Why doesn't it find the bin directory. According to the
documentation I have read it should do automatically.
 
S

Scott Allen

Do you have a reference to the DLL in the ASP.NET project?

Is the root of the web site configured as an application?
(IIS MMC -> Right click and select Properties -> Home Directory). Look
under application settings and if there is a "Create" button, then
click to configure the root as an app.
 
K

Kevin Spencer

Is the root directory of your web application configured as an Application?

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
J

Juan T. Llibre

Two things to check for...and a suggestion

1.
Check to see if the Network Service account
has read permission to the /bin directory.

2.
Check to see if you're using
<%@ Import Namespace = "YourAssemblyName" %>
in your aspx page. ( I know, that's doh!...but... )

3.
Try adding <add assembly="*"> to your web.config.

<configuration>
<compilation>
<assemblies>
<add assembly="*"/>
</assemblies>
</compilation>
</configuration>
 
P

peelman

OK here's the thing....

....it works. Infact, it just decided to start working. I did not
change the assembly, the config file, the web pages, nothing. Weird.
All of the recommendations given above were always true though - hence
my reason for the post because i was out of ideas.

thanks anyway people.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top