Smart Client and App.config Offline

G

Guest

Hello,

I have a smart client (Framework v1.1, No-Touch Deployment) application that
we have been using successfully for some time. We recently were testing some
of the offline capabilities of the app and ran into a serious problem. When
connected, the application launches flawlessly. However, if we try to launch
the application while "Working Offline" (no network connection), we get an
exception from IEExec.

In this offline launch scenario, all assemblies requried are in the download
cache. I have narrowed the problem down to the app.config file not being
accessible by the app in this scenario. I verified this by building the app
without the config settings and app.config file removed. In this case, the
application launched fine while the machine was offline. I put the config
file back in and the same problem arose.

So it seems to me that the <appname>.exe.config file is not being cached
properly and my question is how can I get this file to be cached and
available offline?

Any help is greatly appreciated.

Best Regards,
Tyler Foreman
 
S

Steven Cheng[MSFT]

Hi Tyler,

Welcome to the MSDN newsgroup.

As for the smartclient application's configuration in offline scenario,
I've also performed some simple tests on my side. It seems that the
app.config(xxx.exe.config can be downloaded when the machine is online),
however, when the machine is disconnected, the cached application could not
refer to the originally downloaded application config file. I think you can
check in the IIS's log file, if it is caused by config file not downloaded,
you can find some access failure entries in the log file.

Have you got this work correctly with reading the config file when the
machine is disconnected from network? At least my local tests fail to do
this. This is likely an existing behavior.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
G

Guest

Hi Steven,

Thank you for you reply. In answer to your question, I have not been able
to successfully launch the application with the machine disconnected from the
network. In fact, this is exactly what I am trying to solve. My app really
needs the ability to be launched on a machine with or without a network
connection. My testing shows that this is not possible if the application
uses the app.config file. Is this correct or is there a known workaround?

If not, it seems that this scenario sort of breaks one of the great benefits
of using smart client, which is the ability to work in occasionally connected
environments.

If there are any known workarounds, I would be eager to learn of them.
Thanks again for your reply.

Best Regards,
Tyler Foreman
 
S

Steven Cheng[MSFT]

Thanks for your response Tyler,

For the .NET 1.1's smart client winform application, I'm afraid this is a
limitation for the app.config file in offline mode. Actually, I've tested
and found that the app.config file does get downloaded in the IE's cache,
however, it is not picked up to be used in offline mode. So far I think we
may need to explicitly handle offline scenario for app.config related info.
BTW, do you think it possible or have you any future plan on upgrading it
to .NET 2.0's click once, click once in .net 2.0 has adopted a pure new
model at client-side which provide much more powerful functionality than
the smart client support in .net 1.1.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top