E
Endo
It seems that a number of people have been trying to pass arguments to
a smart client launched through IE. In order to get the access to the
arguments you must run in 1.1 and call
domain.GetData("APP_LAUNCH_URL"). This call only works in 1.1 and
will return null in 1.0. I don't have the resources to upgrade past
VS2000, so running in 1.1 requires a configuration file. Just a note,
configuration files are created by adding a app.config file to the
project. They config file is then copied to the executable directory.
Since IIS does not like the .config extension the config extensiong
must be renamed to .xml. The .exe, dlls, and config file must be
copied to a virtual directory.
HTML file
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 7.0">
<TITLE></TITLE>
<link rel="configuration" href="TestBedForm.exe.xml">
</HEAD>
<BODY>
<a id="app" href='TestBedForm.exe'>Launch App</a>
</BODY>
</HTML>
Config file
<configuration>
<startup>
<requiredRuntime imageVersion="v1.1.4322" version="v1.1.4322" />
<supportedRuntime version="v1.1.4322" />
</startup>
</configuration>
Unfortunatly as soon as you add arguments to the line
<a id="app" href='TestBedForm.exe'>Launch App</a>
to make it
<a id="app" href='TestBedForm.exe?arg1=arg1value'>Launch App</a>
The executable will no longer read the config file through the link
tag with arguments in the URL. So it is a chicken and an egg problem.
SOLOUTION:
Create an aspx page whose sole reason for living is to serve up a
config file called TestBedForm.exe.aspx.
TestBedForm.exe.aspx code
private void Page_Load(object sender, System.EventArgs e)
{
Response.Clear();
string txt = string.Emtpy();
txt += @"<?xml version='1.0' encoding='utf-8' ?>";
txt += @"<configuration>";
txt += @"<startup>";
txt += @"<requiredRuntime imageVersion='v1.1.4322'
version='v1.1.4322'/>";
txt += @"<supportedRuntime version='v1.1.4322' /> ";
txt += @"</startup>";
txt += @"<appsettings>";
txt += "<add key=\"sessionID\" value=\""+Session.SessionID+"\"/>";
txt += "</appsettings>";
txt += "</configuration>";
Response.Write(txt);
Response.End();
}
HTML file
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 7.0">
<TITLE></TITLE>
<link rel="configuration" href="TestBedForm.exe.aspx">
</HEAD>
<BODY>
<a id="app" href='TestBedForm.exe'>Launch App</a>
</BODY>
</HTML>
I can also include any other data I might need including the session
ID. I no longer need to pass in args through the URL. Note I also no
longer have to use 1.1. My goal is to integrate NTD apps into a sight
with a single sign on. The NTD apps should use the same session when
communicating through webservices as the website so that the website
session does not timeout while using the NTD apps. Does anybody know
if this is possible?
Endo
a smart client launched through IE. In order to get the access to the
arguments you must run in 1.1 and call
domain.GetData("APP_LAUNCH_URL"). This call only works in 1.1 and
will return null in 1.0. I don't have the resources to upgrade past
VS2000, so running in 1.1 requires a configuration file. Just a note,
configuration files are created by adding a app.config file to the
project. They config file is then copied to the executable directory.
Since IIS does not like the .config extension the config extensiong
must be renamed to .xml. The .exe, dlls, and config file must be
copied to a virtual directory.
HTML file
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 7.0">
<TITLE></TITLE>
<link rel="configuration" href="TestBedForm.exe.xml">
</HEAD>
<BODY>
<a id="app" href='TestBedForm.exe'>Launch App</a>
</BODY>
</HTML>
Config file
<configuration>
<startup>
<requiredRuntime imageVersion="v1.1.4322" version="v1.1.4322" />
<supportedRuntime version="v1.1.4322" />
</startup>
</configuration>
Unfortunatly as soon as you add arguments to the line
<a id="app" href='TestBedForm.exe'>Launch App</a>
to make it
<a id="app" href='TestBedForm.exe?arg1=arg1value'>Launch App</a>
The executable will no longer read the config file through the link
tag with arguments in the URL. So it is a chicken and an egg problem.
SOLOUTION:
Create an aspx page whose sole reason for living is to serve up a
config file called TestBedForm.exe.aspx.
TestBedForm.exe.aspx code
private void Page_Load(object sender, System.EventArgs e)
{
Response.Clear();
string txt = string.Emtpy();
txt += @"<?xml version='1.0' encoding='utf-8' ?>";
txt += @"<configuration>";
txt += @"<startup>";
txt += @"<requiredRuntime imageVersion='v1.1.4322'
version='v1.1.4322'/>";
txt += @"<supportedRuntime version='v1.1.4322' /> ";
txt += @"</startup>";
txt += @"<appsettings>";
txt += "<add key=\"sessionID\" value=\""+Session.SessionID+"\"/>";
txt += "</appsettings>";
txt += "</configuration>";
Response.Write(txt);
Response.End();
}
HTML file
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 7.0">
<TITLE></TITLE>
<link rel="configuration" href="TestBedForm.exe.aspx">
</HEAD>
<BODY>
<a id="app" href='TestBedForm.exe'>Launch App</a>
</BODY>
</HTML>
I can also include any other data I might need including the session
ID. I no longer need to pass in args through the URL. Note I also no
longer have to use 1.1. My goal is to integrate NTD apps into a sight
with a single sign on. The NTD apps should use the same session when
communicating through webservices as the website so that the website
session does not timeout while using the NTD apps. Does anybody know
if this is possible?
Endo