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. Web Development
  3. ASP.NET
  4. Use Web Reference Dll in Code Behind without a project file

Use Web Reference Dll in Code Behind without a project file

Scheduled Pinned Locked Moved ASP.NET
csharpvisual-studiosysadminquestion
2 Posts 2 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.
  • A Offline
    A Offline
    awu25
    wrote on last edited by
    #1

    I am working on a web site where I can only upload/download files using FTP. I don't have access to create a project on the server directly with VS.Net. I have a web service dll which I created on my local computer. I can access the dll with inline aspx code but I can't do the same from the code behind. Like I said, I can't create a project file on the server so I can't "add reference" like I do with VS.net on my development server. Is there anyway I can access the dll without a project file? It'd be even better if I could do a "add web reference" without a project file.

    H 1 Reply Last reply
    0
    • A awu25

      I am working on a web site where I can only upload/download files using FTP. I don't have access to create a project on the server directly with VS.Net. I have a web service dll which I created on my local computer. I can access the dll with inline aspx code but I can't do the same from the code behind. Like I said, I can't create a project file on the server so I can't "add reference" like I do with VS.net on my development server. Is there anyway I can access the dll without a project file? It'd be even better if I could do a "add web reference" without a project file.

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Like all assemblies which would be added using Add Reference, drop it in your web application's bin subdirectory and you can use it from any code, be it inline with the page or code-behind. Keep in mind that in either case the code is treated the same except code-behind source must be pre-compiled into an assembly for the web application while inline code is compiled upon the first access of the page after the app has been (re)started or the cache temporary page cache cleared. When you compile your code-behind be sure to add a reference (/r switch). If you can't, keep using inline code. Either way, the web reference assembly goes in bin.

      Microsoft MVP, Visual C# My Articles

      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