Click here to Skip to main content
14,267,110 members
Rate this:
Please Sign up or sign in to vote.
I have spent days trying to solve this problem on my own but not been successful now I am at the verge of going crazy.

Basically, I have created a Project in Visual Studio 2012 on my Windows 7 machine. In this project, I have a Business Logic Layer , Data Access Layer , Business Objects Layer(which are all class libraries) and a Website I called UI. The BLL, BOL and DAL dll's are referenced in the the UI and these DLL files are in the bin folder of UI. The UI was set as startup project and the website runs without issue when I view it using F5 in Visual studio.

The problem is when I copy the Website content into wwwroot folder of my inetpub. I get the following error shown below :

Server Error in '/' Application.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'BLL' could not be found (are you missing a using directive or an assembly reference?)

Source Error:


Line 5:  using System.Web.UI;
Line 6:  using System.Web.UI.WebControls;
Line 7:  using BLL;
Line 8:  using BOL;
Line 9:  using DAL;

Source File: c:\inetpub\wwwroot\WorkshopWebApp\Default.aspx.cs    Line: 7


Please note that all the dll files are in the bin folder of the Website folder located in the inetpub wwwroot folder and I also have IIS running on myy local machine. I have tried so many things to solve this but without success. Any help will be highly appreciated.
Posted
Updated 22-May-14 8:52am
v2
Comments
ZurdoDev 22-May-14 17:04pm
   
It sounds like a dll is missing.
Uzoma Umekwe 23-May-14 10:57am
   
Hi @RyanDev, all DLLs are in the bin folder of the UI.
Rate this:
Please Sign up or sign in to vote.

Solution 1

for security reason IIS block referring DLL, exe by default
Almost all hosting provider will block them too
You should include the source code in your website.
   
Comments
Uzoma Umekwe 22-May-14 15:34pm
   
@NewPast Is there no way to unblock this in IIS?
NewPast 25-May-14 11:20am
   
Yes;
You could unblock dll and exe
go to iis manger and modify the setting
I think you have to modify one or more setting
these setting maybe:
* add your dll to IIS - Modles
* add your dll to IIS - ISAPI and CGI Restriction

Rate this:
Please Sign up or sign in to vote.

Solution 2

if you past files in to iis root then it will have the default application pool. it may be .net framework 2.0
you need to create new web application/site in your IIS and set the app pool which you have target your asp.net site. If you not understand these terms please read documentations tutorials about asp.net deployment in IIS.
Deploying ASP.NET Websites on IIS 7.0 [^]
http://stackoverflow.com/questions/4890245/how-to-add-asp-net-4-0-as-application-pool-on-iis-7-windows-7[^]
Configuring IIS 7 for ASP.NET Applications Deployment and SQL Server 2008 Integration[^]
   
Comments
Uzoma Umekwe 23-May-14 7:10am
   
Hi @DamithSL the App Pool had already been set to target .Net framework 4.0. Please note that I am able to deploy website on my local IIS that does not reference any DLL file. The main problem occurs when DLL files are referenced. It seem IIS just blocks them

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100