Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8980791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:10:28+00:00 2026-06-15T20:10:28+00:00

I tried to get file path using below code. string script = File.ReadAllText(Application.StartupPath +

  • 0

I tried to get file path using below code.

string script = File.ReadAllText(Application.StartupPath + "D:\\Tax Rouding   Projects\\10-12-12 TaxRoundingUtility\\TaxRoundingUtility\\Scripts\\GP_SOP_AdjustTax.sql");

But i am getting error : The given path’s format is not supported

if i try to open the file from windows explorer.. i am able to go file location..

D:\Tax Rouding Projects\10-12-12 TaxRoundingUtility\TaxRoundingUtility\Scripts\

But why i cannot using c# code…

Any thing i missed in the path…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T20:10:29+00:00Added an answer on June 15, 2026 at 8:10 pm

    The problem lies here

    Application.StartupPath + "D:\Tax Rouding Projects\10-12-12 TaxRoundingUtility\TaxRoundingUtility\Scripts\GP_SOP_AdjustTax.sql"
    

    This might end up giving you something like

    “c:\program files\myappfolder\D:\Tax Rouding Projects\10-12-12
    TaxRoundingUtility\TaxRoundingUtility\Scripts\GP_SOP_AdjustTax.sql”

    which is an invalid path. Append only portion of path that you need like (the second part is just an example)

    Application.StartupPath + @"\TaxRoundingUtility\Scripts\GP_SOP_AdjustTax.sql".
    

    Also make sure to escape the ‘\’ in your file path strings.

    Edit: As Dante has mentioned in the comment in the question, If your target path is fixed and known, you do not need the Application.StartppPath. Just load/read the file for which you have the complete path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to create a file using Oracle UTL_FILE.FOPEN command but i get this
Using the below code I am unable to show the open/save as file dialog:
I have tried using a example file using PHPExcel script to extract data from
Is there way to get file from windows xp command prompt? I tried to
Yesterday I had seen question concerning how to get file space information. I tried
How do I get the version attribute of a file? I tried the Version
I am using the below code for saving an image to SD Card. But
I have save my Image using Below code In a Folder in my source
While using the Google code website, I have tried using the command prompt to
I tried the code below in interactive python shell and got the follow error

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.