what was i thinking...

Differences Between VS 2003 and VS 2005 Web Projects 

Saturday, December 3, 2005 3:56:39 AM Categories: Development
Rate this Content 1 Votes

In VS.NET 2003 in order to open a Solution containing a Web project, you had to have a virtual directory in IIS mapped to the folder of the web app. You could work around this by using class library projects for web development instead of Web projects, though you still had to setup the virtual directory for it to actually work. I've used this approach in mojoPortal because it solved another problem where VS.NET 2003 Web projects do not work well with Subversion clients like TortoiseSVN because VS 2003 doesn't like the .svn folders in web projects. It works just fine with class library projects.
For deploying web projects in VS 2003 (whether they are configured as web projects or configured as class library projects) I'm a huge fan of the free VS.NET plugin UnLeash It, which makes it very easy to deploy just the files needed without the code behind source files. To prepare for deployment on a linux server using mono/apache, I would just choose Release mode then choose Rebuild Solution from the Build menu (this would avoid the default incremental build in VS.NET that doesn't work on mono).  Then I would right click the web folder and choose Deploy Project (a menu item added by Unleash It).

Building a Web project in VS 2003 would compile all the web code files into a single assembly and place it in the /bin folder beneath the root of the web source tree. The bin folder and its contents were not actually included as part of the VS 2003 Web project as far as VS 2003 was concerned. The actual files included in the project are determined by the .csproj file.

In VS 2005/ASP.NET 2.0, things are quite different, here are my observations:
 
It is no longer needed to configure an IIS virtual directory to open a solution with a web project. VS 2005 has a built in web server that it uses for debugging so if you hit the play button and start debugging it launches the app in the browser without the need of IIS. VS 2005 web projects don't mind the .svn folders and play nicely with Subversion clients like TortoiseSVN.

There are no such thing as project files like .csproj in VS 2005, everything in the web folder is considered part of the web project. This means that for example the bin folder if it exists below the web is part of the project.

If you Build a VS 2005 Solution with a web project and there are no other projects in the solution it will not even create a bin folder. If you have other projects in the solution like say a class library with business logic and a class library with data access code and you have references from your web project to them, it will create a bin folder and put the compiled business and data assemblies in there but you will not see the web code assemblies in the bin folder after building. Instead the compiled web code will be generated on the first request and stored in a temp folder beneath C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files.

If you are not using an IIS Virtual directory but using the built in web server in VS 2005 you will also see some source files in the temp folder which are the partial classes containing control declarations and such. In fact you are not allowed to declare controls like TextBox, Label, etc in your code behind files. Doing so will result in errors when you try to build or run your web app because the runtime (and/or MSBuild I think) is in charge of generating partial class files containing the control declarations so adding them yourself will result in duplicate declarations. The above feature as far as I can tell is not yet implemented in mono. If you put the same source files that you used on windows in a virtual directory on linux/mono/apache configured to use the 2.0 runtime you will get errors because of the missing control declarations. If you add the control declarations to the source it will autocompile on mono and work just fine (at least the simple tests I have done work, not so sure about more complex things) but if you use that same source code on windows with IIS configured to use the 2.0 ASP.NET it will raise an error due to the duplicate control declarations. While in VS 2003 I could compile on Windows and deploy on linux/mono and it would work, compiling in VS 2005 and deploying on mono does not currently work. Since auto compilation of ASP.NET 2.0 source code does seem to work I suspect you could precompile from source on mono but I have not tried this yet.

VS 2005 has a feature to precompile your web app so you can deploy it without source code if you right click the web project and choose Publish Web Site. This will copy everything needed without the source files into a new folder tree outside the VS solution and will include the compiled web assemblies in the bin folder. When you do precompile the web project it does not all go into one assembly as it did in VS 2003, instead it goes into a number of assemblies some of which appear to be randomly named. You do have an option to make it compile a separate assembly for each page or control which is pretty nice because you can re-deploy part of a web project without re-deploying the whole thing. In VS 2003 it was a one shot deal since everything was in 1 assembly which could be a problem in cases where you had new features you were not ready to deploy but you wanted to fix a bug in an already released feature you could not deploy the fix without also deploying the new features. This problem is solved in VS 2005 because of the more granular assembly structure. You can get even more control over VS 2005 web project compilation and deployment using the new Web Deployment Projects which was not included in VS 2005 but is available as a beta at http://msdn.microsoft.com/asp.net/reference/infrastructure/wdp/default.aspx.

