When testing locally with:
TextReader tr = new StreamReader(@"C:\gcc.set");
Now that I have uploaded this to the server on the net,
that locations permissions are denied.
How can I change this to work with StreamReader on the Web
or do I have to use a different function?
Any help is appreciated.
Thanks,
Trint
Brad Wery - 20 Aug 2007 18:58 GMT
Put the file in the same directory as the application and change your
call to look like this:
TextReader tr = new StreamReader(Server.MapPath("gcc.set"));
Brad
> When testing locally with:
> TextReader tr = new StreamReader(@"C:\gcc.set");
[quoted text clipped - 5 lines]
> Thanks,
> Trint
trint - 20 Aug 2007 19:03 GMT
> Put the file in the same directory as the application and change your
> call to look like this:
[quoted text clipped - 14 lines]
>
> - Show quoted text -
Thank you Brad...I will try this.
Trint
Jon Skeet [C# MVP] - 20 Aug 2007 19:04 GMT
> When testing locally with:
> TextReader tr = new StreamReader(@"C:\gcc.set");
[quoted text clipped - 3 lines]
> or do I have to use a different function?
> Any help is appreciated.
How much access to you have on the server? Can you give the server user
permission to read the file?

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too