Wrox Programmer Forums
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old November 2nd, 2008, 09:45 AM
Authorized User
Join Date: Nov 2008
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default web.config problem in FileShare

I have some question about web.config
    <add key="EmailFrom" value="[email protected]"/>
    <add key="EmailSubject" value="File Ready for Download!"/>
    <add key="SmtpServer" value=""/>
    <add key="MailUser" value="myalias"/>
    <add key="MailPassword" value="mypassword"/>
    <add key="MailPort" value="25"/>
    <add key="EmailFormatSelected" value="Text"/>
    <add key="PageTitle" value="Wrox File Share"/>
    <add key="ShareLocalFolderPath" value="C:\inetpub\wwwroot\FileShare\FileStorage\"/> => this is static path, how can I convert to dynamic path, when I upload website to host, what should I convert this path to?
    <add key="httpDownloadPath" value="http://localhost/FileShare/"/>

    <add key="CurrentTheme" value="CleanBlue" />

        <add key="CurrentTheme" value="CleanRed"/>
another question, how can you create these code, do y create them in webconfig directly or another place ?

help me! thanks

Old November 2nd, 2008, 09:48 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

You cannot create an HTTP address like that. You need a physical folder, relative to the server the code runs on. For example:

Dim myPath As String = Server.MapPath("~/FileStorage")

This returns the physical path to the FileStorage folder on the server.

And yes, you can add these settings to the web.config file manually, or use the WSAT as explained in the book.



Imar Spaanjaars
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Web.Config problem darkestangel1980 ASP.NET 1.0 and 1.1 Basics 1 July 2nd, 2007 06:31 AM
Web.Config problem? toddw607 ASP.NET 2.0 Basics 15 April 2nd, 2007 03:32 PM
problem in web.config chandanbhakuni ADO.NET 2 September 22nd, 2006 07:11 PM
Problem with Web.Config file srinivas ADO.NET 3 December 6th, 2004 02:27 PM

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