Execelent, exactly what I wanted.....
sServerMapPath := IaspScript.Server.MapPath('.');
I will try that now..
How do you test your ASP components?, I find that INETINFO.EXE keeps my DLL in memory,
and basically I found that shutting down the IIS Admin Service and then restarting it
and the World Wide Web Publishing Service I can then compile my control again. It
takes a good 30 seconds to shutdown, recompile, and restart IIS.
Do you use a similar method or a better way?
Chris
Christopher Crowe (Software Developer)
Microsoft MVP, MCP
Byte Computer & Software LTD
P.O Box 13-155
Christchurch
New Zealand
Phone/Fax (NZ) 03-3651-112
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Neil Anderson
> Sent: Sunday, 28 March 1999 11:52
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Translating Virtual paths to physical paths
>
>
> You can get ASP stuf from within your app
>
>
> eg, incomplete source(hacked out of my file) Hope this helps
>
> Neil
>
> function TTASPBase.OnStartPage(const pScriptContext: IUnknown): Integer;
> var
> IaspScript : IScriptingContext;
> sSessionId : widestring;
> sApplication : widestring;
> sDataBaseDSN : widestring;
> sServerMapPath : string;
> begin
> if pScriptContext <> nil then begin
> IaspScript := pScriptContext as IScriptingContext;
> sSessionId := IaspScript.Session.SessionId;
> sApplication := IaspScript.Session.get_Value('SOGApplication');
> sDataBaseDSN := IaspScript.Application.get_Value('DataBaseDSN');
> if sSessionId = '' then
> sSessionId := 'NoSessionId';
> sServerMapPath := IaspScript.Server.MapPath('.');
> end
> else begin
> // Used from test exe so no script context
> sSessionId := DEBUGSESSIONID;
> sServerMapPath := CSERVERMAPPATH;
> end;
>
> if sApplication = '' then
> sApplication := CDEFAULTAPPLICATION;
> if sDataBaseDSN = '' then
> sDataBaseDSN := CDATABASEDSN;
>
> FStatusMessage := '(Dsn : ' + sDataBaseDSN + ') '+
> '(Map Path : ' + sServerMapPath + ') '+
> '(Application : ' + sApplication + ') '+
> '(Session Id : ' + sSessionId +') ';
>
> end;
>
> > -----Original Message-----
> > From: Chris Crowe [SMTP:[EMAIL PROTECTED]]
> > Sent: Sunday, March 28, 1999 10:07 AM
> > To: Multiple recipients of list delphi
> > Subject: RE: [DUG]: Translating Virtual paths to physical paths
> >
> > I found that I can use the Server.MapPath command, but I thought my
> > control could do the translating, It does not matter that much, good
> > to find a method that works.
> >
> > <%
> > FileName = "PageLinks.Txt"
> > FileName = Server.MapPath (FileName)
> > Set ObjDelphi = Server.CreateObject("AdrockPageLinks.PageLinks")
> > ObjDelphi.FileName = FileName
> > ObjDelphi.Name = "Chris Crowe"
> > ObjDelphi.WriteInfo
> >
> > Set ObjDelphi = Nothing
> >
> > %>
> >
> > Thanks..
> >
> > Christopher Crowe (Software Developer)
> > Microsoft MVP, MCP
> >
> > Byte Computer & Software LTD
> > P.O Box 13-155
> > Christchurch
> > New Zealand
> > Phone/Fax (NZ) 03-3651-112
> >
> >
> > > -----Original Message-----
> > > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On
> > > Behalf Of Laurence Bevan
> > > Sent: Saturday, 27 March 1999 23:03
> > > To: Multiple recipients of list delphi
> > > Subject: Re: [DUG]: Translating Virtual paths to physical paths
> > >
> > >
> > > Why not use FileSystemObject directly from ASP? What type of file is
> > it?
> > >
> > > Laurence Bevan
> > >
> > >
> > > ------------------------------------------------------------------
> > > ---------
> > > New Zealand Delphi Users group - Delphi List -
> > [EMAIL PROTECTED]
> > > Website: http://www.delphi.org.nz
> > > 5yZ-~bRǫ
> > 躐-~b.+-ui?'^-~b'g>+^?i0ץ
> ------------------------------------------------------------------
> ---------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
>
{^jVt7삺.7]zZaץ Yס0ui*+|