Page 1 of 1

Can Not Create Json File In Isapi Project

PostPosted: 03 Dec 2015 15:56
by ariopax
Hi

After Convert My project from standalone to isapi when i want create json file ,the browser show this error:

"Cannot create file "C:\Windows\SysWOW64\inetsrv\wwwroot\data\Temp1234920.json". The system cannot find the path specified"

Why this error show?


Best Regards.

Re: Can Not Create Json File In Isapi Project

PostPosted: 03 Dec 2015 19:51
by assapan
Is the data folder created and does IIS have rights to access to it ?

Re: Can Not Create Json File In Isapi Project

PostPosted: 03 Dec 2015 20:04
by zsleo
This may help if it is an IIS setup / permission issue

"http://chee-yang.blogspot.de/2009/10/configure-windows-7-iis7-for-isapi-dll.html?m=1"

Re: Can Not Create Json File In Isapi Project

PostPosted: 04 Dec 2015 06:47
by ariopax
Hello and tanks assapan , zsleo

My error was this :

I dont get current directory ,and when i get current directory with below command and then create my file,the problem solved.
Code: Select all
var
  CurDir: string;
begin
  // get the app path
  CurDir := TIWAppInfo.GetAppPath;
  IWMemo1.Lines.SaveToFile(CurDir + '\wwwroot\data\' + 'Temp.txt');
end;


Best Regards.