Solved

Cannot Point to Server Path in c# code

Posted on 2013-06-14
6
396 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

726 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