-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Kashypa78
Message 2 in Discussion


Hi,
 
That 
is beacause, this is how the ASP.NET works,
 
    Whenever a application is run, what the CLR does is it 
makes a shodow copy of the Executing Assembly.
     For e.g. 

                    
Lets say u have a virtual root called MyWebApp on a Server 
called MyServer.
                    Lets 
say the physical path of the MyWebApp is 
D:\MyFolder\MyWebApp.
                    
So we all know that there will be one bin folder in our ASp.NET web 
application right.
                    
the bin folder will have a project dll with name 
MyWebApp.dll.
                

                    
So when a request comes for your web application (MyWebApp) CLR 
makes  a shodow copy
                    
of the MyWebApp.dll. 
 
                    
This is why you are getting that path.
 
                    Try this code:
                        Application.StartupPath
                            This 
Gets the path for the executable file that started the application, not 
including the executable name

regards
Lohith                  

  -----Original Message-----
From: BDOTNET 
  [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 29, 2004 6:37 
  PM
To: BDOTNET
Subject: 
  Reflection


  
    
      
      New Message on BDOTNET
    
      

  Reflection


    
      
      
        Reply

        
          
            
            
               
              Recommend 
              Message 1 in 
                Discussion 
      
        
          
            
            
              From: vishnuvr 
            
              

                Hi All,
                Iam developing AOP class, Iam using Reflection to get the 
                exact location of assembly using 
                
                
string location = 
                Assembly.GetExecutingAssembly().Location;
                
When called this one from Windows project it will give me the 
                exact folders bin location(physical path)....
                
but When i try to call this class from my web 
                application it always gives me 
                c:\winnt\Microsoft.net\framework\v1.1.xxxx, 
                
y is this i want to get the exact location for my web 
                application
                
Even i tried to use 
                Assembly.GetExecutingAssembly().codebase but no 
                use
                
can u people plz explain me how to get that
                
Thanking u in advance
                
-Vishnu
                
 
View other groups in this 
    category. 



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to