Reputation: 1 Apprentice
- New Members
- Active Posts:
- 4 (0.01 per day)
- 14-November 12
- Profile Views:
- Last Active:
- Dec 04 2012 04:18 PM
- Dream Kudos:
Posts I've Made
Posted 27 Nov 2012I 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://10.0.0.15:8081”,true)
replace 10.0.0.15:8081 with your proxy.
Posted 26 Nov 2012If 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
Posted 15 Nov 2012I 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.
- Member Title:
- New D.I.C Head
- Age Unknown
- Birthday Unknown
- Click here to e-mail me
darrenrm hasn't added any friends yet.