this sciencey book im reading is so fascinating (i didnt learn alot of science in school and what i learned wasnt anything like this)

seen from Australia
seen from Poland

seen from United Kingdom
seen from United States
seen from China
seen from Germany

seen from United States
seen from Netherlands

seen from Netherlands

seen from Malaysia
seen from Brazil

seen from Philippines

seen from United States

seen from Malaysia
seen from Yemen
seen from Hong Kong SAR China
seen from Puerto Rico
seen from China

seen from Malaysia

seen from Malaysia
this sciencey book im reading is so fascinating (i didnt learn alot of science in school and what i learned wasnt anything like this)
Server specific Web.config sections replacement with WDP
In this post I am hoping to explain how you can change your web.config settings per different server environment using Web Deployment Projects (WDP) for VS 2005 or VS 2008…
First of all let me start with the fact that WDP for VS 2005 as well as WDP for VS 2008 are build configuration aware… In fact, special effort was made in WDP 2005 & WDP 2008 to allow configuration specific settings…
That is the reason when you look at the WDP UI you can see configuration specific dropdowns as shown below:
You can create one build configuration per your server environment eg. “Testing”, “Staging” , “Production” etc and configure all of your WDP settings per build configuration pretty easily… Learn more how to manage configurations per build environment…
Next I want to change connectionStrings section in side the web.config for “Testing” server and “Release” server… The original connection String section in my web.config file looks as below:
<connectionStrings> <add name="vishal-db" connectionString="Data Source=vijoshi-DevBox; Initial Catalog=vishal-db; Integrated Security=True"/> connectionStrings>
For “Testing” environment I would like to change my Data Source to be vijoshi-Testing
For “Release” environment I would like to change my Data Source to be vijoshi-Release
To accomplish this I am going to add two configuration files to my project named connectionString.Testing.config and connectionString.Release.config… After adding the two files my solution explorer should look as below:
The content of connectionString.Testing.config file will look as below:
<connectionStrings> <add name="vishal-db" connectionString="Data Source=vijoshi-Testing; Initial Catalog=vishal-db; Integrated Security=True"/> connectionStrings>
Notice that the connectionString.Testing.config only contains connectionStrings section (as opposed to original web.config which may contain many other sections) … Similar to the above example in connectionString.Release.config file I will only change the Data Source to vijoshi-Release…
After these two files are added I can now open my WDP configuration and go to the “Deployment” node and check the “Enable Web.config file replacement”… After this the only thing I need to do is write connectionStrings=connectionString.Testing.config as shown below…
After this when I build my WDP project the connectionStrings section will be replaced by the content of the connectionString.Testing.config…
Also now I can modify the Configuration from “Testing” to “Release” and set the Web.config file section replacements section to look as below
connectionStrings=connectionString.Release.config
This way you can also modify the other config sections each in a new line of the text box shown above…
Hope this will help…
-Vishal
Fix-It: Nesting between .aspx and code behind is lost when you move files to a different folder
In this post I am hoping to cover a quick tip/trick about file nesting in ASP.NET Web Site Project.
Let’s say you have the below web site in your solution explorer:
If you move “About.aspx” and “About.aspx.cs” to the “New Folder” shown above then you will see the file nesting in solution explorer incorrect…
To fix this issue there is a solution explorer button for “Nesting Related Files” as shown below…
When you click this button the project system should update the solution explorer and show you the nested files correctly…
-Vishal
Technorati Tags: Web Site,Visual Studio
tweetmeme_style = 'compact'; tweetmeme_url = 'http://vishaljoshi.blogspot.com/2009/08/fix-nesting-between-aspx-and-code.html'; tweetmeme_source = 'VishalRJoshi';
Fix-It: Multiple instances of Visual Studio Development server getting created
Sometimes while developing some of you might notice a lot instances of Visual Studio Development Server (aka Cassini) in your system tray… Many of these icons when clicked on land up just vanishing away and at times these icons may flood the system tray causing frustration… Sorry for that :-(
One of the reasons for this happening is that ASP.NET Development server is set up to use dynamic port allocation as shown below:
WAP (Right Click Project –> Properties –> Web)
Web Sites (Select Web Sites –> F4 to see properties)
Sometimes on some developer boxes either Windows firewall or custom firewall blocks a bunch of ports… In this situation Web Development Server tries to hook to one of the blocked ports port and is not allowed to… In the process the Development Server lands up crashing… Next time it tries to assign itself to another dynamic port and the same thing happens… As a result there are various tray icons created even though the Web Development Server exe has actually crashed… That is the reason when you hover over the icons in the system tray they vanish away…
Firstly, let me call out that this is a bug, I just verified it with our key dev Bill Hiebert and he confirmed that this is now fixed in VS 2010… For the time being the work around for
VS 2008 developers is to go ahead and turn off the Auto-assign Port/Use Dynamic ports option and actually set a fixed port which you know is not blocked by one of your firewalls… Hopefully with this the multiple icons in the system tray should no longer appear…
If you still face problem then do write back…
-Vishal
Technorati Tags: ASP.NET Development Server,Visual Studio Development Server,Cassini,Visual Studio
tweetmeme_style = 'compact'; tweetmeme_url = 'http://vishaljoshi.blogspot.com/2009/08/multiple-instances-of-visual-studio_12.html'; tweetmeme_source = 'VishalRJoshi';
VS Project Template Vs Project System
You might many times hear the words “project templates” and “project system” from time to time, I though it would be worth while to talk about the differences between the two from a web developer stand point…
Web developers using Visual Studio use either File –> New –> Project or File –> New –> Web site as shown below to create new Web projects as shown below:
The new project dialog for Web Developers looks as below:
and the new web site dialog looks as below:
What is probably interesting to note is that all the options that you see inside any of these dialog boxes above are just “Project Templates” and what that really means is that they are underlying the same project system but just wrapped with different set of start up files for easy project development…
In reality there are only two major Project Systems for Web Developers
Web Application Projects (WAPs) which are accessible via File –> New –> Project –> Web
Web Site Projects (WSPs) which are accessible via File –> New –> Web Site
What is also interesting to note is that WAPs and WSPs have different code bases (with reasonable set of shared components)… I will eventually write a post on real differences between WAPs and WSPs but today let us focus on Project Systems vs Templates…
A Project system like WAP or WSP actually takes care of building, compiling, debugging, managing source control, deploying, hooking up references, intellisense etc etc for a project… In essence the major code for functionality of the web project like commands, hot keys, content menus, toolbars etc are all specific to a project system and they remain the same across all the project templates of a single project system…
A Project template on the other hand is simply a bunch of files bundled together to allow a person to easily start developing a certain type of project… The project templates can have specific files like .svc or .aspx with boiler plate code in it… Each project template can choose to include its own set of references or code files… Behind the scene the project system invoked to do all the magic remains the same… For example ASP.NET Web Application and WCF Service Application are just two different templates for “Web Application Project System”… Similarly there are a bunch of project templates for “Web Site Project System”…
The key Project templates for Web Application Projects (WAP) are:
ASP.NET Web Application
Empty ASP.NET Web Application
ASP.NET Web Service Application
WCF Service Application
Dynamic Data Linq to SQL Web Application
ASP.NET MVC Web Application (MVC is a customized Web Application Project system, we call it Flavor of WAP, so it is not necessarily a project template only…)
Dynamic Data Entities Web Application
Similarly, the key Project templates for Web Site Project (WSP) are:
ASP.NET Web Site
Empty Web Site
WCF Service
ASP.NET Reports Web Site
Dynamic Data Linq to SQL Web Site
Dynamic Data Entities Web Site
Hence many a times there are features which work for one project system but do not work for other… A classic example is App_Code directory which works great with Web Site projects but not as seamlessly with Web Application Projects… Recently I wrote a blog post on Why App_Code does not work as well with WAPs…
Anyways, I hope this gives an idea on how the project systems and project templates for Web Developers work within Visual Studio…
-Vishal
Web Deployment Projects do not work after installing VS 2008 SDK
Some days back it was brought to our attention that Web Deployment Projects (WDP) stop working after installing Visual Studio 2008 SDK… As you soon VS 2008 SDK is uninstalled then WDP again start working…
We narrowed down this issue to be due to “Isolated Shell Application” which come as part of VS 2008 SDK… The work around to get WDP working again is to go ahead remove the Shell package by deleting the registry key below:
HKLM\Software\Microsoft\VisualStudio\9.0\Packages\{815946b0-1c0d-4eab-8226-36ea3c59162a}
If you would at anytime restore the Shell package functionality then it would be advisable to Export the registry key and save it somewhere (or repairing the VS 2008 SDK install should also do the same)…
If you have any concerns or issues please do not hesitate to write back to [email protected]
-Vishal
PS: Do note that although the WDP build reports failure with VS 2008 SDK installed the build is not really failing, it is just a reporting false failures, so it is not as severe as it sounds….
Unload Web Site and WAP in Visual Studio
Inside Visual Studio many times people want to be able to unload a projects without having to completely close them…
Web Application Projects (WAPs)/ Class Libraries Unload
WAPs or Class Libraries unloading the project allows you to open the .csproj or .vbproj within an XML editor and modify the properties… This is by far the biggest reason why unloading WAPs, Class Libraries etc is used… You can Unload most of the VS projects by Right Clicking on the project node and clicking “Unload Project” as shown below:
After Unloading the project looks as below and you can again Right Click on it to edit the project file.
Web Site Project Unload
Web site project on the other hand are different, firstly cause they do not have a project file and hence unloading them to edit the project file is not a motivation… People still do want the ability to unload Web Site project and the scenario around it is that when you unload a project then on Solution build the unload project does not get built… This way if you are in middle of writing some code in that project and have existing errors then you can still unload it and continue with solution build… Also Reloading the project will be faster than opening a closed project… With that said if you Right Click on Web Site project you won’t find the “Unload Project” option…
The right Click context menu is already very long for Web Site and as Unloading Web Site is not as common the command for “Unload Web Site” actually sits in the “Web Site” menu on top of Visual Studio as shown below:
After unloading the project you can then right click on the unavailable node (just like WAP above) and ask VS to “Reload Project”…
Also FYI unloading and reloading of project resets a lot of in memory objects associated with the project so in VS 2010 we explicitly load and unload WAP as well Web Site when you change your project’s target .NET framework version (e.g. move from 3.5 to 4.0)… This allows VS to hook in the correct intelligence, toolbox etc etc associated with the correct .NET Framework version…
Hope this small tip & trick will help you…!!
Disabling Script Debugging with VS 2010, Silverlight & IE 8
This is a quick post to cover few items related to Script Debugging and the way it is impacted by Silverlight, Internet Explorer 8 and Visual Studio 2010…
With IE 8 there is no longer option to disable script debugging… When VS 2010 will launch IE 8 then script debugging will be enabled by default… This will help people debug scripts flawlessly without having to go and change script debugging features within IE 8… While this is a good feature for most users it might at times create problem when you do not really want script debugging to be enabled for performance reasons (i.e. if you do not want to debug scripts and have lot of scripts in your pages)…
On separate note Silverlight is a special debugging option for Web Projects… You can view that by going to Project –> Properties –> Web… Check the screenshots below for Web Application Projects (WAP):
for Web Sites you can view those options by going to Web Site—> Properties –> Start Options as shown in the figure below
Now Silverlight debugging is mutually exclusive with Script Debugging as Debugger at a time can attach to only one of the two, so when you turn on Silverlight debugging then VS has to turn Script Debugging Off… If you have bunch of Client side scripts in your Silverlight project which needs to be debugged then in that case you will have to go to the above option and turn off Silverlight debugging to have Script Debugging enabled…
Now a side effect of all this is that if you want to turn off Script Debugging on your regular projects then your easiest work around is to go and turn on Silverlight debugging and your script debugging will get turned off by itself…
GreggM on our Debugger team has got some further detailed work around via modifying the registry at http://blogs.msdn.com/greggm/archive/2009/04/06/disabling-script-debugging-in-vs-2008-ie8.aspx, it is a great post take a look at it…
Hope this workaround helps you!!…