Where is the Assembly.cs file in a VS2005 Website project? - asp.net

I am trying to add some assembly info for log4net so that it can have a file watcher. It appears that the website project does not have this file. Does this mean that I am doomed to use the web.config file and that I cannot split out log4net's config and use a file wathcer?

This file is created for a Web Application project, and not for a web site project.
Comparing Web Site Projects and Web Application Projects

Related

how can I add the reference to a third party library when the web application is already in the webserver

I am working on a web application built with vb.net and asp.net. the web application is already stored in the web server. I am creating some new features in the web app.
If have to include new third party library (e.g; itextsharp etc) in the project how can I add reference to the dll files in the web server?
Will it work if I just copy the dll files in bin folder (in the web server)?
Add your dll file in bin folder and it should work properly.Adding third party dll is same as your own dll jsut add it in bin folder and reference it in your page where you will need it.

It is only able to refer the class files inside App_Code folder in a file in ASP .NET website application

Only the class files inside App_Code folder is able to refer in a file in ASP .NET website application. Why its so?
Only the class files inside App_Code folder is able to refer in a file in
ASP .NET website application. Why its so?
The answer is very simple Website application working as designed.
App_Code folder is a special ASP.NET RUNTIME folder.Any files in this folder are compiled by ASP.NET when your site is actually running on the server.
This essentially allows you to drop random class/code files in this folder to be compiled on the server side. For this very reason if you drop something new into the App_Code folder of your running web site, it is like resetting it coz ASP.NET runtime now recognizes that there is a new class which needs to be kept in consideration during running the site. This magical folder brings with itself various connotations when it comes to different project typescourtesy
ASP.NET decide at runtime which compiler to invoke for the App_Code folder based on the files it contains. If the App_Code folder contains .vb files, ASP.NET uses the VB compiler. if it contains .cs files, ASP.NET uses the C# compiler, and so on...
You can refer the following resources too.
Web Application Projects versus Web Site Projects
Shared Code Folders in ASP.NET Web Site Projects
There's a difference between ASP.NET WebSite and ASP.NET Web Application. It appears that you created a WebSite in which code files are stored the App_Code folder. If you create a web application you can place the code wherever you want an they will be compiled to assemblies that will be copied to the bin folder. This way you don't need to deploy your source code on the web server.

Publishing web apps and websites

I understand that references are stored in the project (vbproj) file for ASP.NET web applications and the Web.Config (http://msdn.microsoft.com/en-us/library/37e2zyhb%28v=vs.71%29.aspx) for websites.
I have recently converted a website into a web application. I notice now that the web application will publish (using the Publish option) even if the version information is incorrect in the Web.Config, then when accessing the web application through a browser I get an error.
I was unable to Publish a website if the version of an assembly in the Web.Config was incorrect.
I read that web applications are precompiled (before publish) whereas websites are compiled the first time the website is accessed through a browser.
Therefore, I believe what I have said should be the other way around i.e. I should be able to publish websites with an incorrect version in the Web.Config (because they are not compiled) and I should not be able to publish a web application.
What am I missing?
After some further research; I have discovered that ASP.NET web applications are built using MSBuild and ASP.NET websites are built using ASPnet_Compiler.
ASPnet_Compiler looks in the Web.Config for referenced assemblies (add assembly tag) at build time, whereas MSBuild looks in the project file (vbproj) at build time.
Web applications are deployed without the vbproj. I believe the project file is used for linking. Therefore at runtime a web application uses the information in the Web.Config to identify assemblies to look for in the local bin folder and then the GAC (for aspx pages only)i.e. namesapces still have to be manually imported into the code behind partial classes.
If anyone has any comments or better answer then please post.

publish asp.net website into single dll file

I got a asp.net website from my client that need to be modified. The problem is that the old company was uploading the project as a release which means no code but a sinlge dll file.
We can make a single dll file the project type is web application not a website!!
Can you adivse how to publish sinlgle dll fiel.
Regards,
Moayyad
If you want a single DLL, then convert your website into a web application. Once you convert, everything inside your project will be compiled into a single DLL file.But still, any external assemblies will be inside their own DLL files.

ASP.NET files necessary for development

I am just getting started in ASP.NET and have some existing projects to maintain.
I have read that ASP.NET projects include a folder called app_data, a code behind DLL, .sln project files, .proj files etc
Which of these files are necessary for the continued development of a ASP.NET website?
Also, are there others which are key to building ASP.NET applications?
Unfortunately, there are two kinds of ASP.NET application: Web Sites and Web Application Projects. If you have files with a .csproj type or .vbproj, then you're in luck - you have a Web Application Project. You'll want to open the .csproj file as a project in Visual Studio. All the files that are listed are necessary.
In fact, if it's in the site's folder or subfolders, you should assume it's necessary.

Resources