I have a class library that is COM visible as it is instantiated via webpage.
V1 of this class library is live and has been installed on client machines so that when they navigate to
http://MySuperPage.com it is instantied via
where it then works its funky magic.
I am about to release V2 in a beta state and what I would like to do is install this alongside the eixsting live version and point the users to http://MySuperPage.com/BETA
Once the beta is signed off http://MySuperPage.com is updated with the relevant server side changes, http://MySuperPage.com/BETA is turned off and the user installs V2 gold.
The first obvious route was to simply give the exposed class a different GUID and to use this in the BETA site:
But this failed - and I thought this might be because it still had the same ProgID, so I ...
Which didn't work and inspecting the .tlb file showed that the prog ids hadn't changed at all, so I ...
Which did change prog ids, but the object still wasn't instantiated in the web page.
In for a penny, In for a pound I also changed the assembly guid
- but to no avail.
How can I troubleshoot this - I don't know why the class library is not being instantiated and I don't know where to start looking.
Or - is this the wrong approach to take?
V1 of this class library is live and has been installed on client machines so that when they navigate to
http://MySuperPage.com it is instantied via
Code:
document.write('<object id=MyClassLibrary classid="clsid:457B56D5-9D7C-1263-AD19-702596EDC095"></object>');
I am about to release V2 in a beta state and what I would like to do is install this alongside the eixsting live version and point the users to http://MySuperPage.com/BETA
Once the beta is signed off http://MySuperPage.com is updated with the relevant server side changes, http://MySuperPage.com/BETA is turned off and the user installs V2 gold.
The first obvious route was to simply give the exposed class a different GUID and to use this in the BETA site:
Code:
mycsfile.cs:
#if ALPHA || BETA
[Guid("B7C5EBDE-5BCF-49d3-935F-BA482B51F2DB")]
#else
[Guid("457B56D5-9D7C-1263-AD19-702596EDC095")]
#endif
public class MyClassLibrary : IObjectSafety
myHTMLfile.htm:
document.write('<object id=MyClassLibrary classid="clsid:B7C5EBDE-5BCF-49d3-935F-BA482B51F2DB"></object>');
Code:
mycsfile.cs:
#if ALPHA || BETA
[Guid("B7C5EBDE-5BCF-49d3-935F-BA482B51F2DB")]
[ProgId("BlahBlahBlah.YaddaYaddaYadda.MyClassLibraryV2")]
#else
[Guid("457B56D5-9D7C-1263-AD19-702596EDC095")]
#endif
public class MyClassLibrary : IObjectSafety
Code:
mycsfile.cs:
#if ALPHA || BETA
[Guid("B7C5EBDE-5BCF-49d3-935F-BA482B51F2DB")]
public class MyClassLibraryV2 : IObjectSafety
#else
[Guid("457B56D5-9D7C-1263-AD19-702596EDC095")]
public class MyClassLibrary : IObjectSafety
#endif
In for a penny, In for a pound I also changed the assembly guid
Code:
AssemblyInfo.cs
#if ALPHA || BETA
[assembly: Guid("A3754D96-5414-3aed-B183-D4F24354E763")]
#else
[assembly: Guid("05c5ddbe-e06b-3b85-a255-4ac49c65413e")]
#endif
How can I troubleshoot this - I don't know why the class library is not being instantiated and I don't know where to start looking.
Or - is this the wrong approach to take?