Problem with .NET Window control in ASP.NET

  • Thread starter Thread starter Theodoros.Savvides
  • Start date Start date
T

Theodoros.Savvides

Hi All,

We are developing an application and we have a problem for which I cannot
find any information anywhere.
The application consists of a windows user control and an ASP.NET
application that has a Web Form loading this control using the object tag.
The HTML code looks like this:

<OBJECT id="LoginControl" style="WIDTH: 673px; HEIGHT: 388px"
classid="../WinControls/CommonWinControls.dll#CommonWinControls.UCBatchForm"
name="LoginControl" VIEWASTEXT>
<PARAM NAME="HideAcq" VALUE="<%=HideAcq%>">
<PARAM NAME="AcqFormType" VALUE="<%=AcqFormType%>">
<PARAM NAME="AllowAccess" VALUE="<%=AllowAccess%>">
<PARAM NAME="strUser" VALUE="<%=strUser%>">
<PARAM NAME="SelectedConnection"
VALUE="<%=SelectedConnection%>">
<PARAM NAME="CurCulture" VALUE="<%=CurCulture%>">
<PARAM NAME="DBDate" VALUE="<%=DBDate%>">
<PARAM NAME="SupervisorGroup"
VALUE="<%=strSuperVisorGroup%>">
</OBJECT>

Assumption for this is to have .NET Framework installed on the client
machine and trust the resource coming from the web server. We would expect
the dll to be downloaded to the client machine the first time the machine
requests the aspx page that contains this control. Instead of that, the
problem that we are facing is that the control seems to be downloaded
every time you request the page. It looks like the machine 'does not know'
that the control has been used in the past and it will force to download
again.

We have recreated the assemblies that are being downloaded as strong named
assemblies. The steps we followed are as below:
1. sn -k "testkey.snk"
2. Included in the AssemblyInfo.vb the line that points to the file:
<Assembly: AssemblyKeyFileAttribute("testkey.snk")>
3. Rebuilded the assemblies and created the dll. Copied the dll in the
directory from where we reference it using the object tag in the
webapplication.
4. Tried again.

I don't see any difference. I am using the FUSLOGVW.EXE and the GACUTIL
commands to see what's going on and the results are:

GACUTIL1.txt is the GACYTIL /ldl output after the first time the app is
run. FUSLOGVW (FUSLOGVW1.txt) is showing that the cache lookup in
unsuccessful. The weird thing is that when I open a new Internet Explorer
window requesting the application again (same machine and the first
instance is still running) when I run again the gacutil /ldl command it
will show me that the files are downloaded again so the total number of
files is now 4. Using the same logic if the application is run again the
number of files will go on 6 then 8, 10... and so on.

I even tried to add the dll in the GAC, using the gacutil /i
Commonwincontrols.dll. This adds the dll successfully and I can see this
be running the gacutil /lr. But the behavior stays the same.

Any ideas?

Thanks in advance
 
Hi Marco.

I tested this. For some reason I cannot get the textbox and the button.
When i look in the GAC though it has one entry for the windows control
library.

WindowsControlLibrary1, Version=1.0.1250.31651, Culture=neutral,
PublicKeyToken=null, Custom=null

This entry remains one i.e. i do not get a new entry when I open a new IE.
Which is what I wanted to do in my side.
Can I ask you to send me the WindowsControllibrary and webapplication
projects? I can then see in the code what is it that you are doing
different from us that works :-) !

Also, I noticed in the aspx page the folowing attribute that I donot
understand. What is it used for?
data
="data:application/x-oleobject;base64,IGkzJfkDzxGP0ACqAGhvEzwhRE9DVFlQRSBIVE1MIFBVQkxJQyAiLS8vVzNDLy9EVEQgSFRNTCA0LjAgVHJhbnNpdGlvbmFsLy9FTiI+DQo8SFRNTD48SEVBRD4NCjxNRVRBIGh0dHAtZXF1aXY9Q29udGVudC1UeXBlIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD13aW5kb3dzLTEyNTIiPg0KPE1FVEEgY29udGVudD0iTVNIVE1MIDYuMDAuMjgwMC4xMTcwIiBuYW1lPUdFTkVSQVRPUj48L0hFQUQ+DQo8Qk9EWT4NCjxQPiZuYnNwOzwvUD48L0JPRFk+PC9IVE1MPg0K"

BTW I have .NET Framework 1.0 with SP2.

Thanks
Theo
 
