This is an issue we picked up on when trying to crowbar nice features in to BizDesk on Commerce Server 2002.
Essentailly, we did a piece of work in .Net that we want to be able to call from the BizDesk (which is all nasty classic ASP). The achieve this in development, there are a couple of things that you do to make you assmeblies work.
You basically add the entire universe according to Bill Gates in to the GAC (Global Assembly Cache), and then you run REGASM from the .Net command prompt on the key entry point assemblies (i.e the ones that you want to use Server.Create on). For dev, this is fine. But when we come to deploying things its no fun, so this is what you do...
Resolution of Problem:
In our exciting little setup project in vs.net, we make sure that two things are done.
- The primary output of all of the projects we need is added to the file system fodlers
- The primary output of all of the projects we need is added to the GAC folders (reight click, add special folders blah blah - I'll detatil setup projects further at a later time)
Once this is done all of our files will go where we need them to go. Unfortunately, your ASP app will still not be able to see the assemblies that you want unless you do a regasm. Well, this is not true. Before you build your setup projects, select the properties of you assemblies that you want to be visible to COM. In their properties, set the Register property to have a value of
vsdrpCPOM. This will make the compiler add all of the necessary detail to the MSI package and make it effectively do REGASM for you. You do NOT need to do anything else to make this happen. All rather easy really. :)
NOTE: To run REGASM, you need to have a string named key on the assmebly. TO do this see the help on SN.EXE.
As an additional to this, should you want to perform all fo this without using an installer application, you can of course use the command line to do it (assuming all is nicely installed on the target server). You should be able to locate REGASM.exe and GACUTIL.exe, these are all you need to use.
So, assume that you have an assembly in C:\MyStuff named JEFF.dll. IN order to get your ASP pages to access it, type the following at the command prompt:
%WINDIR%\Microsoft.Net\Framework\v1.1.4322\RegAsm C:\MyStuff\JEFF.dll
%WINDIR%\Microsoft.Net\Framework\v1.1.4322\GacUtil C:\MyStuff\JEFF.dll
Job done.
Not quite...
double check that your webuser has sufficient permissions on the winnt/temp directory.