Alternate Webservice BIN Directory

A

Anthony C

Is it possible to change the BIN directory to be something else on the
PC?

Namely, we're using single directory deployment for a base app. The
web services allow other clients to get data from the client on my PC.
Since the webservice references a few middle tier objects, I want the
webservice to reside in the same folder (so I do not need to deploy
the middle tier objects twice).

Is this possible?

In other words, instead of having

c:\inetpub\wwwroot\application and
c:\inetpub\wwwroot\application\bin

I want

c:\inetpub\wwwroot\application and
c:\inetpub\wwwroot\application\custombindirectory
 
J

Jan Tielens

Probably the <codebase> element (Specifies where the common language runtime
can find an assembly). can help you out:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/ht
ml/gngrfcodebase.asp
For the runtime to use the <codeBase> setting in a machine configuration
file or publisher policy file, the file must also redirect the assembly
version. Application configuration files can have a codebase setting without
redirecting the assembly version. After determining which assembly version
to use, the runtime applies the codebase setting from the file that
determines the version. If no codebase is indicated, the runtime probes for
the assembly in the usual way.

If the assembly has a strong name, the codebase setting can be anywhere on
the local intranet or the Internet. If the assembly is a private assembly,
the codebase setting must be a path relative to the application's directory.

For assemblies without a strong name, version is ignored and the loader uses
the first appearance of <codebase> inside <dependentAssembly>. If there is
an entry in the application configuration file that redirects binding to
another assembly, the redirection will take precedence even if the assembly
version doesn't match the binding request.


--
Greetz

Jan Tielens
________________________________
Read my weblog: http://weblogs.asp.net/jan
 
M

MSFT

I agree with Christian , this is not working in ASP.NET application. We
have to put the assembly in the BIN forder or just define it in asmx file.
Form MSDN:

@ WebService Directive in XML Web Services

Defines XML Web service specific (.asmx file) attributes used by the
ASP.NET parser and compiler.

<%@ WebService attribute="value" [attribute="value"¡­] %>

Attributes

Class

Specifies the class implementing the XML Web service that is automatically
compiled the first time the XML Web service is accessed after changes. This
value can be any valid class name residing in either the same file as the
WebService directive or within a separate file. If the class resides in a
separate file, it must be placed in the \Bin directory underneath the Web
application where the XML Web service resides. This attribute is required
for the XML Web service to compile.

Luke
Microsoft Online Support

Get Secure! [URL="http://www.microsoft.com/security"]www.microsoft.com/security[/URL]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top