Hello Theodoros,
It seems that you want your windows control to be downloaded only the first
time. I asked the IE client team about this,
and they told me that you can't do anything about it. The good thing is
that it download part of it. Not all the control
is downloaded. You can check on this by taking a Netmon Trace.

For more information on Netmon check the following Kb articles:

812953 HOW TO: Use Network Monitor to Capture Network Traffic
http://support.microsoft.com/?id=812953

295405 HOWTO: Capture TCP and HTTP Data Frames Using Network Monitor and
MSXML
http://support.microsoft.com/?id=295405

310875 Description of the Network Monitor Capture Utility
http://support.microsoft.com/?id=310875

Please let me know if you need to download Netmon. Usually Microsoft
Systems Management Server (SMS)
includes Network Monitor.


Thanks,
Bassel Tabbara
Microsoft, ASP.NET

This posting is provided "AS IS", with no warranties, and confers no rights.


--------------------
| From: (e-mail address removed)
| Subject: Problem with .NET Window control in ASP.NET
| MIME-Version: 1.0
| X-Newsreader: Lotus Notes Release 6.0 September 26, 2002
| X-MIMETrack: Serialize by Notes Client on Theodoros A
Savvides/NIC/CTL(Release 6.0|September
| 26, 2002) at 09/07/2003 11:39:57
| Content-Type: multipart/mixed; boundary="=_mixed 002F9A8DC2256D5E_="
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Date: Wed, 09 Jul 2003 01:39:58 -0700
| NNTP-Posting-Host: 213.207.151.60
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:157945
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hi All,
|
| We are developing an application and we have a problem for which I cannot
| find any information anywhere.
| The application consists of a windows user control and an ASP.NET
| application that has a Web Form loading this control using the object
tag.
| The HTML code looks like this:
|
| <OBJECT id="LoginControl" style="WIDTH: 673px; HEIGHT: 388px"
|
classid="../WinControls/CommonWinControls.dll#CommonWinControls.UCBatchForm"

| name="LoginControl" VIEWASTEXT>
| <PARAM NAME="HideAcq" VALUE="<%=HideAcq%>">
| <PARAM NAME="AcqFormType" VALUE="<%=AcqFormType%>">
| <PARAM NAME="AllowAccess" VALUE="<%=AllowAccess%>">
| <PARAM NAME="strUser" VALUE="<%=strUser%>">
| <PARAM NAME="SelectedConnection"
| VALUE="<%=SelectedConnection%>">
| <PARAM NAME="CurCulture" VALUE="<%=CurCulture%>">
| <PARAM NAME="DBDate" VALUE="<%=DBDate%>">
| <PARAM NAME="SupervisorGroup"
| VALUE="<%=strSuperVisorGroup%>">
| </OBJECT>
|
| Assumption for this is to have .NET Framework installed on the client
| machine and trust the resource coming from the web server. We would
expect
| the dll to be downloaded to the client machine the first time the machine
| requests the aspx page that contains this control. Instead of that, the
| problem that we are facing is that the control seems to be downloaded
| every time you request the page. It looks like the machine 'does not
know'
| that the control has been used in the past and it will force to download
| again.
|
| We have recreated the assemblies that are being downloaded as strong
named
| assemblies. The steps we followed are as below:
| 1. sn -k "testkey.snk"
| 2. Included in the AssemblyInfo.vb the line that points to the file:
| <Assembly: AssemblyKeyFileAttribute("testkey.snk")>
| 3. Rebuilded the assemblies and created the dll. Copied the dll in the
| directory from where we reference it using the object tag in the
| webapplication.
| 4. Tried again.
|
| I don't see any difference. I am using the FUSLOGVW.EXE and the GACUTIL
| commands to see what's going on and the results are:
|
| GACUTIL1.txt is the GACYTIL /ldl output after the first time the app is
| run. FUSLOGVW (FUSLOGVW1.txt) is showing that the cache lookup in
| unsuccessful. The weird thing is that when I open a new Internet Explorer
| window requesting the application again (same machine and the first
| instance is still running) when I run again the gacutil /ldl command it
| will show me that the files are downloaded again so the total number of
| files is now 4. Using the same logic if the application is run again the
| number of files will go on 6 then 8, 10... and so on.
|
| I even tried to add the dll in the GAC, using the gacutil /i
| Commonwincontrols.dll. This adds the dll successfully and I can see this
| be running the gacutil /lr. But the behavior stays the same.
|
| Any ideas?
|
| Thanks in advance
|
|
 
Back
Top