Solved

Cannot Point to Server Path in c# code

Posted on 2013-06-14
6
393 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article I will describe the Copy Database Wizard 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.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

816 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

10 Experts available now in Live!

Get 1:1 Help Now