Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Compiling VB.NET Code at runtime

Compiling VB.NET Code at runtime

Scheduled Pinned Locked Moved Visual Basic
questioncsharp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sumit Domyan
    wrote on last edited by
    #1

    Hi All Can i compile VB.NET code at runtime? If yes how? And how can i use it in my code? Thanks & Regards Sumit Domyan

    D J 2 Replies Last reply
    0
    • S Sumit Domyan

      Hi All Can i compile VB.NET code at runtime? If yes how? And how can i use it in my code? Thanks & Regards Sumit Domyan

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Yes, it's possible to do. No, it's not easy to understand. Only you can answer the third question. It all depends on what your doing. You'll come up with lots of artciles here on CP just by searching for "Codedom". RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      1 Reply Last reply
      0
      • S Sumit Domyan

        Hi All Can i compile VB.NET code at runtime? If yes how? And how can i use it in my code? Thanks & Regards Sumit Domyan

        J Offline
        J Offline
        jonathan15
        wrote on last edited by
        #3

        I think this is wht you need. http://www.divil.co.uk/net/articles/plugins/scripting.asp[^] Shows how to use the built-in compilers in the .NET framework to allow users of your product to write script to control and hook in to the application.

        S 1 Reply Last reply
        0
        • J jonathan15

          I think this is wht you need. http://www.divil.co.uk/net/articles/plugins/scripting.asp[^] Shows how to use the built-in compilers in the .NET framework to allow users of your product to write script to control and hook in to the application.

          S Offline
          S Offline
          Sumit Domyan
          wrote on last edited by
          #4

          Hi Can you please answer my one more question? I am passing parameters through soap, but i am not getting the exact result back.

              Dim env As SoapEnvelope
              Dim epr As EndpointReference
              Dim client As MyHttpClient
              Dim rs As SoapEnvelope
              Dim bodyResponse As String
              Dim web\_namespace As String
              Dim web\_uri As String
              Dim web\_method As String
              Dim action As String
              Dim inner\_xml As String
          
              web\_method = MethodTextBox.Text.Trim
              web\_uri = WebServiceURLTextBox.Text.Trim
              web\_namespace = NamespaceTextBox.Text.Trim
          
              If web\_namespace.EndsWith("/") = False Then
                  web\_namespace += "/"
              End If
          
              action = web\_namespace & web\_method
          
              inner\_xml = "<" & web\_method & " xmlns=""" & web\_namespace & """" & " >TestUser"
          
              env = New SoapEnvelope
              env.Context.Addressing.Action = New Action(action)
              env.CreateBody()
          
              env.Body.InnerXml = String.Format(inner\_xml)
              epr = New EndpointReference(New Uri(web\_uri))
              client = New MyHttpClient(epr)
          
              client.WebAction = action
              rs = client.TestWebRequest(env)
              bodyResponse = rs.Body.OuterXml
              TestReport.Text = bodyResponse
          End Sub
          

          End Class

          Option Explicit On
          Option Strict On

          Imports System.Xml
          Imports Microsoft.Web.Services2
          Imports Microsoft.Web.Services2.Addressing
          Imports Microsoft.Web.Services2.Messaging
          Imports System.Web

          Public Class MyHttpClient
          Inherits SoapClient

          Friend intWebAction As String
          
          WriteOnly Property WebAction() As String
              Set(ByVal Value As String)
                  intWebAction = Value
              End Set
          End Property
          
          Public Sub New(ByVal dest As EndpointReference)
              MyBase.New(dest)
          End Sub
          
          '"http://tempuri.com/TestWebService/MyService/HelloWorld")> \_
          \_
          Public Function TestWebRequest(ByVal envelope As SoapEnvelope) As SoapEnvelope
              Dim response As SoapEnvelope
              Dim msg As String
          
              response = MyBase.SendRequestResponse("HelloWorld", envelope)
              msg = response.Body.OuterXml
          
              TestWebRequest = response
          End Function
          
          Protected Overrides Sub FilterMessage(ByVal envelope As Microsoft.Web.Services2.SoapEnvelope)
              MyBase.FilterMessage(envelope)
          
          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups