|
You should ask this on the payseal site.
|
|
|
|
|
I can set up a website with some folders requiring that users log in before being able to access the aspx pages therein using forms.authentication, and configuring web.config appropriately - all fine and dandy.
So if, say, a protected folder is "members" and someone tries to access members/index.aspx they are redirected to a login page first. Great - but if there is a pdf in that folder, say members.pdf then ANYONE can still browse directly to members/members.pdf WITHOUT being logged in.
How do I set about protecting .pdf, .doc, jpg etc files from unauthorised access in this way? Just a pointer will do.... thanks
|
|
|
|
|
Fred_Smith wrote: How do I set about protecting .pdf, .doc, jpg etc files from unauthorised access in this way?
You can write the handler and allow .pdf/.doc/.jpg etc access only through application and stop them when trying to access through browser directly.
Get it
http://www.uberasp.net/getarticle.aspx?id=13[^]
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
|
You are welcome
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
hmm... tried that, word for word, and an even simpler "hello world" type example I found elsewhere (though it was the almost identical code) - and while it compiles fine, when I try to browse to an aspx file in the app I get the error:
"Could not load type [class name] from assembly [assembly name]"
(If I browse to a jpg - one of the filetypes I'm trying to protect - it is shown as normal.)
I have tried googling this error, but have found nothing useful - just a reference to it possibly being to do with the GAC, but no help...
... I don't suppose you've got any ideas...?
cheers
Fred
|
|
|
|
|
Dear All,
I am very new to ASP.NET. Actually this is my first project.
I designed my pages and tested it on the lcoalhost and it worked will
But when I uploaded one aspx page the my host server I received a server error (shown in this link)
www.mersaal.com/home.aspx
Anybody can tell me if there are any special procedures for aspx file when published
It may be trivial problem for everybody here
Mohamed Gouda
Egypt
|
|
|
|
|
Edit your web.config to set the customerrors mode to Off, as suggested. You should then be able to see the underlying error.
|
|
|
|
|
I did so and reloaded my aspx file, but the same error appeared
Shall I upload the web.config file too
however thanks
Mohamed Gouda
Egypt
|
|
|
|
|
Yes, your site should have a web.config file.
|
|
|
|
|
Thanks a lot
I discovered my fault while trying your advice
I had to upload my dlls created in the bin dir by VisualStudion.Net
however, thanks
Mohamed Gouda
Egypt
|
|
|
|
|
I know this is a quite a general question but can anyone recommend a good website for buying an ssl certificate.
The prices appear to vary considerably across the different companies therefore its hard to choose the correct one
thanks in advance
|
|
|
|
|
i have created a menu inside a panel.the menu items are Image buttons..how can i assign a certain function for a perticular image button inside that menu??when ever i am tryng to write the code it is selecting the menu as a whole..can't select a perticular menu item...
i have creted this menu using menu control.pls help.
"I am burning...the only thing rest in me is you..."
|
|
|
|
|
If you are using the asp:Menu control then you can access the individual MenuItem 's in the OnMenuItemDataBound event.
|
|
|
|
|
CREATE PROCEDURE [dbo].[spa]
@a image
AS
insert into a(a) values(@a)
GO
table
column name = a
datatype = image
<br />
byte[] buffer=new byte[FileUpload1.FileContent.Length];<br />
byte[] b = new byte[FileUpload1.FileContent.Length];<br />
FileUpload1.PostedFile.InputStream.Read(buffer,0,buffer.Length);<br />
p[0] = objclsdb.Parameter("@a", DbType.Byte, buffer, ParameterDirection.Input);
The above code is right?
|
|
|
|
|
|
If u don;t have any idea , then y the bloody hell u r participating in the thread.
Don't waste mine and ur's time if u don;t have any idea .
|
|
|
|
|
She's not wasting your time - have you tried the code? Does it work? If it doesn't then send us an error and we can help, but we're not going to compile your code for you...
|
|
|
|
|
Every thing is provided to u , if u can't sort out even now , then shame on u, Even the stupid or duffer can understand this much elaborated code , and u r talking on behalf of her, ok , Can't u see , the code i provided , is there any thing hidden ? Everything is provided. Instead of making arguments and wasting others time , y don;t u people solve the problem, by the way , we r here to solve others problem or to speak on behalf of others and waste others time.
|
|
|
|
|
Actually, I see at least two obvious errors, but since you have chosen to be a rude jerk, I'm going to let you find them for yourself.
|
|
|
|
|
|
Seems u need some rest and a doctor to check up ur head.
|
|
|
|
|
Ok thanks for advice
|
|
|
|
|
You are bloody arrogant.. and don't use native language here in CP ('duffer' means idiot in Hindi, i suppose).
Understand one thing, you've got no right to abuse anyone here in CP forums, if you are frustrated go take it out somewhere else buddy, this is not the place for that.
If you can't ask a question properly just go to HELL, don't bring shame to other Indian members in CP.
Regards,
Blumen
|
|
|
|
|
pankajgarg wrote: Seems u need some rest and a doctor to check up ur head.
First you ought to consult a doctor preferably a psychiatrist since you are really suffering from an acute hysteria.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|