Article View: borland.public.cppbuilder.internet.web
Article #1321Re: Windows 2003 Server w/ IIS 6
From: Brian Plotkin
Date: Thu, 24 Mar 2005 00:10
Date: Thu, 24 Mar 2005 00:10
86 lines
4678 bytes
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?
>
>
>
Technical Details
Message-ID:
<42420595@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx02.iad01.newshosting.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<423b34db$1@newsgroups.borland.com> <423f4277$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,8f286b6fd3089ed2 X-Google-Attributes: gidfeeec,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 23 Mar 2005 18:10:52 -0600 From: Brian Plotkin <brian.plotkin@us.fujitsu.com> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.web Subject: Re: Windows 2003 Server w/ IIS 6 References: <423b34db$1@newsgroups.borland.com> <423f4277$1@newsgroups.borland.com> In-Reply-To: <423f4277$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 167.254.147.91 Message-ID: <42420595@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1111623061 167.254.147.91 (23 Mar 2005 16:11:01 -0800) Lines: 86 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx02.iad01.newshosting.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!news-in.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail