mercredi 9 avril 2014

IIS - déploiement ASP.NET : ne peut pas accéder aux assemblys du dossier Bin du répertoire virtuel sous le site - Stack Overflow


I have an ASP.NET Web application which has 3 projects to handle 3 different layers of the application (UI , BL and Data Access).When i publish the UI project a directory called Precompiled will be created in the solution and Files will be available there.This Folder will have a BIN directory which holds required DLL's(referenced DLL's and DLL of Business Layer project & DLL of DataAccessLayer Project) too. This works fine .NOw i want to use the same BL and DataAcess layer to run multiple UI's (websites). I want to have website called websiteA,WebSiteB,MyWEbSite1,ShyjusWeb etc....I want to create virtual directory for each one of these. SO i created a website and under that i created Virtual directories for the above sites.I put index.asp (of the UI project i had in my solution) in the Folder which is mapping to one virtual directory and when trying to access, I am getting an error like the following


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 the assembly 'App_Web_lls0_qzf'. Make sure that it is compiled before accessing the page.

Source Error:


Line 1: <%@ page language="C#" autoeventwireup="true" inherits="index, App_Web_lls0_qzf" %>
Line 2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Line 3: <html xmlns="http://www.w3.org/1999/xhtml">


Source File: /websiteA/index.aspx Line: 1

It seems like the page is not able to access the required DLL's from the BIN folder. IS there any way to solve this ?? IIS 6.0 I am playing with. My folder hierarchy is like this now Root Folder - > Bin folder,Various UI related files & folders ,A folder which is converted to a virtual directory now (WebSiteA). Inside WebSiteA , i have inde.aspx, which is the same copy as of the index.aspx available in the root folder.


I need to have the same website (copy with only some CSS changes for each site). If i copy the Bin folder from my root and paste it in each of the virtual directory folders along with the index.aspx,Its working.But i dont want to have same BIN folder for each sites.I Want to have only one BIN,which should be in the ROOT folder


Thanks in advance




I think you have gotten yourself in a muddle. The file you mention (App_Web_lls0_qzf) appears to be the compiled DLL for the first specified UI/BL/DAL combination and I am unfortunately confused by your description of your folder structure.


I am not clear about whether you are wanting multiple COPIES of the same site or whether each site is different.


Have you not tried creating the 4 websites, and referencing the the common BL and DAL projects?


Remember that your file structure and your IIS structure do not have to be the same, i.e.



  • c:\sites\website1

  • c:\sites\website2

  • c:\sites\website3

  • c:\sites\website4


and in IIS



  • Master Web Site

  • > Web1

  • > Web2

  • > Web3

  • > Web4


Remember inheritance! - DLLs and references in your master website will be inherited into your virtual directories. You may also wish to consider creating web app pools for each web site.




Add a reference to your BL and DAL projects from the website project that you created



I have an ASP.NET Web application which has 3 projects to handle 3 different layers of the application (UI , BL and Data Access).When i publish the UI project a directory called Precompiled will be created in the solution and Files will be available there.This Folder will have a BIN directory which holds required DLL's(referenced DLL's and DLL of Business Layer project & DLL of DataAccessLayer Project) too. This works fine .NOw i want to use the same BL and DataAcess layer to run multiple UI's (websites). I want to have website called websiteA,WebSiteB,MyWEbSite1,ShyjusWeb etc....I want to create virtual directory for each one of these. SO i created a website and under that i created Virtual directories for the above sites.I put index.asp (of the UI project i had in my solution) in the Folder which is mapping to one virtual directory and when trying to access, I am getting an error like the following


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 the assembly 'App_Web_lls0_qzf'. Make sure that it is compiled before accessing the page.

Source Error:


Line 1: <%@ page language="C#" autoeventwireup="true" inherits="index, App_Web_lls0_qzf" %>
Line 2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Line 3: <html xmlns="http://www.w3.org/1999/xhtml">


Source File: /websiteA/index.aspx Line: 1

It seems like the page is not able to access the required DLL's from the BIN folder. IS there any way to solve this ?? IIS 6.0 I am playing with. My folder hierarchy is like this now Root Folder - > Bin folder,Various UI related files & folders ,A folder which is converted to a virtual directory now (WebSiteA). Inside WebSiteA , i have inde.aspx, which is the same copy as of the index.aspx available in the root folder.


I need to have the same website (copy with only some CSS changes for each site). If i copy the Bin folder from my root and paste it in each of the virtual directory folders along with the index.aspx,Its working.But i dont want to have same BIN folder for each sites.I Want to have only one BIN,which should be in the ROOT folder


Thanks in advance



I think you have gotten yourself in a muddle. The file you mention (App_Web_lls0_qzf) appears to be the compiled DLL for the first specified UI/BL/DAL combination and I am unfortunately confused by your description of your folder structure.


I am not clear about whether you are wanting multiple COPIES of the same site or whether each site is different.


Have you not tried creating the 4 websites, and referencing the the common BL and DAL projects?


Remember that your file structure and your IIS structure do not have to be the same, i.e.



  • c:\sites\website1

  • c:\sites\website2

  • c:\sites\website3

  • c:\sites\website4


and in IIS



  • Master Web Site

  • > Web1

  • > Web2

  • > Web3

  • > Web4


Remember inheritance! - DLLs and references in your master website will be inherited into your virtual directories. You may also wish to consider creating web app pools for each web site.



Add a reference to your BL and DAL projects from the website project that you created


0 commentaires:

Enregistrer un commentaire