Click here to Skip to main content
14,209,923 members
   

ASP.NET

 
PinnedHOW TO ANSWER A QUESTION PinPopular
Chris Maunder12-Jul-09 22:39
adminChris Maunder12-Jul-09 22:39 
PinnedHow to get an answer to your question Pin
Chris Maunder10-Nov-05 16:29
adminChris Maunder10-Nov-05 16:29 
QuestionWeb Application and API Pin
Mycroft Holmes12-Jun-19 19:42
memberMycroft Holmes12-Jun-19 19:42 
AnswerRe: Web Application and API Pin
Richard Deeming12-Jun-19 23:15
mveRichard Deeming12-Jun-19 23:15 
GeneralRe: Web Application and API Pin
Mycroft Holmes13-Jun-19 12:36
memberMycroft Holmes13-Jun-19 12:36 
QuestionFinalize() vs Dispose() Pin
Anandkumar Prajapati11-Jun-19 18:35
professionalAnandkumar Prajapati11-Jun-19 18:35 
AnswerRe: Finalize() vs Dispose() Pin
Mycroft Holmes11-Jun-19 20:01
memberMycroft Holmes11-Jun-19 20:01 
QuestionI want to update users table according to ıd value Pin
Member 1064949510-Jun-19 11:38
memberMember 1064949510-Jun-19 11:38 
SuggestionRe: I want to update users table according to ıd value Pin
Richard Deeming11-Jun-19 1:16
mveRichard Deeming11-Jun-19 1:16 
QuestionHow to use treeView to save the directory tree into the SQL Server database ? Pin
Member 24584679-Jun-19 16:27
memberMember 24584679-Jun-19 16:27 
AnswerRe: How to use treeView to save the directory tree into the SQL Server database ? Pin
Richard MacCutchan9-Jun-19 21:49
protectorRichard MacCutchan9-Jun-19 21:49 
QuestionMysterious ADFS problem Pin
Super Lloyd5-Jun-19 21:19
memberSuper Lloyd5-Jun-19 21:19 
Questionweb form needs to be used for several languages Pin
dcof2-Jun-19 19:46
memberdcof2-Jun-19 19:46 
AnswerRe: web form needs to be used for several languages Pin
F-ES Sitecore3-Jun-19 1:00
mveF-ES Sitecore3-Jun-19 1:00 
QuestionMessage Closed Pin
30-May-19 7:53
grouprondavis12130-May-19 7:53 
Question(SOLVED) Is it possible to raise an error on filename that resides on the server? Pin
samflex29-May-19 4:36
membersamflex29-May-19 4:36 
AnswerRe: Is it possible to raise an error on filename that resides on the server? Pin
Richard Deeming29-May-19 7:16
mveRichard Deeming29-May-19 7:16 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
samflex29-May-19 9:18
membersamflex29-May-19 9:18 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
Richard Deeming30-May-19 0:16
mveRichard Deeming30-May-19 0:16 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
samflex30-May-19 4:00
membersamflex30-May-19 4:00 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
Richard Deeming30-May-19 7:31
mveRichard Deeming30-May-19 7:31 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
samflex31-May-19 3:17
membersamflex31-May-19 3:17 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
Richard Deeming31-May-19 3:26
mveRichard Deeming31-May-19 3:26 
That doesn't seem to match the link from your original question:
http://Archive/{servername}/play_recording_wav.aspx?filename=noop_{filename}.wav

You now seem to be navigating directly to the audio file, using a web server on it-server1. Is that the same server that your code is running on?

Assuming it is the same server, then you'd want something like this:
protected bool RecordingExists(string filename, string servername)
{
    string virtualPath = string.Format("/archives/{1}/{0}.wav", filename, servername);
    string physicalPath = Server.MapPath(virtualPath);
    return System.IO.File.Exists(physicalPath);
}




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
samflex31-May-19 3:42
membersamflex31-May-19 3:42 
GeneralRe: Is it possible to raise an error on filename that resides on the server? Pin
Richard Deeming31-May-19 3:50
mveRichard Deeming31-May-19 3:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.190617.3 | Last Updated 13 Jun 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid