Solved

Cannot Point to Server Path in c# code

Posted on 2013-06-14
6
390 Views
Last Modified: 2013-06-15
This code worked in VS 2008.

// Get most recent available file
            string strSourcePath = "D:\\inetpub\\stockpickermax\\Data\\";  // This is a folder on the host server

            if (!Directory.Exists(strSourcePath))
            {
                strSourcePath = "C:\\Develop\\Apps\\StockPro\\Data\\";
            }

The host folder was confirmed to exist.  I can copy files to the host folder using Cute FTP

What is inetpub?

This code worked for 3 years without a problem.

I just installed IIS for Windows 8.

Suggestions please?

Thanks,
0
Comment
Question by:Dovberman
  • 4
  • 2
6 Comments
 
LVL 39

Assisted Solution

by:Kyle Abrahams
Kyle Abrahams earned 500 total points
ID: 39248142
It might be the C drive.

The default path for the WWWroot IIS

is c:\inetpub\wwwroot

If you're not finding the folder the application may not have permissions to it.
0
 

Author Comment

by:Dovberman
ID: 39248145
I just found out that I need to write # statements for an ftprequest.

Can you point me to a resource?

Thanks,
0
 
LVL 39

Accepted Solution

by:
Kyle Abrahams earned 500 total points
ID: 39248181
that's a completely different question.  

Not sure what you mean by "# statements" but here's how MS reccommends doing it:
http://msdn.microsoft.com/en-us/library/ms229711.aspx
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:Dovberman
ID: 39248399
Typo: Should be c# statements.  I can submit this as a new question.

I will try FtpWebRequest methods tomorrow and give you feedback.

Thanks,
0
 

Author Comment

by:Dovberman
ID: 39249701
Yes, The FtpWebRequest methods worked.

Thanks
0
 

Author Closing Comment

by:Dovberman
ID: 39249702
Thank you.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQL Backup skipping a few tables 7 25
SQL Help - 12 36
BULK LOGGED - log full 9 12
Azure SQL DB? 3 14
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now