Daily Archives: April 9, 2006

Hosting WinForms Controls in ASP.NET 2.0 VS2005 wierdness

I have spent most of the day trying to understand some bizarre behavior in VS2005 with ink on the web apps. The issue is not related to the inkable control per se, but the Windows Forms control hosted on a web page.

When I compile the Window Control Library into a dll for the first time, add it into the web project, then embed into the html as an <OBJECT> it works fine. But if I recompile the dll and re-add it tothe project, the control does not display. I get the standard “image not found” graphic that you would get on any web page displaying a jpg where the jpg is not available.

After many hours, I discovered the solution, which I am leaning towards thinking is only related to working on the development machine – if I change the name of the output assembly, then add that new assembly to the web project and modify the object tags accordingly, it works just fine.

This really made me nuts and I think I spent 6 hours trying to figure out “what I was doing wrong”. Of course, I’m not done with this yet… as this is not good behavior! I’ll have to find out if there is a logical reason for this, but it will be one more hindrance to people using ink on the web if they are developingin VS2005.

Don’t Forget: www.acehaid.org

A little more DLL hell today in VS2005 and how it affected my ClickOnce deployment

I have an application with lots of projects in it.The main project, which compiles to the EXE has references to two Janus assemblies and to one of my own assemblies (the dll, not the project). Additionally, I have about 15 assemblies that use these components and point to their dll’s in the same location as the main exe does. Somehow, something got out of whack and in design mode the main exe couldn’t “find” these 3 assemblies. I got that fixed and at the same time had to make some different changes to two of the other assemblies. After doing my update via clickonce, I couldn’t load these two assemblies in the application on client machines. I did a lot of recompiling and redeploying of specific assemblies so that I could continue with my minimal impact ClickOnce update.This means that I don’t republish and redploy the ENTIRE application, but can just move only the assembies I need to the webserver and recreate the manifests there. (I need to write an article on this).

When I tried to access the functions that loaded these assemblies, there was an error complaining about matching assemblies listed in the manifest.

“The located assesmbly’s manifest definition does not match the assembly reference”

When I opened up these projects in VS2005 and looked at the references, those three assemblies had this “<system could not find the reference specified>” in the value where the path should have been.

So, I had to load up every one of these projects and in each one, remove the existing refs to those 3 assembiles and re-add them in.

Then I rebuilt the entire solution and had to run the full publish utility on my development machine and redeploy the entire application to the web server – a two part process. Two-part, because the dynamic assemblies do not get picked up by the publish tool. I have to deploy the results of the publish, then copy that folder into a new folder (next version number), add all of the dynamic dll’s, then rebuild the manifests. (That’s part of the trick I will write about in the aforementioned article.) The whole app is about 11MB. Copying this over VPN with 350K upload speed takes longer than I have patience for, but that’s life.

Nevertheless, after a lot of copying, pastng, manifest buildng adn testing, I was able to get the whole re-jiggered app deployed without requiring the dreaded un-install. The end-users won’t even notice a thing tomorrow morning when they get back to work.

 

 

Don’t Forget: www.acehaid.org