Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > how to make a dll registrating in registry from a webserver

Reply
Thread Tools

how to make a dll registrating in registry from a webserver

 
 
Lars Skogshus
Guest
Posts: n/a
 
      04-20-2006
I made a UserControl in VB.NET and uploaded it to the webserver, my problem
is that the dll dont register in the registy at the client registry. I
think it do How should i do?
here is my code from the website.

<html>
<body color=white>
<hr>
<font face=arial size=1>
<object id="myControl1" name="myControl1"
classid="clsid:50BC5B6D-95F8-4831-A34D-69CB7029C950"
CODEBASE="http://test.itk.nu/myx.dll" width=288 height=72></object>
</font>
<form name="frm" id="frm">
<input type="text" name="txt" value="enter text here"><input type=button
value="Click me" onClick="doScript();">
</form>
<hr>
</body>

<script language="javascript">
function doScript()
{
myControl1.UserText = frm.txt.value;
}
</script>
</html>

This is the code from VB:

Imports System.Runtime.InteropServices
Imports System
Imports System.Reflection

<Assembly: AssemblyKeyFileAttribute("myx.snk")>
<GuidAttribute("50BC5B6D-95F8-4831-A34D-69CB7029C950")> _

Public Class mycontrol
Inherits System.Windows.Forms.UserControl
Private mStr_UserText As String
Public Property UserText() As String
Get
Return mStr_UserText
End Get
Set(ByVal Value As String)
mStr_UserText = Value
txtUserText.Text = Value
End Set
End Property

#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()

InitializeComponent()
End Sub

Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

Private components As System.ComponentModel.IContainer
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents txtUserText As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.txtUserText = New System.Windows.Forms.TextBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.SuspendLayout()
Me.txtUserText.Location = New System.Drawing.Point(128, 40)
Me.txtUserText.Name = "txtUserText"
Me.txtUserText.Size = New System.Drawing.Size(296, 20)
Me.txtUserText.TabIndex = 0
Me.txtUserText.Text = "TextBox1"
Me.Button1.Location = New System.Drawing.Point(48, 40)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 1
Me.Button1.Text = "Button1"
Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1,
Me.txtUserText})
Me.Name = "mycontrol"
Me.Size = New System.Drawing.Size(464, 152)
Me.ResumeLayout(False)
End Sub
#End Region


Private Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim WSH
Dim t As String
WSH = CreateObject("WScript.Shell")
txtUserText.Text = WSH.RegRead("HKLM\Software\Microsoft\Internet
Explorer\Version")
End Sub
End Class




 
Reply With Quote
 
 
 
 
bruce barker \(sqlwork.com\)
Guest
Posts: n/a
 
      04-20-2006
..net controls hosted by IE run in a sandbox just java applets, and do not
access to the registery.you will have to change security settings.

-- bruce (sqlwork.com)


"Lars Skogshus" <(E-Mail Removed)> wrote in message
news:e282be$3ef$(E-Mail Removed)...
>I made a UserControl in VB.NET and uploaded it to the webserver, my problem
>is that the dll dont register in the registy at the client registry. I
>think it do How should i do?
> here is my code from the website.
>
> <html>
> <body color=white>
> <hr>
> <font face=arial size=1>
> <object id="myControl1" name="myControl1"
> classid="clsid:50BC5B6D-95F8-4831-A34D-69CB7029C950"
> CODEBASE="http://test.itk.nu/myx.dll" width=288 height=72></object>
> </font>
> <form name="frm" id="frm">
> <input type="text" name="txt" value="enter text here"><input type=button
> value="Click me" onClick="doScript();">
> </form>
> <hr>
> </body>
>
> <script language="javascript">
> function doScript()
> {
> myControl1.UserText = frm.txt.value;
> }
> </script>
> </html>
>
> This is the code from VB:
>
> Imports System.Runtime.InteropServices
> Imports System
> Imports System.Reflection
>
> <Assembly: AssemblyKeyFileAttribute("myx.snk")>
> <GuidAttribute("50BC5B6D-95F8-4831-A34D-69CB7029C950")> _
>
> Public Class mycontrol
> Inherits System.Windows.Forms.UserControl
> Private mStr_UserText As String
> Public Property UserText() As String
> Get
> Return mStr_UserText
> End Get
> Set(ByVal Value As String)
> mStr_UserText = Value
> txtUserText.Text = Value
> End Set
> End Property
>
> #Region " Windows Form Designer generated code "
> Public Sub New()
> MyBase.New()
>
> InitializeComponent()
> End Sub
>
> Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
> If disposing Then
> If Not (components Is Nothing) Then
> components.Dispose()
> End If
> End If
> MyBase.Dispose(disposing)
> End Sub
>
> Private components As System.ComponentModel.IContainer
> Friend WithEvents Button1 As System.Windows.Forms.Button
> Friend WithEvents txtUserText As System.Windows.Forms.TextBox
> <System.Diagnostics.DebuggerStepThrough()> Private Sub
> InitializeComponent()
> Me.txtUserText = New System.Windows.Forms.TextBox()
> Me.Button1 = New System.Windows.Forms.Button()
> Me.SuspendLayout()
> Me.txtUserText.Location = New System.Drawing.Point(128, 40)
> Me.txtUserText.Name = "txtUserText"
> Me.txtUserText.Size = New System.Drawing.Size(296, 20)
> Me.txtUserText.TabIndex = 0
> Me.txtUserText.Text = "TextBox1"
> Me.Button1.Location = New System.Drawing.Point(48, 40)
> Me.Button1.Name = "Button1"
> Me.Button1.TabIndex = 1
> Me.Button1.Text = "Button1"
> Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1,
> Me.txtUserText})
> Me.Name = "mycontrol"
> Me.Size = New System.Drawing.Size(464, 152)
> Me.ResumeLayout(False)
> End Sub
> #End Region
>
>
> Private Sub Button1_Click(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles Button1.Click
> Dim WSH
> Dim t As String
> WSH = CreateObject("WScript.Shell")
> txtUserText.Text = WSH.RegRead("HKLM\Software\Microsoft\Internet
> Explorer\Version")
> End Sub
> End Class
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to determine if a DLL is a COM DLL or .NET DLL Anushi ASP .Net 5 10-28-2004 01:59 PM
create asp webserver without registry for finding aspnet_isapi.dll. boy0612 ASP .Net 1 08-19-2004 09:45 PM
create asp webserver without registry boy0612 ASP .Net Web Services 0 08-19-2004 04:59 PM
Registrating database Thomas Computer Support 3 05-16-2004 07:38 PM
msvcrt.dll, msvcirt.dll, msvcrt20.dll and msvcrt40.dll, explanation please! Snoopy NZ Computing 16 08-25-2003 12:34 PM



Advertisments