I have an application structured like so:
Presentation Layer -> Business Logic Layer -> Web Service Layer -> Data
Layer
When the application first loads, I need to retrieve a list of all the
stores in the system. Since my web service file is huge (11,000+ lines!) it
takes a little while for the first invocation to load. No problem, I'll
just use my handy new BackgroundWorker component, right? That seems to
work, but with a glitch.
If I open the program and let the background worker do its thing, the stores
load in the background and my app is still responsive, which is just what
you would expect. However, if I make a second web service call while the
first one is still loading, it fails on this line in the Reference.cs file:
public DataServ() {
// this line fails in the second call, it complains that
Compeat_BusinessLogic_CompeatWS_DataServ doesn't exist.
this.Url =
Compeat.BusinessLogic.Properties.Settings.Default. Compeat_BusinessLogic_CompeatWS_DataServ;
if ((this.IsLocalFileSystemWebService(this.Url) == true)) {
this.UseDefaultCredentials = true;
this.useDefaultCredentialsSetExplicitly = false;
}
else {
this.useDefaultCredentialsSetExplicitly = true;
}
}
If I wait for this initial async call to finish, all subsequent web service
calls work great. It's just when I try to basically run two at once, one
async and one blocking, that it complains that
Compeat.BusinessLogic.Properties.Settings.Default. Compeat_BusinessLogic_CompeatWS_DataServ
doesn't exist.
I don't create the Properties.Settings components and have no idea why they
are failing under this scenario. When do they get created? How do they get
created?
Any ideas?
TIA,
Mike Rodriguez