P
Paul Linhardt
I've been struggling with a problem using No-Touch Deployment for 10
days now. Searching the newsgroups, I can see that people have been
experiencing parts of the problem, but I haven't seen any posts about
my particular circumstances.
I have a client/server database application. Both Client & Server are
running .NET Framework 1.1.4322. The client is a VB.NET winform
application. On the server, I run a VB.NET Web Service that accesses
a MS ACCESS database and returns Strongly Typed Datasets (STD). The
Web Service uses the SOAP serializer to convert the STDs into XML
(Marshal By Object) and my VB client app converts the returned SOAP
messages back from XML to STD objects. So far, so good.
My client/server application works perfectly and is humming along
until one day my boss suggests that wouldn't it be good if we
distributed the client application using No-Touch Deployment. I place
the client app on the server and run it from within Internet Explorer.
I start getting Exceptions when I run the client app:
"System.InvalidCastException: Specified cast is not valid".
The exceptions happen only with Web Service methods that return
Strongly Typed Datasets (Web Service methods that return untyped
Datasets or other types of data work fine).
Every now and again, I compile a version of my client app that works.
If I recompile again with no changes, the new version doesn't work. A
version of myClientApp.exe that works once, always works. A version
that doesn't work, I can usually eventually get working eventually by
emptying various caches, restarting the server, etc. Once I get the
..exe working once, it continues to work. I conclude that it's not my
code that is the problem, but something about the assembly &
versioning.
Following various suggestions on newsgroups:
(1) I set the version number manually in AssemblyInfo.vb so it is not
automatically incremented with each compile
<Assembly: AssemblyVersion("0.0.1.2")>
(2) I set the http channel in the Web Service to make sure the SOAP
serialization is on:
<channel ref="http">
<serverProviders>
<provider ref="wsdl" />
<formatter ref="soap" typeFilterLevel="Full" />
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
<clientProviders>
<formatter ref="binary" />
</clientProviders>
</channel>
(3) Whenever I test the application, I clear out both the download
assembly cache (with gacutil /cdl) and IE's browser cache. I also
reset IIS from time to time.
NOW HERE'S THE WEIRD PART. By studying IIS's log, I see that whenever
I launch the app using No Touch Deployment, I see that IEExec is
making over 20 GET requests of the server. Even though my http
request is for myClientApp.exe, IEExec also tries to get
myClientApp.exe.config, myClientApp.DLL, myClientApp.resources.DLL,
etc. Most of these time out with 404 errors (no wonder it takes so
long to launch), but TWO GET requests actually succeed:
"myClientApp.exe" and "myClientApp.EXE" (spelled the same but with
different case sensitivity).
Checking the Global Assembly Cache with gacutil /ldl, I see that there
are that two copies identical copies of the assembly (same name &
version#). More useful is the IE InvalidExceptionError Window which
also shows that there are two copies of myClientApp assembly except
one has the lower case extension .exe and the other has the has the
upper case .EXE extension.
In this newsgroup, I found that it was documented that IEexec (used by
No-Touch Deployment) has a side-effect of loading two copies of your
assembly:
Subject: Assemblies deployed with IE are downloaded multiple times ?
http://groups.google.com/groups?hl=...-8&selm=OQT8XxHdCHA.1864%40tkmsftngp11&rnum=4
RE: No Touch Deployment.
http://groups.google.com/groups?hl=...NKAMy9lDHA.2416%40TK2MSFTNGP10.phx.gbl&rnum=2
For some reason, the fact that there are two versions of the assembly
(even though they are identical except the case-sensitivity of the
..EXE extension) seems to create a type-mismatch when client
application tries to deserialize the Strongly Typed Dataset in the
SOAP message.
Does anyone have any suggestions or idea of what is going on?
Thanks in advance,
Paul Linhardt
Paul_Linhardt@Lans mont.com <- remove space
days now. Searching the newsgroups, I can see that people have been
experiencing parts of the problem, but I haven't seen any posts about
my particular circumstances.
I have a client/server database application. Both Client & Server are
running .NET Framework 1.1.4322. The client is a VB.NET winform
application. On the server, I run a VB.NET Web Service that accesses
a MS ACCESS database and returns Strongly Typed Datasets (STD). The
Web Service uses the SOAP serializer to convert the STDs into XML
(Marshal By Object) and my VB client app converts the returned SOAP
messages back from XML to STD objects. So far, so good.
My client/server application works perfectly and is humming along
until one day my boss suggests that wouldn't it be good if we
distributed the client application using No-Touch Deployment. I place
the client app on the server and run it from within Internet Explorer.
I start getting Exceptions when I run the client app:
"System.InvalidCastException: Specified cast is not valid".
The exceptions happen only with Web Service methods that return
Strongly Typed Datasets (Web Service methods that return untyped
Datasets or other types of data work fine).
Every now and again, I compile a version of my client app that works.
If I recompile again with no changes, the new version doesn't work. A
version of myClientApp.exe that works once, always works. A version
that doesn't work, I can usually eventually get working eventually by
emptying various caches, restarting the server, etc. Once I get the
..exe working once, it continues to work. I conclude that it's not my
code that is the problem, but something about the assembly &
versioning.
Following various suggestions on newsgroups:
(1) I set the version number manually in AssemblyInfo.vb so it is not
automatically incremented with each compile
<Assembly: AssemblyVersion("0.0.1.2")>
(2) I set the http channel in the Web Service to make sure the SOAP
serialization is on:
<channel ref="http">
<serverProviders>
<provider ref="wsdl" />
<formatter ref="soap" typeFilterLevel="Full" />
<formatter ref="binary" typeFilterLevel="Full" />
</serverProviders>
<clientProviders>
<formatter ref="binary" />
</clientProviders>
</channel>
(3) Whenever I test the application, I clear out both the download
assembly cache (with gacutil /cdl) and IE's browser cache. I also
reset IIS from time to time.
NOW HERE'S THE WEIRD PART. By studying IIS's log, I see that whenever
I launch the app using No Touch Deployment, I see that IEExec is
making over 20 GET requests of the server. Even though my http
request is for myClientApp.exe, IEExec also tries to get
myClientApp.exe.config, myClientApp.DLL, myClientApp.resources.DLL,
etc. Most of these time out with 404 errors (no wonder it takes so
long to launch), but TWO GET requests actually succeed:
"myClientApp.exe" and "myClientApp.EXE" (spelled the same but with
different case sensitivity).
Checking the Global Assembly Cache with gacutil /ldl, I see that there
are that two copies identical copies of the assembly (same name &
version#). More useful is the IE InvalidExceptionError Window which
also shows that there are two copies of myClientApp assembly except
one has the lower case extension .exe and the other has the has the
upper case .EXE extension.
In this newsgroup, I found that it was documented that IEexec (used by
No-Touch Deployment) has a side-effect of loading two copies of your
assembly:
Subject: Assemblies deployed with IE are downloaded multiple times ?
http://groups.google.com/groups?hl=...-8&selm=OQT8XxHdCHA.1864%40tkmsftngp11&rnum=4
RE: No Touch Deployment.
http://groups.google.com/groups?hl=...NKAMy9lDHA.2416%40TK2MSFTNGP10.phx.gbl&rnum=2
For some reason, the fact that there are two versions of the assembly
(even though they are identical except the case-sensitivity of the
..EXE extension) seems to create a type-mismatch when client
application tries to deserialize the Strongly Typed Dataset in the
SOAP message.
Does anyone have any suggestions or idea of what is going on?
Thanks in advance,
Paul Linhardt
Paul_Linhardt@Lans mont.com <- remove space