Solved

Cannot Point to Server Path in c# code

Posted on 2013-06-14
6
392 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 40

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 40

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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

912 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

21 Experts available now in Live!

Get 1:1 Help Now