Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6838597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:36:58+00:00 2026-05-26T23:36:58+00:00

This isn’t really a question on a problem; I’ve solved it my own (after

  • 0

This isn’t really a question on a problem; I’ve solved it my own (after banging my head against a wall for a couple of days) and I’d like to share it, but I’d be REALLY interested if someone can give me an explanation on why this happens.

The situation is simple enough : In C# 4.0, VS 2010 (haven’t tested in other configs) create an empty ASP.NET web application

: File -> New -> Project (not Web Site) -> Web -> ASP.NET Empty Web Application.

In the newly created web app, create a page (add -> new item -> web form). Then run the project and, ofcourse, it works.

Now do the following :

  1. Clean the project output i.e. delete everything from the bin folder
  2. Change the project’s output folder : project properties -> build -> output path. E.g. change bin\ to bin\debug (that’s what I did)

BANG ! The project no longer works ! Try starting it (F5) and you get :


Server Error in '/' Application.
Parser Error 
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: Could not load type 'WebApplication2.WebForm1'.

Source Error: 


Line 1:  <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication2.WebForm1" %>
Line 2:  
Line 3:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Source File: /WebForm1.aspx    Line: 1 

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237 

If you don’t do step #1 (delete everything from the bin folder) the project works but when you change the code inside WebForm1.aspx.cs you start getting “Source file not found” messages from the debugger. As I understand, for some %$&^#$^* reason, it still uses dlls from the bin folder.

It looks like the output folder is hard-coded somewhere… ?! Does anyone have any idea on why on earth does this happen ?????

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:36:58+00:00Added an answer on May 26, 2026 at 11:36 pm

    The project no longer works

    Hmm well that’s not quite right. The project is fine. VS is dutifully creating the dlls where you want them to. Its just not where you should be creating the folder.

    What you’re really asking is why won’t ASP.NET load a dll from a random sub folder of bin. There are only a few locations that ASP.NET will look for assemblies. Aside from the bin there also the GAC and the .net Framework folder (but I suspect that’s only for .net Assemblies). I don’t know why but I suspect its to remove the need for you to tell it where to find it (Ala registry settings)

    You could create your own Assembly loader but you’d need a way to communicate to your loader where the files are. You’d also probably need to put that assembly loader assembly in the bin.

    Save yourself some grief and put the dlls in the bin folder so that ASP.NET will load them

    As a side you note you may ask yourself what’s this output directory for. The typical use case is libraries that are referenced by other assemblies. Also executable files can be put anywhere since they are the entry point rather than ASP.NET

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This isn't really a programming question but more about programming and testing tools. Is
This isn't really a technical question so I apolgoise if I ruffle any feathers!
This isn't really a problem, I am able to use the Android tools correctly,
This isn't much of a problem, really, it's entirely out of curiosity. For a
This isn't that complicated of a question, but I can't wrap my head around
This isn't a holy war, this isn't a question of which is better. What
This isn't a question but I thought I'd start a thread where links to
This isn't a question that has a black/white yes/no answer, this is more a
This isn't a problem as such, but it's bugging me and I would appreciate
This isn't a very simple question, but hopefully someone has run across it. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.