[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

RE: GetExecutingAssembly().Location and DLL called by WebService

(Luke Zhang [MS])

6/4/2004 10:35:00 AM

Hi Neil,

GetExecutingAssembly() is also not for a web service. It will return a
temporary folder for web service to load referenced assemblies. To Get the
phisical location of your asxm file, you may try following code in your web
service:

Context.Server.MapPath(".")

And its referenced assemblies should be in this sub "bin" folder.

Luke
Microsoft Online Support

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




2 Answers

(Luke Zhang [MS])

6/7/2004 8:05:00 AM

0

Hi Neil,

Please feel free to correct me if I have misunderstood this. Based on my
understanding, you are working with a web serivce project, and its asmx
file should be in a virtual diretory, its assembly file (dll) should be in
a "bin" folder. However, from your description, they are in
"\solution\build". Can you explain more on this?

Regards,

Luke
Microsoft Online Support

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

(Luke Zhang [MS])

6/8/2004 9:01:00 AM

0

Hi Neil,

If you just want get the DLL's path, you may try following code in the
Class library:

System.Reflection.Assembly.GetAssembly( this.GetType() ).CodeBase.ToString()

Luke
Microsoft Online Support

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