CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 1/15/2008 4:00:22 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 0 Views: 40 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
1 Items, 1 Pages 1 |< << Go >> >|
yoenuts
Asp.Net User
secure pdf using form auth gives strange errors1/15/2008 4:00:22 PM

0/0

Hello, I've googled this extensively but haven't been able to find an answer to this question.
Also not through the post on this forum: http://forums.asp.net/p/1020158/1378995.aspx#1378995

Having a website working with forms authentication to force a disclaimer agreement I stumbled upon the following.
Users could just type in the direct url to a pdf file and then still obtain it.

So following this guide: http://geekswithblogs.net/ranganh/archive/2005/04/25/37592.aspx I was able to successfully force a redirect to the login form.

However when I tried to approach the pdf file after (succesful) login I stumbled upon a network error.
So after googeling even more I found that some extra settings needed to be added to the web.config.
This then worked, however I keep getting this strange error: 

Sometimes the ascii style code contents of the pdf file is displayed.
Other times I get an empty pdf file (it has the same number of pages as the original).
When I go to the server through remote desktop I can open the pdf files perfectly. 

This is my web.config:
Under IIS 6.0 and asp.net 2.0 running on server 2003

The 2 ad path lines are there because I am too much of a newbie to actually understand which one to use.

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
 <system.web>
  <httpHandlers>
   <add path="*.pdf" verb="*" type="System.Web.HttpForbiddenHandler" validate="True" />
   <add path="*" verb="GET,HEAD,POST" type="System.Web.DefaultHttpHandler" validate="True" />
   <add verb="GET, HEAD, POST, DEBUG" path="*.pdf" type="System.Web.UI.PageHandlerFactory"/>
  </httpHandlers>
  <compilation debug="false" strict="false" explicit="true">
   <buildProviders>
    <add extension=".pdf" type="System.Web.Compilation.PageBuildProvider" />
   </buildProviders>
  </compilation>
  <authentication mode="Forms">
   <forms loginUrl="form.aspx" name=".ASPXFORMSAUTH" defaultUrl="default.aspx">
   </forms>
  </authentication>
  <authorization>
   <deny users="?" />
  </authorization>
  <customErrors mode="Off"/>
 </system.web>
</configuration>

1 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
secure pdf using form auth gives strange errors - ng.asp-net-forum ... secure pdf using form auth gives strange errors, > ROOT > NEWSGROUP > Asp.Net Forum > general_asp.net.security, Date: 1/15/2008 4:00:22 PM, Replies: 0, ...
Mailing list archives Subject, Form based authentication giving 400 error - strange behavior .... else { frm.submit(); } } We are using J2EE Form based Authentication. ...
CodeProject: Using authentication certificates to connect to web ... Next, to activate the secure channel on our web site, we must go to the ... Leave the "Submit a certificate request to this CA using a form" option selected ...
Scott Hanselman's Computer Zen - Weird Timeouts with custom ASP ... Jul 11, 2005 ... The second issuing of the cookie included "secure" at its end. Why? Because of this setting in the web.config:. ASP.NET 2.0 Membership, Roles, Forms Authentication, and Security ... It walks through how to add Forms Authentication (using the control) ...... when the compiler gives you an error "ProfileCommon cannot be found. ...
ssh - secure shell client (remote login program) This form of authentication alone is normally not allowed by the server ..... in the key files (e.g. .ssh/identity) will lead to strange error messages. ...
Forms Authentication in SharePoint Products and Technologies (Part ... Before using forms authentication, determine why to use forms authentication in the .... and is secured with Windows authentication in the Default zone. ...
#61 ([patch] auth.User admin form shouldn't require people to edit ... The latest changeset seems to have something strange error: .... The *real* issue of this ticket (improving the auth.User admin form not to use hashes) has ...
Re: Forms Authentication with Active Directory, login control crashes Do you have any strange errors from Kerberos in the system event log or any ... I'm developing an ASP.net 2.0 application that use Forms Authentication. I'm ...
Top 10 Application Security Vulnerabilities in Web.config Files ... NET Web-based applications using Forms authentication. ... Therefore, to truly secure the authentication token, you must require the authentication token to ...




Search This Site:










help with upload module!

loginstatus event -->logging out

at the web site provider, what type of service is required to make express2005 work with db

collapse/expand treeview

message box

automatic windows authentication

no answer to my question!!??

reloading a vs project

where to learn web.config more detail?

what would i need to do here to make this work in .net 2.0?

how to sort search result

code changes

2.0 skins ok with 3.0 drag & drop?

getting nowhere installing on host

menu adapter and sharepoint 2007 tr2

entire site in a frame

yaf

authentication for downloading files - how to protect files with asp.net?

how to have the validation summary use a message box only and not also print to the screen?

admin functions w/o solpart menu

dhtml app in vb.net

app_code pdb

remove default javascript added to page. is it possible?

queries in for loop

playing avi files in silverlight

trying to understand if this is possible and what to learn

best security model

securing an assembly

multi role

enterprise library may 2007 edition, problem with data access block

 
All Times Are GMT