I am rewriting the old WSCWript WSC component into a nicer C # COM component.
For some terrible reason, the old component is transferred in one place to the server context, IServer using
Set objCurr = CreateObject("MTxAS.AppServer.1") Set objCurrObjCont = objCurr.GetObjectContext() Set component.servercontext = objCurrObjCont("Server")
then it is used to execute the standard Server.MapPath("/somelocation")
However, I do not understand what to do in the .Net COM component, System.Web.HttpContext.Current.MapPath() does not work as expected, since there is no web context.
I tried passing the context from the classic ASP to the COM component, but I'm not sure which link to include so that I can call the correct member, Microsoft.Active X Data Objects 2.7 seems to be common, but this only includes Recordsets, etc. , nothing for the C ++ IServer interface, so this just happens as a COM OBJECT .
Does anyone know how to do this / work? At this speed, I think I might have to change the behavior of the component
source share