Website:
The Web Site project is compiled on the fly. You end up with a lot more DLL files, which can be a pain. It also gives problems when you have pages or controls in one directory that need to reference pages and controls in another directory since the other directory may not be compiled into the code yet. Another problem can be in publishing.
If Visual Studio isn't told to re-use the same names constantly, it will come up with new names for the DLL files generated by pages all the time. That can lead to having several close copies of DLL files containing the same class name,
which will generate plenty of errors. The Web Site project was introduced with Visual Studio 2005, but it has turned out not to be popular.
Web Application:
The Web Application Project was created as an add-in and now exists as part
of SP 1 for Visual Studio 2005. The main differences are the Web Application Project
was designed to work similarly to the Web projects that shipped with Visual Studio 2003. It will compile the application into a single DLL file at build
time. To update the project, it must be recompiled and the DLL file
published for changes to occur.
Another nice feature of the Web Application
project is it's much easier to exclude files from the project view. In the
Web Site project, each file that you exclude is renamed with an excluded
keyword in the filename. In the Web Application Project, the project just
keeps track of which files to include/exclude from the project view without
renaming them, making things much tidier.
Reference
The article ASP.NET 2.0 - Web Site vs Web Application project also gives reasons on why to use one and not the other. Here is an excerpt of it:
- You need to migrate large Visual Studio .NET 2003 applications to VS
2005? use the Web Application project.
- You want to open and edit any directory as a Web project without
creating a project file? use Web Site
project.
- You need to add pre-build and post-build steps during compilation?
use Web Application project.
- You need to build a Web application using multiple Web
projects? use the Web Application project.
- You want to generate one assembly for each page? use the Web Site project.
- You prefer dynamic compilation and working on pages without building
entire site on each page view? use Web
Site project.
- You prefer single-page code model to code-behind model? use Web Site
project.
Web Application Projects versus Web Site Projects (MSDN) explains the differences between the web site and web application projects. Also, it discusses the configuration to be made in Visual Studio.
Right click on solution --> Properties
Look under Common Properties --> Startup Project
Select multiple startup projects
select Start action on the projects you need to debug.
Best Answer
First off, take admin out of the IIS_WPG group before you forget, and configure your app pool back to normal.
Now, turn on WCF logging on the service by putting the following in your web.config file -
Create the c:\logs directory and make sure the application pool identity user has full control on that directory. Now test your app.
If no log files are being created then there's a problem reaching the WCF service. If log files are being created view them in the Service Trace viewer which comes as part of the Windows SDK. You'll see a red message which is the log entry containing the exception thrown inside the service - this should give you a pointer to where your service code is going wrong.
If the problem is inside your app, rather than the service then you should be logging exceptions inside your
Application_Load
event (you should be logging exceptions anyway) - however if you try with a global exception handler, well, your app is failing on startup and so the global exception handler will never start to run - instead of putting potential failable scenarios inApplication_Load
I'd move that out to a utility class which provides an access point to the information you need (say myGlobalThingumy.GetStuff()). Make this class a singleton, and then check if you have the stuff already - if you don't, then you make your web service call. It would act much the same as putting it inApplication_Load
but will enable global error handling to work, and make your debugging easier.