Windows Control, Strong Name Problems

bla

New member
Joined
Oct 17, 2007
Messages
4
Programming Experience
5-10
All,

I am having trouble assigning a StrongName to a Windows Control.

I have reduced the problem down to the bare essentials. The project is called PlainControl. The entire control code is as follows:

Imports System.Reflection
'<Assembly: AssemblyKeyFileAttribute("C:\Share\sgkey.snk")>

Public Class UserControl1

Private Sub UserControl1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
End Class


I am attempting to bring the code up in a browser. The entire browser code is:

<object classid="PlainControl.dll#PlainControl.UserControl1"
width="100%" height="100%" padding="0" margins="0">

</object>

I am opening this via Visual Studio - IIS is not running on the current machine.

When the second line of the control project is commented out, the control comes up fine in the browser. When the line is left in, it does not come up.

Thanks for any help
 
VB User Control

Did you ever solve this problem?

I have a similar proplem, I created a VB User Control 'MyDetails' and embeded it in a WEB page and it worked fine untill I tried to read the UserName then all stopped.

HTML:
Expand Collapse Copy
<div>
        This is my user control.
        <object id="MyDetails" assid="http:MyDetails.dll#MyDetails.Details" VIEWASTEXT>
        </object>
    </div>

I used the above code to load me User Control into the WEB page

VB.NET:
Expand Collapse Copy
lblComputerName.Text = "My Server"
lblUserName.Text = "My User Name"

This code worked fine and displays the text as lables.

VB.NET:
Expand Collapse Copy
lblComputerName.Text = My.Computer.Name
lblUserName.Text = My.User.Name

This code never worked in a WEB Page. I tested it by embeding the VB User Control in a Window Form and all worked fine. Strange.

I have also Strong Signed the Assembly too, still no joy.
 
Back
Top