Click here to Skip to main content
15,887,442 members
Home / Discussions / C#
   

C#

 
QuestionWCF SErvice Authentication Pin
pravin_mun19-Aug-12 20:21
pravin_mun19-Aug-12 20:21 
QuestionGetting File Path Pin
ASPnoob18-Aug-12 17:02
ASPnoob18-Aug-12 17:02 
AnswerRe: etGetting File Path Pin
Richard Andrew x6418-Aug-12 17:17
professionalRichard Andrew x6418-Aug-12 17:17 
GeneralRe: etGetting File Path Pin
ASPnoob18-Aug-12 17:20
ASPnoob18-Aug-12 17:20 
GeneralRe: etGetting File Path Pin
Richard Andrew x6418-Aug-12 17:24
professionalRichard Andrew x6418-Aug-12 17:24 
AnswerRe: Getting File Path Pin
OriginalGriff18-Aug-12 19:42
mveOriginalGriff18-Aug-12 19:42 
GeneralRe: Getting File Path Pin
ASPnoob18-Aug-12 20:46
ASPnoob18-Aug-12 20:46 
GeneralRe: Getting File Path Pin
OriginalGriff18-Aug-12 21:29
mveOriginalGriff18-Aug-12 21:29 
The basic answer is: "You can't"

The problem is that this is a Word Document - so there is no native browser support for viewing it, it requires either the appropriate version of Word, or a document converter.

Think about it from a user POV: Browse to your site, press button marked "open CV". In order to view a Word document directly, it must download to his computer (not a problem, easy to do) then open Word and load the file automatically. Here we have the problem:
1) You cannot run an application of any sort directly on his computer because the antivirus will not let you (well, you can in some cases, but it's not a good idea to rely on it, as it requires Windows, IE and ActiveX support, none of which you can rely on).
2) If you can get round (1), you need to force the browser to open the file - which you can't do, again except in specific circumstances, which do not apply to most people. Again, anti virus is going to do it's best to stop you!
3) If you can get round (1) and (2), then you have a problem in that you can't guarantee that Word is loaded on all browser equipped equipment (heck, it isn't even loaded on all PCs!) so you still can't be sure that anyone can read it.
4) If you get round (1), (2) and (3) - and that is a very big "if" - then you have the problem of making sure that the Word file can be read by the version of Word on the Client!

A better approach is to store the DOC / DOCX file and allow downloads, so the user can print / save / share it as necessary, but for viewing either convert it to HTML (which can be shown directly) or an image format (which can again be shown directly). You could (probably, I haven't tried) do both by installing Word on the server, and using Office Interop to load and save the data, or by using a file converter on the server.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water

AnswerRe: Getting File Path Pin
Ed Hill _5_18-Aug-12 23:58
Ed Hill _5_18-Aug-12 23:58 
GeneralRe: Getting File Path PinPopular
Pete O'Hanlon19-Aug-12 1:26
mvePete O'Hanlon19-Aug-12 1:26 
GeneralRe: Getting File Path Pin
OriginalGriff19-Aug-12 1:32
mveOriginalGriff19-Aug-12 1:32 
GeneralRe: Getting File Path Pin
Pete O'Hanlon19-Aug-12 1:52
mvePete O'Hanlon19-Aug-12 1:52 
AnswerRe: Getting File Path Pin
Pete O'Hanlon19-Aug-12 4:51
mvePete O'Hanlon19-Aug-12 4:51 
GeneralRe: Getting File Path ... foolishness Pin
Richard MacCutchan19-Aug-12 5:46
mveRichard MacCutchan19-Aug-12 5:46 
GeneralRe: Getting File Path ... foolishness Pin
Pete O'Hanlon19-Aug-12 5:53
mvePete O'Hanlon19-Aug-12 5:53 
GeneralRe: Getting File Path ... foolishness Pin
Richard MacCutchan19-Aug-12 6:01
mveRichard MacCutchan19-Aug-12 6:01 
GeneralRe: Getting File Path ... foolishness Pin
Pete O'Hanlon20-Aug-12 2:40
mvePete O'Hanlon20-Aug-12 2:40 
Questioncue banner not working Pin
Jassim Rahma17-Aug-12 4:22
Jassim Rahma17-Aug-12 4:22 
AnswerRe: cue banner not working Pin
Ravi Bhavnani17-Aug-12 4:41
professionalRavi Bhavnani17-Aug-12 4:41 
AnswerRe: cue banner not working Pin
Wes Aday17-Aug-12 4:51
professionalWes Aday17-Aug-12 4:51 
GeneralRe: cue banner not working Pin
Shameel17-Aug-12 5:05
professionalShameel17-Aug-12 5:05 
GeneralRe: cue banner not working Pin
Jassim Rahma17-Aug-12 5:06
Jassim Rahma17-Aug-12 5:06 
GeneralRe: cue banner not working Pin
Wes Aday17-Aug-12 5:27
professionalWes Aday17-Aug-12 5:27 
AnswerRe: cue banner not working Pin
Richard Andrew x6417-Aug-12 8:04
professionalRichard Andrew x6417-Aug-12 8:04 
GeneralRe: cue banner not working Pin
Wes Aday17-Aug-12 8:28
professionalWes Aday17-Aug-12 8:28 

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.