Access Application directory from dll
-
Hi frnds, I need to access a file through a dll. File is located in application directory, where my web pages are located. >Abc.dll - referenced in web application. >test.pdf - located in application directory same as web pages. can i access test.pdf through abc.dll I feel it should be a trivial thing...but dont know somehow I am missing it? thanks
Keep DotNetting!! GeekFromIndia
-
Hi frnds, I need to access a file through a dll. File is located in application directory, where my web pages are located. >Abc.dll - referenced in web application. >test.pdf - located in application directory same as web pages. can i access test.pdf through abc.dll I feel it should be a trivial thing...but dont know somehow I am missing it? thanks
Keep DotNetting!! GeekFromIndia
What have you tried ? There's no reason for that not to work that I can see.
Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.
-
Hi frnds, I need to access a file through a dll. File is located in application directory, where my web pages are located. >Abc.dll - referenced in web application. >test.pdf - located in application directory same as web pages. can i access test.pdf through abc.dll I feel it should be a trivial thing...but dont know somehow I am missing it? thanks
Keep DotNetting!! GeekFromIndia
Try using Server.MapPath to resolve the virtual path in to physical path from the dll. You should reference the System.Web.dll before trying to do that. HTH
Nirandas, a developer from India. http://www.nirandas.com