Thinking outside the box

SteelePrice.Net

My Links

Twitter Updates


Get Microsoft Silverlight
follow me

Article Categories

Archives

Post Categories

Image Galleries

Dot Net

General

Linux

OneNote

Windows

TechED Bloggers
Visual Basic Bloggers (OPML)

Awesome... Web Apps as Local Classes

I don't know when Fritz Onion wrote this, but I sure wish I had found it about 6 months ago...

This is incredibly useful when you want to work with WebApps but are not happy with the way the wizard forces you into making certain assumptions about how you want to layout your app on a local machine.

It also seems to take care of a bunch of annoyances I had with VS.NET Web Folders. I use subversion AnkhSVN and VS.NET really hates using .svn folders.  This eliminates the problem with VS.NET not wanting to refresh the folders, etc., etc.

One caveat about the document, it was a little unclear about how you create new VB Web Projects under this scenario, so here is a briefing:

follow the instructions in Fritz's document for adding project wizards.

  1. Create a New Empty VB Project
  2. Add a WebForm and a Web.Config
  3. Open IS Manager and either point your Default Web Site's home directory to this folder, or make a Virtual Directory pointing to it.
  4. Right-Click your Project and select Properties, then Configuration Properties/Debugging
  5. Change Start Action to Start URL instead of Start Project and use the URL (not the file location) of your start page, i.e. http://localhost/webform1.aspx
  6. enable ASP.NET debugging
  7. Now go to Common Properties, Change the output type from Windows Application to Class Library (feel free to change your root namespaces and Assembly name now that you CAN), apply the settings and close the properties dialog

Hit Start and enjoy your new ability to debug flexibility :-)

posted on Sunday, November 09, 2003 1:59 AM

Feedback

# censored 1/27/2004 7:07 AM censored      

Happened to stumble across your blog while googling. Great post!

# censored 1/27/2004 7:09 AM censored      

Found your page while using Yahoo. I am currently working on a project related to this, and found it helpful. Thanks!

# re: Subversion: unbeatable sourcecontrol. 3/18/2004 1:30 PM Frans Bouma's blog      

# re: Awesome... Web Apps as Local Classes 11/10/2004 8:30 AM robert      

Your Fritz Onion link is out-of-date, but you can find the article here: http://www.pluralsight.com/fritz/Samples/aspdotnet_without_web_projects.htm

# re: Awesome... Web Apps as Local Classes 11/10/2004 9:26 AM Steele      

updated the links, thanks

# I need a recommendation for source control 1/21/2005 9:36 AM Bob.Yexley.Blog      

# No more debugging for me! 3/14/2005 9:03 AM Iskai      


Debugging doesn't seem to want to work when I create a web application this way. I get the message "Unable to start debugging on web server, the project is not configured to be debugged.".

I've setup debugging in for the IIS application etc - must be missing something!

# re: Awesome... Web Apps as Local Classes 3/14/2005 10:35 AM Steele      

Yes, you have to change the way it launches your application.

Go to your ProjectProperties then Configuration Properties.
Change Start URL to your Project's start page and enable ASP.NET debugging

This should launch your app in the default browser and allow you to debug just like you did in a WebApps Project.

Remote Debugging should work the same way. If you enabled remote debugging.

# re: Awesome... Web Apps as Local Classes 3/30/2005 11:42 AM Sean Wolfe      

One problem I ahve seen with this solution is that When you wish to add new Web form, that option is not available from the Add menu. Unless I missed something, I am having difficulty adding a new Web Form to a Web Proejct that is converted to a class project.

# re: Awesome... Web Apps as Local Classes 3/30/2005 2:03 PM Steele      

That one is easily resolved and I should have put it in the entry.

dive down into:
C:\Program Files\Microsoft Visual Studio .NET 2003\Vb7\VBProjectItems\Local Project Items
for VB
or
C:\Program Files\Microsoft Visual Studio .NET 2003\VC#\CSharpProjectItems\LocalProjectItems
for C#

There you will find LocalProjectItems.vsdir simply cut the text from
C:\Program Files\Microsoft Visual Studio .NET 2003\Vb7\VBProjectItems\Web Project Items\Web\WebWebProjectItems.vsdir

and paste them in, then you will see them i the drop down for Add Items.

# re: Awesome... Web Apps as Local Classes 11/15/2005 12:56 AM Russell      

Thanks for your article - very nifty.

When trying to use this for a WebService, I experienced a 'Parser Error' problem :
Parser Error Message: Could not load type 'WebService.Global'.

This had me scratching my head for a while.

The fix was to modify the Configuration Properties -> Build -> Output Path from 'bin\Debug\' to 'bin\'.

Hope this helps someone...

Russell

# re: Awesome... Web Apps as Local Classes 2/15/2006 9:27 AM max      

Can I port this to Delphi?

# Seo Teknikleri 3/3/2008 11:54 AM Seo Teknikleri      

thank you

# re: Awesome... Web Apps as Local Classes 4/14/2008 3:17 PM matematik      

matematik dersleri http://alp-tr.blogspot.com/ adresinde var...

# re: Awesome... Web Apps as Local Classes 7/15/2008 5:50 AM nil karaibrahimgil      

This informations are very useful
Thanks a lot...

King Regards!

# re: Awesome... Web Apps as Local Classes 1/3/2009 2:05 PM chat      

thank you

Post a new comment about this topic
Title  
Name  
Url

Comments   
Enter the code you see:
   

Blogroll Me!

Copyright © 2003-2009 H. Steele Price, IV -
All opinions are my own, not necessarily those of my employer, your mother, or any government agency.