Update 12/15/2005: Scott Guthrie blogged about a new Web Project Model coming for VS 2005 that will make it possible to do things similar to what we did in VS 2003. For example we will have the option to compile the whole web into a single dll as before. It will use project files like VS 2003 so that only files listed in the .csproj file will be considered part of the project even if other files live on disk within the same folders. Most important we will have the option of making the partial class files with the control declarations live on disk as part of the project. In short, all the things I was worried about in terms of continuing to work with developers cross platform with MonoDevelop as I mentioned in my previous post will be fixed by the additional project model. Excellent!

Update 12/18/2005 Scott Guthrie has posted a link to a new site with more information on the new old way of doing things style Web Applications for VS 2005. You can even get a preview download with some of the functionality working. I'll be trying it out this week.

Trying to get a VS 2005 Web Project running on mono 

Sunday, November 20, 2005 12:47:23 PM Categories: Development mojoPortal Mono Open Source
Rate this Content 0 Votes

I've been playing around trying to get the version of mojoPortal that I converted to VS 2005 running on my mono test machine but so far no luck getting it to work. I did finally learn how to configure apache Virtual Hosts to allow setting which version of mod-mono-server is used. Thanks to Elliott Draper for helping me out with that on the mono developer mailing list.

Compatibility Between VS.NET and MonoDevelop in Open Source Team Development 

Thursday, November 17, 2005 3:29:00 PM Categories: Development mojoPortal Open Source
Rate this Content 0 Votes

As you probably know if you've been following my progress with mojoPortal, I've been developing in VS.NET 2003 on Windows and doing test deployments on a linux machine with mono/xsp/mod_mono/apache2 every step of the way to make sure mojoPortal is truly cross platform. What you may not know is one of the other main contributors, Dean Brettle, has been doing all of his work in MonoDevelop on linux. We use the same svn repository hosted on forge.Novell.com and it has worked out very well. Dean did the setup for MonoDevelop and we have to coordinate a little. If I add a file in VS.NET it doesn't automatically get added to the MonoDevelop project but it shows up in the file system and can easily be added. Same thing when files are added in MonoDevelop and commited to svn, it shows up in my file system and I have to right click it and include it in the project. It actually flows very smoothly.

One drawback in MonoDevelop is the fact that you can't debug ASP.NET apps but we make a lot of use of log4net which makes it inexpensive to leave a lot of debug logging code in there that you can turn of and on using the config file for log4net. There is work underway to get debugging working in MonoDevelop so it can only get better from here. I finally got setup last weekend with MonoDevelop 0.7 on Suse 10 and was able to pull the mojoPortal code down from svn and build it in MonoDevelop and it worked. So we have true cross platform development going on this project. I think that is pretty cool!
Dean also used MonoDevelop to develop NeatUpload a really sweet upload control for ASP.NET that provides a progress bar and can handle large uploads gracefully. I think its the only one out there that works cross platform and is free.

I'm a little worried how the transition to ASP.NET 2.0/VS 2005 will affect our cross platform development environment. Specifically, I'm worried about the way ASP.NET control declarations are hidden in partial class files generated down in the deep bowels of temp folders. If you don't know what I mean I'm talking about how when you create a page or control in a VS 2005 web project and say you either drag a control onto the design surface or you enter in in markup in html view. Lets just say a TextBox for example. In VS 2003 before you could programatically access this TextBox it had to be declared in your code behind file. If you used the designer it would be in a hidden section but it would be there and if you removed it you could not compile. In VS 2005 by contrast it will compile without that but the part of it that contains the control declarations will be compiled down deep in the temp folders using generated code or something like that. I'm not entirely clear on all this so feel free to correct me in comments. So I'm thinking this code generation is done by VS.NET and not the runtime though this is what I'm not sure of yet and need to learn more. If my understanding is correct then there could be a problem pulling the code from svn into MonoDevelop and not being able to compile because the partial classes containg the control declarations don't exisit on disk within the project. If that is true then MonoDevelop would either need to generate its own partial class files or the Developer would have to create them manually. I really hope I'm wrong on this but that is my current impression.

I've got a face for Radio 

Wednesday, October 26, 2005 2:59:13 PM Categories: Humor mojoPortal Technology
Rate this Content 0 Votes

