darrenrm's Profile User Rating: -----

Reputation: 1 Apprentice
New Members
Active Posts:
4 (0.01 per day)
14-November 12
Profile Views:
Last Active:
User is offline Dec 04 2012 04:18 PM

Previous Fields

Dream Kudos:
Icon   darrenrm has not set their status

Posts I've Made

  1. In Topic: WebRequest in a CGI

    Posted 27 Nov 2012

    I got some help from Microsoft:

    add this before webrequest.create:
    AppDomain.CurrentDomain.SetData("APP_CONFIG_FILE", " c:\inetpub\wwwroot\testpgm.exe.config")

    This resolves an issue with an invalid path. The config file doesn't even have to exist. It just needs that valid path.

    add this after webrequest.create if you are using a proxy
    myRequest.Proxy = new WebProxy(“Http://”,true)
    replace with your proxy.
  2. In Topic: WebRequest in a CGI

    Posted 26 Nov 2012

    If it is the code that is wrong then WebRequest.Create should fail when running as an application and under the IDE during debugging, right? WebRequest.Create works perfectly in those two instances.

    These are the IMPORTS I am using:

    Imports System
    Imports System.Collections
    Imports System.IO
    Imports System.Text
    Imports System.Xml
    Imports System.Xml.Serialization
    Imports System.Net
  3. In Topic: WebRequest in a CGI

    Posted 15 Nov 2012

    I have set up IIS (under windows 7) to run CGIs. I would get a "do you want to run TestPGM.exe?" before I had it set up correctly. It appeared to work then but I soon learned that it was actually running as an application and not as a CGI. TestPGM.exe runs now as a CGI and works fine unless a WebRequest is attempted. We run lots of CGIs on our production servers. They are all written in VB6. I switched to VB.NET to utilize some code obtained from another source to communicate with a website using XML. The code works but I have to run it as an application. I need to get it to run as a CGI on the web server. The code that I posted is all I am executing at the moment. The messages (via console.writeline) are appropriately being returned to the browser and are displayed correctly. That tells me the CGI is basically functioning both on the web server and on IIS. I assume something needs to be setup on IIS or the web server to get this to work.

My Information

Member Title:
New D.I.C Head
Age Unknown
Birthday Unknown

Contact Information

Click here to e-mail me


darrenrm hasn't added any friends yet.


darrenrm has no profile comments yet. Why not say hello?