Question

I have a vb.net app that webrequests a PHP file which does this:

<?php
$msg = $_GET['w'];
$logfile= 'savedrv.idps';
$fp = fopen($logfile, "w");
fwrite($fp, $msg);
fclose($fp);
?>

I want to make a PHP file that will open the new file created "savedrv.idps" so I can read it in vb.net. This is what I tried:

<?php
$logfile= 'reg.idps';
$fp = fopen($logfile, "r");
fclose($fp);
?>

How can I accomplish this?

Was it helpful?

Solution

Most likely your IIS settings for this Virtual Directory forbid a file with this extension to be browsed to. I got 404.7 error attempting to open a file in IE when I browsed to the URL: http://localhost/mysite/myvbfile.vb Using your browser, try to open the same URL that your VB program is attempting to access. I anticipate that you will get the 404.7 error in the browser window too.

You have two approaches here:

  1. Have your PHP script write the file to a location outside of IIS where your VB.Net program can access.
  2. Modify the Request Filtering in IIS for your site so that this file can be browsed. (screenshot) http://support.citrix.com/article/html/images/1CTX132655-1.gif
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top