They've posted the mp3 of the Nashville .NET Rocks show  with my little interview for anyone who is interested.



I talked about mojoPortal, The Mono Project and the Mono Live CD, you can get the mp3 here

.NET Rocks VS 2005 Road Trip Visits Nashville 

Monday, October 24, 2005 8:35:21 PM Categories: Developer Resources Development Software
Rate this Content 0 Votes

I've been listening to .NET Rocks on my 50 minute drive to work for most of the summer and fall and I was very fortunate tonight to catch Carl Franklin and Richard Campbell at the Nashville Visual Studio .NET Users group meeting where they were putting on a presentation as part of their .NET Rocks VS 2005 Road Trip. It was great getting to meet those guys in person, after listening so long I felt like I knew them but they are even more fun in real life.  Billy Hollis was also there which was very cool. Carl's presentation was on the cool things coming in VB.NET 2005 and Richard talked about the cool new things in the 2.0 version of the compact framework as well as some great info on the latest mobile hardware in the phone and pda space. They had a lot of cool mobile device toys to show off.  I learned a lot from both of them. During the shwag giveaway at the end of their presentation Carl played and sang several versions of Clementine in the vein of a lot of different artists, it was hysterical, there were versions like the Beach Boys, Neil Young, Black Sabbath, Willie Nelson, and more. Apparently this is known as the Clementine Principle. Carl is just a great musician.

Since they always give away a lot of shwag on their shows I thought I would give them some shwag for a change so I burned some copies of the Mono Live CD and gave them to Carl and Richard. After the presentation some of us went out and had a beer with them in their RV and they recorded a .NET Rocks show with us! I got a brief interview and talked with them about mojoPortal, my cross platform web site framework project as well as The Mono Project and the Mono Live CD. It was a lot of fun, I can't wait to hear the mp3 when it comes out. Way cool!

LDAP Thrashing rescued by SLES 9 

Sunday, October 23, 2005 7:08:16 AM Categories: Development mojoPortal Mono Open Source
Rate this Content 0 Votes

For about 3 weekends now I've been thrashing with getting OpenLDAP setup and working on my Suse 9.3 machine so I could test some work contributed to mojoPortal by TJ Fontaine for supporting LDAP authentication. I read a lot of great tutorials but I always ran into some trouble. I did manage to get OpenLDAP running and was able to query it but I had problems getting the YaST and Samba integration working. I would run net getlocalsid and it would say it couldn't get either secret but I figured ok at least I can query it but I needed some users with the right schema elements especially a mail attribute. I was using the Samba shema which has a mail property but when I would try and set that using ldapmodify and a .ldif file it would give errors like that wasn't a valid attribute. I think the trouble had something to do with Samba being setup before I configured LDAP and then trying to change the Samba setup to use LDAP it got funky. I decided to try Edd Dumbill's tutorial on my laptop running the latest greatest Ubuntu breezy but it could not find all the needed packages to follow his instructions. I tried updating my sources.list file to see if some of the other repositories had the libraries but for some reason I could not connect reliably to any of the Ubuntu or Debian repositories. Not sure if this is just traffic problems due to the popularity of Ubuntu and the new release or what. I'm sure a linux super guru could have worked past these issues but for a long time Windows guy trying to learn as he goes its been quite a struggle with obstacles at every step. I do plan to give it another try soon with SUSE 10 for my own learning benefit but for now I just needed the shortest path to getting a working LDAP implementation so I can get back to working on mojoPortal.

Then it hit me (just like in the Novell ads ;D) maybe SLES 9 has an easier setup for LDAP, there must be some value added above and beyond what comes in the free version so I downloaded the 30 day eval version last night and installed it this morning. Sure enough you can configure LDAP as part of the install process. Unless I missed something this was not in the Suse 9.3 install. Anyway 30 minutes later I have a working LDAP server and 15 minutes after that I was able to login against it (in mojoPortal) using TJ's changes! Whoohoo!

Now I can get to the parts I need to do like implementing the other 2 data layers to support the new fields and creating upgrade scripts and other things to integrate TJ's changes. I have 30 days before my eval of SLES 9 runs out so I better get working! After that I need to test against Active Directory, in theory it should work the same way. TJ's implementation uses the Novell.Directory.Ldap library that comes with mono. I put this dll into the bin folder of my app on my Windows development machine and was able to compile against it and run under the .NET framework so it will work for mojoPortal installations under Windows or mono.

Its been a long time... 

Saturday, September 17, 2005 4:56:41 AM Categories: Music
Rate this Content 0 Votes

Its been over a year since I've played a live music show but I've got a Blind Joe Love blues gig coming up Saturday, October 1st opening up for Fluid Ounces at The Boro Bar & Grill, 1211 Greenland Dr, Murfreesboro, TN



Anyone in the area, hope you can make it. I'll be playing old time acoustic blues in the styles of Robert Johnson, Mississippi Fred McDowell, Big Bill Broonzy and Blind Boy Fuller

Another Release of mojoPortal 

Sunday, September 11, 2005 12:12:24 PM Categories: mojoPortal
Rate this Content 0 Votes

A new release of mojoPortal, an object oriented web site framework targeting mono is now available on the download page.
Highlights of this release are:

  • better CSS organisation and 2 great looking new skins by Jasmin Savard
  • improvements to forum administration and menu system by Dean Brettle
  • improvements for blog category management
  • Dutch Culture file by Jan Hussaarts
  • a number of bug fixes

A new Release of mojoPortal is ready 

Monday, August 29, 2005 6:00:38 PM Categories: mojoPortal Open Source
Rate this Content 0 Votes

A new release of mojoPortal, an Object Oriented Web Site Framework for mono, is now available on the download page.

New this release is the inclusion of NeatUpload by Dean Brettle. NeatUpload, licensed under the LGPL, is an ASP.NET HttpModule for handling file uploads gracefully with a progress bar. It works on Windows with IIS or on Linux/Mac OS X with mono using XSP web server or using mod_mono with apache web server. Pretty sweet! Dean developed this specifically for mojoPortal but I'm sure it will be used in countless ASP.NET projects once the word gets out about it.  I really can't imagine an ASP.NET developer that won't want to use it. Previously, mojoPortal shipped with SlickUpload which was disabled by default because it only works on Windows. A similar commercial control ABCUpload I've used before also does not, as far as I know, work under mono. Great work Dean!
Here's a screenshot of the progress bar in action:


you can even stop the upload midstream by clicking the icon.

Also new  is the final release of version 2.0 of FCKEditor, previously we were using RC1.

Thanks to Tom Opgenorth for adding a small enhancement to the Links Module to enable specifying the target. He is currently working on adding categories to the Links module allowing you to organize links in a TreeView by category. That will be a cool option. After that project Tom is planning on implementing a new image gallery using nGallery.

mojoPortal now includes, in addition to US English, culture files for Italian, Portuguese, and Czech.  If anyone transaltes to additional languages, please send me the translated files.

What is the Essence of a Wiki? 

Friday, August 19, 2005 6:58:27 PM Categories: Development mojoPortal Software
Rate this Content 1 Votes

I'm planning on making a new Content Module for mojoPortal that will be configurable to accomplish the same tasks as the current Html Module and Blog Module and more. To me things like RSS and Comments, Archive View, Categories, Content Rating, Threaded Discussion are all features I would like to make available for any content in mojoPortal so they should just be settings for the Content Module which will be the core of the CMS and you can turn them on or off to suit your purposes whether you are blogging, writing articles, whatever you just configure the module to accomplish it so there will be no need for a separate Blog module for example.

So now Wikis are all the rage it seems and I want to also make this a configuration option so I'm trying to make sure I understand it and invite any of you reading this to fill in the gaps if I don't have the whole gestalt of what a Wiki is. From what I have seen the most salient feature of what is called a Wiki is the fact that it keeps history of every change and therefore people often allow anyone to edit it which makes it stay up to date better or so the theory goes. To me thats it but since I haven't used a Wiki much I realize I may be missing something. The only other major thing I've noticed is that some Wikis have a kind of Wiki markup language. To me that seems like something only a developer could love and not user friendly at all compared to say FCKeditor. So I'm picturing adding an option to keep every change and make it easy to revert to any version for an Administrator and calling the setting Wiki mode. Does that sound legit or am I totally missing some wikiness? If I'm a total newb on this don't hold back, let me know.

Page 11 of 17 << < 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 > >>
Copyright 2003-2010 Joe Audette
Donate Money to support the mojoPortal Project. View Joe Audette's profile on LinkedIn View Joe Audette's profile on The Guild of Accessible Web Designers site