Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread (Access to restricted URI denied)
Wed, Mar 16 2016 9:12 AMPermanent Link

kamran

Using the pdfclient webmodule example:

1. changed the pdf directory path in the source to c:\web\pdfs then recompiled

2. I added the pdfmodule to the web server

3. I ran the code to display the pdfs on my local machine

eg EWBServer ruuning independently (not in IDE)
and then calling the javascript code from folder

I used username = demo
and password = Password

I also tried:

Username = Administrator
password = EWBDefault

This is what I get:

Error: executing request "modules/pdfmodule" (Access to restricted URI denied)

Whats wrong here?

Some security issue?

All I did was change the path name of the example as above

Regards

Kamran
Wed, Mar 16 2016 10:26 AMPermanent Link

Riaz

kamran

i had this working http://epos4bars.com/reports.html

maybe something you done wrong, maybe upload the code so someone can guide you

the help here is awesome

Riaz
Wed, Mar 16 2016 10:33 AMPermanent Link

Riaz

kamran

i had this working http://epos4bars.com/reports.html

maybe something you done wrong, maybe upload the code so someone can guide you

the help here is awesome

Riaz
Thu, Mar 17 2016 6:04 AMPermanent Link

kamran

Thanks

So my code is as follows:

In EWB:

procedure TfViewPDF.fViewPDFCreate(Sender: TObject);
begin
  with PDFServerRequest do
     begin
     { Set the authentication information as URL parameters }
     Params.Values['user']:='Demo';
     Params.Values['password']:='Password';
     Params.Values['method']:='list';
     URL:='modules/pdfmodule';
     Execute;
     end;
end;

.....


in Delphi:


procedure TEWBModule1.EWBModuleExecute(Request: TEWBServerRequest);
var
  TempPDFDirectory: String;
  TempFiles: TStringList;
  I: Integer;
  TempRootFileName: String;
  TempFileName: String;
  TempFileStream: TFileStream;
begin
  if AuthenticateUser(Request) then
     begin
     // For demo, PDF files source directory is "pdfs" subdirectory under
     // example projects pdfmodule directory
     TempPDFDirectory:=IncludeTrailingBackslash(OSDocumentsDirectory)+'Web\pdfs';
.......
.......


What path is working in your cases ?


kamran wrote:

Using the pdfclient webmodule example:

1. changed the pdf directory path in the source to c:\web\pdfs then recompiled

2. I added the pdfmodule to the web server

3. I ran the code to display the pdfs on my local machine

eg EWBServer ruuning independently (not in IDE)
and then calling the javascript code from folder

I used username = demo
and password = Password

I also tried:

Username = Administrator
password = EWBDefault

This is what I get:

Error: executing request "modules/pdfmodule" (Access to restricted URI denied)

Whats wrong here?

Some security issue?

All I did was change the path name of the example as above

Regards

Kamran
Fri, Mar 18 2016 2:46 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Kamran,

<< Error: executing request "modules/pdfmodule" (Access to restricted URI denied) >>

Where did you load the EWB application from ?  It has to be loaded from the EWB Web Server in order to access modules using a relative path.

Tim Young
Elevate Software
www.elevatesoft.com
Image