Jump to content

Fatal Error: InituniGUIServerModule: Access violation on IIS


irigsoft

Recommended Posts

Hi,

I try to deploy my application on IIS.

When is Use it like StandAlone Application its OK, no errors shown on start session

When I Start IIS on port 80 my ISAPI, this hapen on browser

"Fatal Error: InituniGUIServerModule: Access violation at address 00404F20 in module 'eMenu.dll'. Read of address 00000000"

 

on Log file:

eMenu.dll: 00001124: 21:06:15 []:>--------------------------------------------------------------<
eMenu.dll: 00001124: 21:06:15 []:Starting Server. Module Handle: 0000000000400000
eMenu.dll: 00001124: 21:06:15 []:EAccessViolation : Access violation at address 00404F20 in module 'eMenu.dll'. Read of address 00000000 : Addr: $00404F20
eMenu.dll: 00001124: 21:06:15 [TUniServerModule]:Server Shutdown Completed.
eMenu.dll: 00001124: 21:06:15 [InitUniGUIServerModule]:Access violation at address 00404F20 in module 'eMenu.dll'. Read of address 00000000
 

on Second try to load IIS site I get this: "Fatal Error: UniGUIServerModule is not inited!"

How to analize this error?

Link to comment
Share on other sites

11 minutes ago, Farshad Mohajeri said:

Hi,

Do you have any sort of components placed on your server module?

By Design, no.

 

but on Project I use:

 

uses
  msvcrtMM,
{$IFDEF UNIGUI_ISAPI}
  uniGUIISAPI,
{$ENDIF}
  SysUtils,
  Forms,
  ServerModule in 'ServerModule.pas' {UniServerModule: TUniGUIServerModule},
  MainModule in 'MainModule.pas' {UniMainModule: TUniGUIMainModule},

...............................

{$R *.res}

{$IFDEF UNIGUI_ISAPI}
exports
  GetExtensionVersion,
  HttpExtensionProc,
  TerminateExtension;
{$ENDIF}

begin

................

 

On ServerModule

------------on BeforInit:

AllowWebMonitor := False;
GetLocaleFormatSettings(GetUserDefaultLCID, MySettings);
MySettings.DateSeparator := '.';
MySettings.TimeSeparator := ':';
MySettings.DecimalSeparator := '.';
MySettings.LongTimeFormat := 'HH:mm:ss';
MySettings.ShortDateFormat := 'dd.MM.yyyy';
MySettings.ShortTimeFormat := 'HH:mm';


Application.UpdateFormatSettings := False;

SectionsList := TStringList.Create;
SistemSettingsList := TStringList.Create;


AllowedCommands := TStringList.Create;
If FileExists (ExtractFilePath(StartPath) + 'Settings\DisabledCommands.cfg') then
  AllowedCommands.LoadFromFile (ExtractFilePath(StartPath) + 'Settings\DisabledCommands.cfg');
AllowedCommands.SaveToFile (ExtractFilePath(StartPath) + 'Settings\DisabledCommands.cfg');
AllowedCommands.Clear;
AllowedCommands.Free;

If FileExists (ExtractFilePath(StartPath) + 'Settings\BlockedIPList.cfg') then
  BlockedIPList.LoadFromFile (ExtractFilePath(StartPath) + 'Settings\BlockedIPList.cfg');

HTMLCommandsLog := TStringList.Create;
if not DirectoryExists (ExtractFileDir (Application.ExeName) + '\HtmlLog') then
  ForceDirectories (ExtractFileDir (Application.ExeName) + '\HtmlLog');


AllowedIP := TStringList.Create;
If FileExists (ExtractFilePath(StartPath) + 'Settings\AllowedIP.cfg') then
  AllowedIP.LoadFromFile (ExtractFilePath(StartPath) + 'Settings\AllowedIP.cfg');
AllowedIP.SaveToFile (ExtractFilePath(StartPath) + 'Settings\AllowedIP.cfg');
AllowedIP.Clear;
AllowedIP.Free;

SistemIni := TIniFile.Create (ExtractFilePath(StartPath) + 'Settings\SystemSettings.ini');
SistemIni.ReadSections (SectionsList);
for I := 0 to SectionsList.Count - 1 do begin
  SistemIni.ReadSectionValues (SectionsList ,tempSList);
  for J := 0 to tempSList.Count - 1 do
      SistemSettingsList.Add (tempSList [J]);
end;
SistemIni.Free;
SectionsList.Clear;
SectionsList.Free;

If not PortAvailable (IntToStr (Port)) then begin
    uniApplication.Terminate;
end;


IF AnsiUpperCase (SistemSettingsList.Values ['UseImageCash']) = 'TRUE' then
    UseGlobalImageCache := True;
 

 

