I need to create a simple asp.net application that use password protect some
html pages. The html page provider doesn't know asp.net. And the host doesn't
allow me to create user accounts.
What's the best way to store users/password except database tables? and to
store html files? 5 2795
I am not sure I understand your question completely. But if you are looking
to protect access to some HTML files in your website, you can use Forms
Authentication. Whenever the users try accessing the HTML files, if the
users are not authenticated, they will be redirected to a login page.
If you are looking at having some data in a HTML file and protecting that,
it is harder. You could take a look at the Dojo toolkit (dojotoolkit.or g)
which provides some strong encryption techniques using JavaScript. Any ideas?
--
blog: www.thinkingMS.com/pandurang
"nick" wrote: I need to create a simple asp.net application that use password protect some html pages. The html page provider doesn't know asp.net. And the host doesn't allow me to create user accounts.
What's the best way to store users/password except database tables? and to store html files?
I think I need to write a simple forms authentication app for a html page
designer. He will create html files, which are protected by forms
authentication. ...
For example, I create a form authentication app in securehtmls/. And the
html pages are dumped to the folder.
will it be redirected to login screen if an un-authenticated user try to
access the html files?
"Pandurang Nayak" wrote: I am not sure I understand your question completely. But if you are looking to protect access to some HTML files in your website, you can use Forms Authentication. Whenever the users try accessing the HTML files, if the users are not authenticated, they will be redirected to a login page.
If you are looking at having some data in a HTML file and protecting that, it is harder. You could take a look at the Dojo toolkit (dojotoolkit.or g) which provides some strong encryption techniques using JavaScript. Any ideas?
-- blog: www.thinkingMS.com/pandurang
"nick" wrote:
I need to create a simple asp.net application that use password protect some html pages. The html page provider doesn't know asp.net. And the host doesn't allow me to create user accounts.
What's the best way to store users/password except database tables? and to store html files?
"nick" <ni**@discussio ns.microsoft.co m> wrote in message
news:2B******** *************** ***********@mic rosoft.com... I think I need to write a simple forms authentication app for a html page designer. He will create html files, which are protected by forms authentication. ...
For example, I create a form authentication app in securehtmls/. And the html pages are dumped to the folder. will it be redirected to login screen if an un-authenticated user try to access the html files?
"Pandurang Nayak" wrote:
I am not sure I understand your question completely. But if you are looking to protect access to some HTML files in your website, you can use Forms Authentication. Whenever the users try accessing the HTML files, if the users are not authenticated, they will be redirected to a login page.
If you are looking at having some data in a HTML file and protecting that, it is harder. You could take a look at the Dojo toolkit (dojotoolkit.or g) which provides some strong encryption techniques using JavaScript. Any ideas?
-- blog: www.thinkingMS.com/pandurang
"nick" wrote:
> I need to create a simple asp.net application that use password protect > some > html pages. The html page provider doesn't know asp.net. And the host > doesn't > allow me to create user accounts. > > What's the best way to store users/password except database tables? and > to > store html files?
I am not sure exactly what you are trying to do, but I think the html files
will still be served even with forms authentication unless they are in
special folders like App_Data etc (ver 2.0) or you go through some trouble
to have .net handle html files. If they are in special folders though, they
won't be served, they must be called from code. You could have a page with
an extension .aspx (which you put in a secure folder) and use something
like the following :
Sub Page_Load(sende r as object, e as eventargs)
DisplayHtmlFile ("Path to your secure file here")
End Sub
Sub DisplayHtmlFile (strFilePath as string)
dim reader as textreader = new streamreader(st rFilePath)
dim strText as string = reader.readtoen d
plc1.controls.c lear
plc1.controls.a dd(New literalcontrol( strtext))
reader.close()
End Sub
In .aspx file
<asp:placeholde r id=plc1 runat=server />
Mike,
I tried this recently. We had a bunch of images and HTML files to be
protected. I also thought (and remember seeing in earlier versions) such
static resources being served directly when the virtual folder has forms
authentication.
Recently, I tried this with ASP.NET 2.0 / IIS 6.0 and voila - the page
redirected to the login page set in forms authentication even when I accessed
static resources directly.
Nick, you can try this and see if it works for you. I made the settings in
web.config and had IIS 6.0 virtual directory setup as an IIS application.
Regards
Pandu
--
blog: www.thinkingMS.com/pandurang
"vMike" wrote: "nick" <ni**@discussio ns.microsoft.co m> wrote in message news:2B******** *************** ***********@mic rosoft.com...I think I need to write a simple forms authentication app for a html page designer. He will create html files, which are protected by forms authentication. ...
For example, I create a form authentication app in securehtmls/. And the html pages are dumped to the folder. will it be redirected to login screen if an un-authenticated user try to access the html files?
"Pandurang Nayak" wrote:
I am not sure I understand your question completely. But if you are looking to protect access to some HTML files in your website, you can use Forms Authentication. Whenever the users try accessing the HTML files, if the users are not authenticated, they will be redirected to a login page.
If you are looking at having some data in a HTML file and protecting that, it is harder. You could take a look at the Dojo toolkit (dojotoolkit.or g) which provides some strong encryption techniques using JavaScript. Any ideas?
-- blog: www.thinkingMS.com/pandurang
"nick" wrote:
> I need to create a simple asp.net application that use password protect > some > html pages. The html page provider doesn't know asp.net. And the host > doesn't > allow me to create user accounts. > > What's the best way to store users/password except database tables? and > to > store html files?
I am not sure exactly what you are trying to do, but I think the html files will still be served even with forms authentication unless they are in special folders like App_Data etc (ver 2.0) or you go through some trouble to have .net handle html files. If they are in special folders though, they won't be served, they must be called from code. You could have a page with an extension .aspx (which you put in a secure folder) and use something like the following :
Sub Page_Load(sende r as object, e as eventargs) DisplayHtmlFile ("Path to your secure file here") End Sub Sub DisplayHtmlFile (strFilePath as string) dim reader as textreader = new streamreader(st rFilePath) dim strText as string = reader.readtoen d plc1.controls.c lear plc1.controls.a dd(New literalcontrol( strtext)) reader.close() End Sub
In .aspx file <asp:placeholde r id=plc1 runat=server />
"Pandurang Nayak" <pandurangATthi nkingmsDOT(nosp am)com> wrote in message
news:EE******** *************** ***********@mic rosoft.com... Mike,
I tried this recently. We had a bunch of images and HTML files to be protected. I also thought (and remember seeing in earlier versions) such static resources being served directly when the virtual folder has forms authentication.
Recently, I tried this with ASP.NET 2.0 / IIS 6.0 and voila - the page redirected to the login page set in forms authentication even when I accessed static resources directly.
Nick, you can try this and see if it works for you. I made the settings in web.config and had IIS 6.0 virtual directory setup as an IIS application.
Regards Pandu
-- blog: www.thinkingMS.com/pandurang
"vMike" wrote:
"nick" <ni**@discussio ns.microsoft.co m> wrote in message news:2B******** *************** ***********@mic rosoft.com... >I think I need to write a simple forms authentication app for a html >page > designer. He will create html files, which are protected by forms > authentication. ... > > For example, I create a form authentication app in securehtmls/. And > the > html pages are dumped to the folder. > will it be redirected to login screen if an un-authenticated user try > to > access the html files? > > "Pandurang Nayak" wrote: >
Mine servers up the pages without authentication. Your server must have been
configured to handle html through .net. Mine apparently isn't.
Mike This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Wm |
last post by:
Something just occurred to me... <yeah, I know, it scared me too> I just
password-protected a website by including a password authentication script
in each page of a private section. The script checks the login against the
mySQL database. This type of protection will only affect the .php pages,
won't it? The images that are contained in the pages are not protected, as
they would be if I had a .htaccess file on the parent directory..? This...
|
by: Klaus Kragelund |
last post by:
Hi
I'm using DreamWeaver 2004 on a Win2k machine to create my homepage.
After spending several hours of mingling with ASP I discover that my
ISP doesn't support Access databases. So I turned to MySQL...
However now I'm stuck. I created the files describes in this tutorial:
http://www.gidforums.com/t-887.html
But I know next to nothing about SQL. For example - where is the
|
by: |
last post by:
I am writing a small program that needs to be able to open Excel
workbooks which are password protected. Does anyone know how to do this,
without any interaction from the user? I am sure it is something simple that
I am missing.
Here is the relevant section of my code:
|
by: connoisseur.infotech |
last post by:
hello
we are developing one tool where we need to open and make password
protected zip files.
we found some solutions but they don't support password protected
things.
does any one knows about this
or any aproach for this.
|
by: prophet |
last post by:
so hopefully only one more question about this.....
so I have a webpage using frames. I have a header and a column down the
left, and the main body (all of which have different htmls but are brought
together under index.html.
From the header frame I have a list of different options which when clicked
change the body of the page, leaving the header page the same. I have
added a page which uses a 'gatekeeper' to loosely password protect...
| |
by: Noel S Pamfree |
last post by:
Problem 1
=======
I need to create a page for a friend who operates a school website. She
needs to set up a page so that only the Governors can access it. I thought
I'd try to use JavaScript to prompt for a password. (I am only an amateur at
writing JavaScript).
It works fine in my tests when using Firefox but when I load the page in
Internet Explorer it causes an error. (I am using the newest version 7 - the
|
by: ManWithNoName |
last post by:
Yay guys!
I hope you all are having a warm fuzzy loveable day.
The following questions are kind of related to this thread:
Protect files (on web server) from web admin.
If one has password protected zip file:
1) where would the content temporary be extracted to (probably the OS designated temp directory, right?)
|
by: aagarwal8 |
last post by:
Hi,
I want to create a log file from my C# code. Currently I am encrypting
the contents of this log file, but now the requirement is that no one
should not be able to open this file from Windows Explorer. (Currently
if we open the file using some editor, the encrypted contents are
displayed)
The file should only be read/modified from within the program.
|
by: itshibu |
last post by:
I tried to write a program that can open files from the server. But the shared folder in the Win2003 server is password protected. i tried the following code
System.Diagnostics.Process.Start("net.exe", "use K: \\Server\URI\path\here /USER:username password" )
Dim p = New System.Diagnostics.Process
p.Start("k:\" & Filename)
System.Diagnostics.Process.Start("net.exe", "use /delete K:" )
And it is working fine. But for big files and...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |