p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET Website Programming Problem-Design-Solution (http://p2p.wrox.com/forumdisplay.php?f=23)
-   -   Invalid path for MapPath (http://p2p.wrox.com/showthread.php?t=8978)

kondin February 4th, 2004 11:32 PM

Invalid path for MapPath
Problem with ThePhileVB running on Win2k.At first time I think the same problem with topic ID=640. Then I try to follow that forum but problem still persist.

Error Message
Invalid path for MapPath 'C:/wrox/ThePhileVB/Config/Polls.Config'. A virtual path is expected.

Error Stack:
System.ArgumentException: Invalid path for MapPath 'C:/wrox/ThePhileVB/Config/Polls.Config'. A virtual path is expected.
   at System.Web.HttpRequest.MapPath(String virtualPath, String baseVirtualDir, Boolean allowCrossAppMapping)
   at System.Web.HttpServerUtility.MapPath(String path)
   at Wrox.WebModules.Polls.Configuration.ModuleConfig.G etSettings() in C:\wrox\ThePhileVB\WebModules\Polls\Polls.Configur ation\ModuleConfig.vb:line 31
   at Wrox.WebModules.Polls.Business.Question.GetCurrent Id() in C:\wrox\ThePhileVB\WebModules\Polls\Polls.Business \Question.vb:line 224
   at Wrox.WebModules.Polls.Web.Controls.User.Poll.DataB ind() in C:\wrox\ThePhileVB\WebModules\Polls\Poll.ascx.vb:l ine 260
   at Wrox.WebModules.Polls.Web.Controls.User.Poll.Page_ Load(Object sender, EventArgs e) in C:\wrox\ThePhileVB\WebModules\Polls\Poll.ascx.vb:l ine 62
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain()

I try to modify FileStream constructors in the ModuleConfig.vb in all config file (follow FAQ that sent with download source code.) and rebuild solution but can't solve problem.
Dim fs As New FileStream(fileName, FileMode.Open, FileAccess.Read)

kondin February 4th, 2004 11:49 PM

farther information about my PC
I use WIN2K Por, SQL Server Pro, .Net Framework version 1.0
drive E:---> Win2K , SQL, IIS
drive C:---> C:\wrox\ThePhileVB(I must install the same drive with WIN2K, IIS, SQL or not?)

All times are GMT -4. The time now is 10:14 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.