Can somebody tell me please....if you navigate to a MS-Word document in Internet Explorer, & Word is installed on the client machine - the document opens. Is it possible to create a handler that would detect this and allow us to pass some parameters to the
Word document? Cheers James
Not sure if you ca setup a handler to capture the request for a .DOC file, but you can have the link to the DOC file actually be a link to a ASPX and have the ASPX change the MIME type and return a DOC file instead of HTML...tHis would allow you to pass in
parameters.
Keith Franklin
Chief Software Architect
Empowered Software Solutions
Microsoft Gold Certified Partner for Integrated E-Business Solutions
www.empowered.com
Chicago's .NET Experts for projects, staffing, and mentoring
Hi, First, develop an HTTPHANDLER which generates whatever you want to return to IE/Word. Then add the following to your WEB.CONFIG: That will inform the .NET framework that all requests for .DOC files should be routed to your HTTPHandler. -Addy
I am also trying to secure word, but I am only using web.config, not handler because I don't have much knowlodge of it. I have successfully been able to have web.config intercept .doc extension and redirect to login.aspx. I also use a processdoc.aspx to process
the binary file and the header content type to call the IE save as screen What is killing me is whenever the user gets authenticated with cookies, web.config seems to take control of the situation and skips the login.aspx not letting processdoc.aspx process
the .doc while the user is authenticated. I don't understant what's behind, but I really need a way to intercept the .doc after authentication. Do you think using handler would be the case? Can you give a better example for my case. My web.config <forms name=".AUTH1"
loginUrl="Login.aspx" protection="All" timeout="30" path="/"></forms> private void cmdLogin_ServerClick(object sender, System.EventArgs e) { string strRedirect; if (ValidateUser(txtUserName.Value,txtUserPass.Value) ) { FormsAuthenticationTicket tkt; string
cookiestr; HttpCookie ck; tkt = new FormsAuthenticationTicket(1, txtUserName.Value, DateTime.Now, DateTime.Now.AddMinutes(1), chkPersistCookie.Checked, "your custom data"); cookiestr = FormsAuthentication.Encrypt(tkt); ck = new HttpCookie(FormsAuthentication.FormsCookieName,
cookiestr); if (chkPersistCookie.Checked) ck.Expires=tkt.Expiration; Response.Cookies.Add(ck); strRedirect = "opendoc.aspx?ReturnUrl="+Request["ReturnUrl"]; if (strRedirect==null) strRedirect = "securitymessage.aspx"; Response.Redirect(strRedirect, true);
} else // ******************** it simply jumps here ****************** redir(); } many thanks for any contribution Rod
James Edward...
Member
70 Points
14 Posts
HttpHandler & MS Word
Aug 06, 2002 08:41 AM|LINK
KeithFrankli...
Member
55 Points
11 Posts
Re: HttpHandler & MS Word
Aug 06, 2002 10:34 AM|LINK
Chief Software Architect
Empowered Software Solutions
Microsoft Gold Certified Partner for Integrated E-Business Solutions
www.empowered.com
Chicago's .NET Experts for projects, staffing, and mentoring
Addys
Member
55 Points
11 Posts
Re: HttpHandler & MS Word
Aug 08, 2002 05:23 PM|LINK
rodusa
Member
480 Points
113 Posts
Re: HttpHandler & MS Word
Aug 08, 2003 08:59 PM|LINK