I’m diving head first into Silverlight 2 development and love it. Writing a cool application that I hope to post by this Thursday or Friday (April 10, 11) entitled, “iPhone + ASP.NET + Amazon.com + Silverlight = Cool Application.”
The application uses ASP.NET Forms Authentication so I moved the .aspx page with the Silverlight application into a sub folder of the web site and secured the folder using the “location” section in the web.config file.
After the first time I rebuilt the application I noticed that two ClientBin sub folders were now in my web site project. That did look right. So I deleted them both and rebuilt the application. Sure enough the both appeared again, one off the root of the web and one in the sub folder I created and copied the .aspx page into.
This looked like a security issue to me, so I posted on the the Silverlight form here: http://silverlight.net/forums/t/13635.aspx.
After some more searching and trying to figure out what’s going on, I figured out how to correct my web application. I have also posted the answer on the Silverlight forum.
Application Solution
The below image shows the solution with the web site having two .aspx pages that host the ItemCollectionSilverlight application. Notice the two ClientBin folders.
Solution After Deleting Root .aspx Host Page
The below image shows the ItemCollectionSilverlightTestPage.aspx and .html files have been deleted from the root of the web site. After deleting these two files, I also deleted both ClientBin sub folders and rebuilt the application. After rebuilding, both ClientBin folders appeared again.
Found The Solution
The web site project keeps another internal list of all Silverlight Links. You can view this by viewing the web site properties and selecting the Silverlight Links tab.
Correct The Problem
Since I no longer have any .aspx pages that host Silverlight applications in the root of the web site, I selected the link in the root of the web ” / ” and clicked the Remove button. I then deleted both ClientBin sub folders and rebuilt the solution.
Mission Accomplished
This is how the solution looks after the above steps have been accomplished. Maybe in a future build of Visual Studio, the unused links can be removed automatically when rebuilding the solution so that unnecessary and unwanted ClientBin sub folders are not created.
Have a great day!
Just a grain of sand on the worlds beaches.




April 7, 2008 at 1:59 am |
very very very nice article… I am sure that I will have to do this some time in the near future… thanks for sharing this !
April 7, 2008 at 4:15 am |
Marlon,
Thank you! This will show up in your first project so I hope this helps!
Cheers,
Karl