Re: Howto: WebService in not Bin folder?

From: Mujtaba Syed (mujtaba_at_marlabs.com)
Date: 12/15/04


Date: Wed, 15 Dec 2004 11:18:16 -0500

Hi Topper:

> ASMX file has definition(assembly name) of my WebService object for
> ASP.NET.
> ASP.NET searching my WebService assembly in bin folder (by default it
> defined in machine.config file)
> But if i place my WebService dll not in bin folder ASP.NET cann't found it
> and error occured.

If you use Visual Studio .NET, it breaks your web service into two parts, a
.ASMX file and a .ASMX.CS file. The .ASMX.CS file is referenced by the
CODEBEHIND attribute in the .ASMX file. Now when you compile your project,
the .ASMX.CS (codebehind) is compiled to a .DLL and placed in your BIN
folder under your VROOT. When the ASP.NET runtime is serving an .ASMX file
(reference in the URL), it sees the INHERITS attribute and compiles a
temporary class by inheriting the codebehind class from the DLL. So, /BIN is
just the default probing path to lookup assemblies. And since you don't want
to configure alternative probing paths in web.config, you problem can be
solved by not using a codebehind at all. Put all your code in .ASMX and be
done with!

Mujtaba.



Relevant Pages

  • Re: Howto: WebService in not Bin folder?
    ... I'm trying to use webservice business logic only in binary file and ... >> But if i place my WebService dll not in bin folder ASP.NET cann't found ... > CODEBEHIND attribute in the .ASMX file. ... > temporary class by inheriting the codebehind class from the DLL. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Assembly in in : how to test it ?
    ... and call the method of assembly in Bin folder. ... Actually i link the Dll at ASMX file and test ... way really is to use unit testing frameworks. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Assembly in in : how to test it ?
    ... and call the method of assembly in Bin folder. ... Actually i link the Dll at ASMX file and test ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: .Net web service uploading problem
    ... Check if u have uploaded the asmx file to ur root directory and its dll to ... the bin folder. ... Then try the asmx file from browser. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: How to deploy "Hello World" webservice on remote site?
    ... > on a public asp.net website as a test. ... the asmx file and the dll in the bin folder need to go ...
    (microsoft.public.dotnet.framework.webservices)