0

I have been working on an ASP.Net web site and have been publishing to my server with no issues. I decided to change the path that it was being published to a few steps down so that everything would be more logically placed.

Before : C:/inetpub/wwwroot/(HERE)

After I got everything how I wanted it i changed it to down 2 steps.

After : C:/inetpub/wwwroot/super/duper/(HERE)

It wasn't until I cleaned up the top level stuff that was just in /wwwroot/ that everything started to break. I would get errors saying that my .ashx handler couldn't be found. After staring blankly for a few hours, I moved my /super/duper/bin/ file to the top level, /inetpub/wwwroot/bin/, and viola. It worked.

Now my question is, why did this have this effect, when the entire time the /bin/ file was web accessable?

slugster
  • 49,403
  • 14
  • 95
  • 145
kshreve
  • 310
  • 3
  • 14

3 Answers3

0

bin directory is system directory where the compiled assemblies are located, unless they are not in GAC. Bin directory should be located in the site root folder. unless you have your own assembly registeration module or not loading them on the fly :-)

alexsuslin
  • 4,130
  • 1
  • 20
  • 30
0

I think what the other answers and this question is alluding to is that it is not enough just to move the folder to the location that you wish to reference your site from and more importantly run your code from. The way I see it is you have two options.

Option 1.

Leave the bin folder at the WWWROOT level but move the other items into the folder structure you want. The runtime will load the dll in the bin folder into the app pool and your aspx's etc. should see it.

Option 2.

Create a virtual folder / application at the level you want and drop everything in there.

Option 2 is better I think.

Also if you are not using ~ in your urls you might want to take a look at that.

Mike Miller
  • 16,195
  • 1
  • 20
  • 27
-1

An ASP.NET application should be placed in the root of a folder defined as Application in IIS. You can create an Application in any folder. Application level stuff like web.config containing application settings and the bin folder should be placed directly in this Application folder. In IIS6 the application is called virtual directory.

Stilgar
  • 22,354
  • 14
  • 64
  • 101