🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.web
3 messages
3 total messages Started by Brian Plotkin Fri, 18 Mar 2005 20:06
Windows 2003 Server w/ IIS 6
#1311
Author: Brian Plotkin
Date: Fri, 18 Mar 2005 20:06
14 lines
1539 bytes
I have a web application that runs perfectly well under IIS 5 on Windows 
XP Server. It has been moved to IIS 6 under Windows 2003 Server and now 
I get:

Internal Server Error 500
Exception: EAccessViolation
Message: Access violation at address 77F4831D in module 'ntdll.dll'. 
Write of address 00427F49

I even tried creating a new CGI stand-alone executable that did nothing 
more than setting Response->Content to 'foo'. This new executable 
produced the same error. The application in set to not use RTL nor 
dynamic run-time packages (e.g. everything is linked in the exe). Any 
ideas how to solve?
Re: Windows 2003 Server w/ IIS 6
#1313
Author: ksdafh
Date: Mon, 21 Mar 2005 21:54
52 lines
3258 bytes
Almost certainly this is caused by incorrect IIS 6 permissions.

Whereas IIS 5 was set up by default to be "wide open" and you locked down 
what you didnt want; IIS6 is the exact opposite. It is locked down by 
default and you open up what you need...

Some of the things you may need to do are (particularly #5):

1) Ensure you have created a default web site like any other, we configure 
web-sites / properties / Directory Security / Edit, and ensure "Enable 
Anonymous Access" is on. Also - make sure that you use a user whom is 
granted anonymous access to the IIS pages (see users config below).

2) Under users find the Internet Guest Account - Right click / properties. 
Under General - the guest account is disabled by default! Enable it.

3) Add your scripts virtual directory using the new virtual directory 
creation wizard (right click / new / virtual directory...) and give that 
directory Execute only permissions. Ensure you add the YOURCGIAPP.exe.

3a) Click on the Default web site, right click permissions - find the 
IIS_WPG Account and the Internet Guest Account. Depending on your other 
settings, one or both of them must be configured correctly to be able to 
access your CGI. Ensure that at least the IIS_WPG (worker process group) has 
read & execute permissions.

4) Now configure/check the scripts directory permissions. Ensure the 
Internet Guest Account has access to this particular directory and that the 
IIS_WPG has access too. If they aren't there - add them.

**5) Click web service extensions. "Allow" - "All Unknown CGI Extensions". 
(you may wish to allow some other stuff here too. ASP etc.)

GL
Z.



"Brian Plotkin" <brian.plotkin@us.fujitsu.com> wrote in message 
news:423b34db$1@newsgroups.borland.com...
>I have a web application that runs perfectly well under IIS 5 on Windows XP 
>Server. It has been moved to IIS 6 under Windows 2003 Server and now I get:
>
> Internal Server Error 500
> Exception: EAccessViolation
> Message: Access violation at address 77F4831D in module 'ntdll.dll'. Write 
> of address 00427F49
>
> I even tried creating a new CGI stand-alone executable that did nothing 
> more than setting Response->Content to 'foo'. This new executable produced 
> the same error. The application in set to not use RTL nor dynamic run-time 
> packages (e.g. everything is linked in the exe). Any ideas how to solve? 
Re: Windows 2003 Server w/ IIS 6
#1321
Author: Brian Plotkin
Date: Thu, 24 Mar 2005 00:10
86 lines
4678 bytes
Actually, it's not a permissions problem, but thanks for the reply. The 
problem is within the VCL code itself. The fix (eventually found on 
qc.borland.com) is as follows:

  Locate SysUtil.pas. Edit definition of GetEnvironmentVariable as below 
and place it in lib-folder.

function GetEnvironmentVariable(const Name: string): string;
var
   Len: integer;
   W  : String;//Jb 14.8.03 Server 2003 CGI-fix
begin
   Result := '';
   SetLength(W,1);//Jb 14.8.03 Server 2003 CGI-fix
   Len := GetEnvironmentVariable(PChar(Name), PChar(W), 1); //Jb 14.8.03
//  Len := GetEnvironmentVariable(PChar(Name), Nil, 0);
   if Len > 0 then
   begin
     SetLength(Result, Len - 1);
     GetEnvironmentVariable(PChar(Name), PChar(Result), Len);
   end;
end;

After making this change, everything worked as expected.

However, I now have a follow-on question: How do I make this .OBJ part 
of the default so I don't have to add this file to each and every web 
project I make?

ksdafh wrote:
> Almost certainly this is caused by incorrect IIS 6 permissions.
> 
> Whereas IIS 5 was set up by default to be "wide open" and you locked down 
> what you didnt want; IIS6 is the exact opposite. It is locked down by 
> default and you open up what you need...
> 
> Some of the things you may need to do are (particularly #5):
> 
> 1) Ensure you have created a default web site like any other, we configure 
> web-sites / properties / Directory Security / Edit, and ensure "Enable 
> Anonymous Access" is on. Also - make sure that you use a user whom is 
> granted anonymous access to the IIS pages (see users config below).
> 
> 2) Under users find the Internet Guest Account - Right click / properties. 
> Under General - the guest account is disabled by default! Enable it.
> 
> 3) Add your scripts virtual directory using the new virtual directory 
> creation wizard (right click / new / virtual directory...) and give that 
> directory Execute only permissions. Ensure you add the YOURCGIAPP.exe.
> 
> 3a) Click on the Default web site, right click permissions - find the 
> IIS_WPG Account and the Internet Guest Account. Depending on your other 
> settings, one or both of them must be configured correctly to be able to 
> access your CGI. Ensure that at least the IIS_WPG (worker process group) has 
> read & execute permissions.
> 
> 4) Now configure/check the scripts directory permissions. Ensure the 
> Internet Guest Account has access to this particular directory and that the 
> IIS_WPG has access too. If they aren't there - add them.
> 
> **5) Click web service extensions. "Allow" - "All Unknown CGI Extensions". 
> (you may wish to allow some other stuff here too. ASP etc.)
> 
> GL
> Z.
> 
> 
> 
> "Brian Plotkin" <brian.plotkin@us.fujitsu.com> wrote in message 
> news:423b34db$1@newsgroups.borland.com...
> 
>>I have a web application that runs perfectly well under IIS 5 on Windows XP 
>>Server. It has been moved to IIS 6 under Windows 2003 Server and now I get:
>>
>>Internal Server Error 500
>>Exception: EAccessViolation
>>Message: Access violation at address 77F4831D in module 'ntdll.dll'. Write 
>>of address 00427F49
>>
>>I even tried creating a new CGI stand-alone executable that did nothing 
>>more than setting Response->Content to 'foo'. This new executable produced 
>>the same error. The application in set to not use RTL nor dynamic run-time 
>>packages (e.g. everything is linked in the exe). Any ideas how to solve? 
> 
> 
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads