Click here to Skip to main content
15,908,015 members
Home / Discussions / Web Development
   

Web Development

 
GeneralCheck popup open Pin
AnhTin12-Dec-07 17:23
AnhTin12-Dec-07 17:23 
GeneralProblem in Opening HTML file. Pin
sanjeeva K Kanakam12-Dec-07 16:28
sanjeeva K Kanakam12-Dec-07 16:28 
GeneralImage Transfer from window machine to Unix based machine Pin
Vipin Chauhan11-Dec-07 18:51
Vipin Chauhan11-Dec-07 18:51 
GeneralRe: Image Transfer from window machine to Unix based machine Pin
Michael Sync12-Dec-07 19:06
Michael Sync12-Dec-07 19:06 
GeneralRe: Image Transfer from window machine to Unix based machine Pin
Vipin Chauhan13-Dec-07 22:42
Vipin Chauhan13-Dec-07 22:42 
GeneralRe: Image Transfer from window machine to Unix based machine Pin
Michael Sync14-Dec-07 0:57
Michael Sync14-Dec-07 0:57 
GeneralAllow user to download file that is located at another web server Pin
fukchai200011-Dec-07 14:54
fukchai200011-Dec-07 14:54 
GeneralActive Document under internet explorer (IOleDocument / IOleDocumentView Pin
Roey C11-Dec-07 11:18
Roey C11-Dec-07 11:18 
hello everyone,

i'm trying to create an active document activeX for my files. so that they would show up inside the browser after being downloaded (just like PDFs and office files).

i'm trying to use the IOleDocument and IOleDocumentView interfaces to work with IE with c#.

i've created a dll file which import the Microsoft.VisualStudio.OLE.Interop namespace and then two classes that implement the IOleDocument and IOleDocumentView interfaces. i also managed to configure IE to call my dll using a guid.


the problem begins after clicking the file click in IE, and this is the error message i get:

"the file you are downloading cannot be opened by the default program.it is either corrupted or it has an incorrect file type.as a security precaution, it is recommended that you cancel the download"

this is my code:
using System;<br />
using System.Runtime.InteropServices;<br />
using System.IO;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
using Microsoft.Win32;<br />
using System.Reflection;<br />
using System.Net;<br />
using Microsoft.VisualStudio.OLE.Interop;<br />
<br />
namespace WebControl<br />
{<br />
<br />
    [ComVisible(true),<br />
    Guid("AB3A4D48-E6CA-42db-8D68-101D9A1BFDC4"),<br />
    ClassInterface(ClassInterfaceType.AutoDual)]<br />
    public class ViewerPlugin : IOleDocument<br />
    {<br />
        IOleDocumentView pView = null;<br />
<br />
        public void CreateView([InAttribute] IOleInPlaceSite pIPSite, [InAttribute] IStream pstm, [InAttribute] uint dwReserved, out IOleDocumentView ppView)<br />
        {<br />
            using (TextWriter tw = new StreamWriter("c:\\log.txt", false, Encoding.Default))<br />
            {<br />
                tw.WriteLine("blabla");<br />
            }<br />
            pView = new WebControl();<br />
            <br />
            // Return the view<br />
            ppView = pView;<br />
        }<br />
        public void EnumViews(out IEnumOleDocumentViews ppEnum, out IOleDocumentView ppView)<br />
        {<br />
            using (TextWriter tw = new StreamWriter("c:\\log.txt", false, Encoding.Default))<br />
            {<br />
                tw.WriteLine("blabla");<br />
            }<br />
            ppEnum = null;<br />
            ppView = pView;<br />
        }<br />
        public void GetDocMiscStatus(out uint pdwStatus)<br />
        {<br />
            using (TextWriter tw = new StreamWriter("c:\\log.txt", false, Encoding.Default))<br />
            {<br />
                tw.WriteLine("blabla");<br />
            }<br />
            pdwStatus = 8;<br />
        }<br />
    }<br />
}


does anybody happens to know how to actually create active documents in C#??
thanks,
Roey

Don't believe to what you hear on the news...

GeneralLocal Time Pin
Brendan Vogt11-Dec-07 10:41
Brendan Vogt11-Dec-07 10:41 
GeneralRe: Local Time Pin
pmarfleet11-Dec-07 11:11
pmarfleet11-Dec-07 11:11 
QuestionImplementation Technology Suggestion for exchanging data with a remote server needed. Pin
mtwombley11-Dec-07 8:01
mtwombley11-Dec-07 8:01 
QuestionUrgent: reseizing webparts dynamically Pin
devsam11-Dec-07 3:52
devsam11-Dec-07 3:52 
GeneralRe: Urgent: reseizing webparts dynamically Pin
Paul Conrad23-Dec-07 14:50
professionalPaul Conrad23-Dec-07 14:50 
QuestionStupid problem with innerHTML in Javascript Pin
ieaeitsch11-Dec-07 2:32
ieaeitsch11-Dec-07 2:32 
GeneralRe: Stupid problem with innerHTML in Javascript Pin
Michael Sync11-Dec-07 19:24
Michael Sync11-Dec-07 19:24 
GeneralRe: Stupid problem with innerHTML in Javascript Pin
ieaeitsch11-Dec-07 21:52
ieaeitsch11-Dec-07 21:52 
GeneralRe: Stupid problem with innerHTML in Javascript Pin
Michael Sync11-Dec-07 22:28
Michael Sync11-Dec-07 22:28 
GeneralRe: Stupid problem with innerHTML in Javascript Pin
Michael Sync11-Dec-07 22:29
Michael Sync11-Dec-07 22:29 
GeneralRe: Stupid problem with innerHTML in Javascript Pin
ieaeitsch11-Dec-07 22:46
ieaeitsch11-Dec-07 22:46 
GeneralRe: Stupid problem with innerHTML in Javascript Pin
ieaeitsch11-Dec-07 22:53
ieaeitsch11-Dec-07 22:53 
GeneralRe: Stupid problem with innerHTML in Javascript Pin
Michael Sync11-Dec-07 23:55
Michael Sync11-Dec-07 23:55 
GeneralRe: Stupid problem with innerHTML in Javascript Pin
Michael Sync12-Dec-07 0:03
Michael Sync12-Dec-07 0:03 
GeneralRe: Stupid problem with innerHTML in Javascript Pin
WoutL11-Dec-07 22:47
WoutL11-Dec-07 22:47 
GeneralRe: Stupid problem with innerHTML in Javascript Pin
ieaeitsch11-Dec-07 22:54
ieaeitsch11-Dec-07 22:54 
QuestionChoose File Window, how to open? Pin
hifiger200411-Dec-07 1:53
hifiger200411-Dec-07 1:53 

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.