The solution should have a reference to the BLL DLL, which should not be set from App_Code. In turn, the BLL has a reference to DAL DLL.
The only DLL the WebSite project should know about is the BLL.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
If anyone can help me with this problem I’ll be grateful -
I want to add to my project - ASP.NET Empty Web Site a reference for other project.
After adding the reference to the App_Code folder nothing is shown inside the Bin folder -
-
I hope you can help me!
Thanks
The solution should have a reference to the BLL DLL, which should not be set from App_Code. In turn, the BLL has a reference to DAL DLL.
The only DLL the WebSite project should know about is the BLL.
There are 2 kind of ASP.NET "Projects".
"Website" is like the old ASP, they don't need a project file, and the code is only compiled to DLLs on the fly when put to run under IIS. To reference other DLLs you just need to add relevant Reference with "assemblies" section in web.config if they are strong named, copy them to BIN folder if they're not.
"Web Application", on the other hand, is those project that requires you to have a project file to use, and then will compile the "server side" part to DLLs before deployment. This is the kind of project that use the way to described to add reference.
======
That said, in "Website" project, when you use the IDE to add reference to a strong named DLL, you should be able to see the "assemblies" section be added for you. And for output of your other projects, they should be copied to BIN folder when you deploy the project as well.
I downloaded your project and see your WebApplication have successfully added reference to BLL and DAL, and then BLL have reference to DAL.
There's no problem at all and I can compile it successsfully.
Except your DLL have unrecognized escape sequence that prevents it from being compiled. You should use "\" instead of single "\" in C# strings
Also there is 2 methods calls to DAL need to be renamed as DAL.DAL.
The same goes to your Website calls, it should be BLL.BLL.<method_name>()
@AgaveJoe Hi and thanks again, 'm checking the project from your repo.
List<Product> GetProductList()
you didn't do try catch
for error, why didn't you ?2) In my project BLL -
it has to be **(float)**(decimal)ds.Tables[0].Rows[i]["Price"]
Other wise it can't compile, why is it not taking decimal value by itself ?
3) I don't understand why you made this - private static string connectionString = ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString();
Instead of this in my code - private static string connetionString = @"Data Source=ELADO\SQLEXPRESS;Initial Catalog=SupplementsStore;Integrated Security=True";
Severity Code Description Project File Line Suppression State
Error The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=2.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located. C:\Users\Elad Hatan\Desktop\ShopWebSite1-master\WebSite1\Web.config 16
If I comment the line above there is a Message when running the project - "
Web server.Port 63579 is in use.
Check the list of Reference.
like here.
then, delete and add it again to the reference.
That's all :)