Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   how to make a dll registrating in registry from a webserver (http://www.velocityreviews.com/forums/t152718-how-to-make-a-dll-registrating-in-registry-from-a-webserver.html)

Lars Skogshus 04-20-2006 01:30 PM

how to make a dll registrating in registry from a webserver
 
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





bruce barker \(sqlwork.com\) 04-20-2006 04:00 PM

Re: how to make a dll registrating in registry from a webserver
 
..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" <lars@itk.nu> wrote in message
news:e282be$3ef$1@emma.aioe.org...
>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
>
>
>
>





All times are GMT. The time now is 08:47 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.