Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 29, 2012 02:55 PM by shapper
Contributor
3932 Points
3789 Posts
Aug 29, 2012 01:46 PM|LINK
Hello,
Is it possible in Web.Config file to get the SolutionDir value?
I need to set in Web.Config something like: "SolutionDir/Temp" ...
Thank You,
Miguel
All-Star
15346 Points
3142 Posts
Aug 29, 2012 02:12 PM|LINK
after the compilation application doesn't understand what is "Solution" so
your question may be to know the current application directory ?
you may get it using
Request.PhysicalApplicationPath
Aug 29, 2012 02:55 PM|LINK
Basically I have the following in Web.Config:
<system.net> <mailSettings> <smtp deliveryMethod="SpecifiedPickupDirectory"> <specifiedPickupDirectory pickupDirectoryLocation="C:\Solutions\Sol1\Proj1\Mails" /> </smtp> </mailSettings> </system.net>
I would like to replace C:\Solutions\Sol1\Proj1\Mails by relative path just in case I move the projects location.
Web.Config is in Proj1 folder ... I am using this when debugging ...
Is it possible?
shapper
Contributor
3932 Points
3789 Posts
SolutionDir in Web.Config. Can I do this?
Aug 29, 2012 01:46 PM|LINK
Hello,
Is it possible in Web.Config file to get the SolutionDir value?
I need to set in Web.Config something like: "SolutionDir/Temp" ...
Thank You,
Miguel
Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: SolutionDir in Web.Config. Can I do this?
Aug 29, 2012 02:12 PM|LINK
after the compilation application doesn't understand what is "Solution" so
your question may be to know the current application directory ?
you may get it using
Request.PhysicalApplicationPath
shapper
Contributor
3932 Points
3789 Posts
Re: SolutionDir in Web.Config. Can I do this?
Aug 29, 2012 02:55 PM|LINK
Basically I have the following in Web.Config:
<system.net> <mailSettings> <smtp deliveryMethod="SpecifiedPickupDirectory"> <specifiedPickupDirectory pickupDirectoryLocation="C:\Solutions\Sol1\Proj1\Mails" /> </smtp> </mailSettings> </system.net>I would like to replace C:\Solutions\Sol1\Proj1\Mails by relative path just in case I move the projects location.
Web.Config is in Proj1 folder ... I am using this when debugging ...
Is it possible?
Thank You,
Miguel