------------- on Create

sFunctionTree := TuniTreeView.Create (Application);
sFunctionTree.Visible := False;
sFunctionTree.Name := 'sFunctionTree';

sElementsTree := TuniTreeView.Create (Application);
sElementsTree.Visible := False;
sElementsTree.Name := 'sElementsTree';

GetFuncTree := TuniTreeView.Create (Application);
GetFuncTree.Visible := False;
GetFuncTree.Name := 'GetFuncTree';

ShortDateFormat := 'dd.MM.yyyy';
ShortTimeFormat := 'HH:mm';
DateSeparator := '.';
LongTimeFormat := 'HH:mm:ss';
TimeSeparator := ':';
DecimalSeparator := '.';
CustomMeta.LoadFromFile (ExtractFileDir (ProcessPath) + '\files\customMeta.txt');

CustomCSS.LoadFromFile (ExtractFileDir (ProcessPath) + '\files\customCSS.txt');


MimeTable.AddMimeType('app','pkpass'); 

Link to comment
Share on other sites

Answer by IIS:

 

The Web server is configured to not list the contents of this directory.

Most likely causes:

  • A default document is not configured for the requested URL, and directory browsing is not enabled on the server.

Things you can try:

  • If you do not want to enable directory browsing, ensure that a default document is configured and that the file exists.
  • Enable directory browsing using IIS Manager.
    1. Open IIS Manager.
    2. In the Features view, double-click Directory Browsing.
    3. On the Directory Browsing page, in the Actions pane, click Enable.
  • Verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.

Detailed Error Information:

Module    DirectoryListingModule
Notification    ExecuteRequestHandler
Handler    StaticFile
Error Code    0x00000000
Requested URL http://localhost:80/eMenu/
Physical Path    D:\Webmenu\POS_Interface_Web_Escape\
Logon Method    Anonymous
Logon User

   Anonymous

 

It's like, no application started

Link to comment
Share on other sites

Log file:

emenu.dll: 00001FE4: 22:53:12 []:>--------------------------------------------------------------<
emenu.dll: 00001FE4: 22:53:12 []:Starting Server. Module Handle: 0000000000400000
emenu.dll: 00001FE4: 22:53:12 [TUniServerModule]:Server First Init.
emenu.dll: 00001FE4: 22:53:12 []:EAccessViolation : Access violation at address 76341A9D in module 'KERNEL32.DLL'. Write of address 00000198 : Addr: $76341A9D
emenu.dll: 00001FE4: 22:53:12 []:Server Started. Module Handle: 0000000000400000
emenu.dll: 0000016C: 22:53:12 [::1]:Session <OPUEvRmKET106D82322> Created.
....................................................
emenu.dll: 00001714: 22:54:04 [::1]:EAccessViolation : Access violation at address 0042BAE4 in module 'emenu.dll'. Read of address 00000000 : Addr: $0042BAE4
emenu.dll: 0000016C: 22:54:46 [::1]:Session <u7voN8AXq7106D8238E> Created.
emenu.dll: 0000016C: 22:54:46 [TUniGUIServerModule.HandleException]:EAccessViolation : Access violation at address 0042BAE4 in module 'emenu.dll'. Read of address 00000000 : Addr: $0042BAE4
emenu.dll: 0000016C: 22:54:46 [Access violation at address 00717B4B in module 'emenu.dll'. Read of address 00000000-::1]:EAccessViolation : Access violation at address 00717B4B in module 'emenu.dll'. Read of address 00000000 : Addr: $00717B4B
emenu.dll: 0000016C: 22:54:46 [TUniGUIServerModule.HandleException]:EAccessViolation : Access violation at address 0042BAE4 in module 'emenu.dll'. Read of address 00000000 : Addr: $0042BAE4
emenu.dll: 0000016C: 22:54:46 [::1]:EAccessViolation : Access violation at address 0042BAE4 in module 'emenu.dll'. Read of address 00000000 : Addr: $0042BAE4
 

Link to comment
Share on other sites

Yes, onBeforInit have a problem and it is on program code:

If i Ignore this :

-------------------------------

tempSList := TStringList.Create;

.....................

SistemIni := TIniFile.Create (ExtractFilePath(StartPath) + 'Settings\SystemSettings.ini');
SistemIni.ReadSections (SectionsList);
for I := 0 to SectionsList.Count - 1 do begin
  SistemIni.ReadSectionValues (SectionsList ,tempSList);
  for J := 0 to tempSList.Count - 1 do
      SistemSettingsList.Add (tempSList [J]);
end;

-------------------------------

no error ocured.

In this section i load all sistem settings from local INI file (like I do it on VCL)

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...