473,791 Members | 3,186 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Security for writing a file

What is the safest way to create a file on the server? I'm looking for
something like:

secureconnectio n();
// create the file
disconnect();
Nov 18 '05 #1
6 1171
Can you be more specific?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:On******** ******@tk2msftn gp13.phx.gbl...
What is the safest way to create a file on the server? I'm looking for
something like:

secureconnectio n();
// create the file
disconnect();

Nov 18 '05 #2
I want to create a file on the server (which becomes a new page) based on
the input from a user. Once the user fills out some data a html file will be
created and the link to this file will be emailed to them.
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:ud******** ******@TK2MSFTN GP10.phx.gbl...
Can you be more specific?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:On******** ******@tk2msftn gp13.phx.gbl...
What is the safest way to create a file on the server? I'm looking for
something like:

secureconnectio n();
// create the file
disconnect();


Nov 18 '05 #3
Your original question was "What is the safest way to create a file on the
server?" That is what is unclear. What do you mean by "safe" and what was
the meaning of all that other pseudocode you put into your question?

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:OK******** *****@TK2MSFTNG P11.phx.gbl...
I want to create a file on the server (which becomes a new page) based on
the input from a user. Once the user fills out some data a html file will be created and the link to this file will be emailed to them.
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:ud******** ******@TK2MSFTN GP10.phx.gbl...
Can you be more specific?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:On******** ******@tk2msftn gp13.phx.gbl...
What is the safest way to create a file on the server? I'm looking for
something like:

secureconnectio n();
// create the file
disconnect();



Nov 18 '05 #4
Secure. I don't want to grant access to the world to be able to drop files
on the server.

What I want to do is be able to connect to the server with write access,
create a file on the server then remove the write access so the only time
anything can be written to this folder is during the time I create the file.

Here's another way of looking at it. I user on the web site fills in some
fields to create a custom web page. When they hit save the web page is saved
to the server. Once the page is saved the app will send an email to the user
with the link to their new page.

I hope this makes sense.

"Kevin Spencer" <ke***@takempis .com> wrote in message
news:OV******** *****@TK2MSFTNG P11.phx.gbl...
Your original question was "What is the safest way to create a file on the
server?" That is what is unclear. What do you mean by "safe" and what was
the meaning of all that other pseudocode you put into your question?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:OK******** *****@TK2MSFTNG P11.phx.gbl...
I want to create a file on the server (which becomes a new page) based on the input from a user. Once the user fills out some data a html file
will be
created and the link to this file will be emailed to them.
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:ud******** ******@TK2MSFTN GP10.phx.gbl...
Can you be more specific?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:On******** ******@tk2msftn gp13.phx.gbl...
> What is the safest way to create a file on the server? I'm looking for > something like:
>
> secureconnectio n();
> // create the file
> disconnect();
>
>



Nov 18 '05 #5
If you grant access to the account under which your ASP.Net process is
running, you are not granting it to anyone else. Therefore, only your app
will be able to do the writing to disk. So there is no security risk there.
I would recommend just having your app write the file to the disk. If you
need to limit whom has access to the app, you can require the user to log in
in order to use it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:eP******** ******@TK2MSFTN GP10.phx.gbl...
Secure. I don't want to grant access to the world to be able to drop files
on the server.

What I want to do is be able to connect to the server with write access,
create a file on the server then remove the write access so the only time
anything can be written to this folder is during the time I create the file.
Here's another way of looking at it. I user on the web site fills in some
fields to create a custom web page. When they hit save the web page is saved to the server. Once the page is saved the app will send an email to the user with the link to their new page.

I hope this makes sense.

"Kevin Spencer" <ke***@takempis .com> wrote in message
news:OV******** *****@TK2MSFTNG P11.phx.gbl...
Your original question was "What is the safest way to create a file on the
server?" That is what is unclear. What do you mean by "safe" and what was the meaning of all that other pseudocode you put into your question?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:OK******** *****@TK2MSFTNG P11.phx.gbl...
I want to create a file on the server (which becomes a new page) based

on the input from a user. Once the user fills out some data a html file will
be
created and the link to this file will be emailed to them.
"Kevin Spencer" <ke***@takempis .com> wrote in message
news:ud******** ******@TK2MSFTN GP10.phx.gbl...
> Can you be more specific?
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
> news:On******** ******@tk2msftn gp13.phx.gbl...
> > What is the safest way to create a file on the server? I'm looking

for > > something like:
> >
> > secureconnectio n();
> > // create the file
> > disconnect();
> >
> >
>
>



Nov 18 '05 #6
ok. So I'll just give ASPNET the rights. Thanks.

"Kevin Spencer" <ke***@takempis .com> wrote in message
news:eA******** ******@TK2MSFTN GP12.phx.gbl...
If you grant access to the account under which your ASP.Net process is
running, you are not granting it to anyone else. Therefore, only your app
will be able to do the writing to disk. So there is no security risk there. I would recommend just having your app write the file to the disk. If you
need to limit whom has access to the app, you can require the user to log in in order to use it.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:eP******** ******@TK2MSFTN GP10.phx.gbl...
Secure. I don't want to grant access to the world to be able to drop files
on the server.

What I want to do is be able to connect to the server with write access,
create a file on the server then remove the write access so the only time anything can be written to this folder is during the time I create the

file.

Here's another way of looking at it. I user on the web site fills in some fields to create a custom web page. When they hit save the web page is

saved
to the server. Once the page is saved the app will send an email to the

user
with the link to their new page.

I hope this makes sense.

"Kevin Spencer" <ke***@takempis .com> wrote in message
news:OV******** *****@TK2MSFTNG P11.phx.gbl...
Your original question was "What is the safest way to create a file on the server?" That is what is unclear. What do you mean by "safe" and what was the meaning of all that other pseudocode you put into your question?

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
news:OK******** *****@TK2MSFTNG P11.phx.gbl...
> I want to create a file on the server (which becomes a new page)

based on
> the input from a user. Once the user fills out some data a html file

will
be
> created and the link to this file will be emailed to them.
>
>
> "Kevin Spencer" <ke***@takempis .com> wrote in message
> news:ud******** ******@TK2MSFTN GP10.phx.gbl...
> > Can you be more specific?
> >
> > --
> > HTH,
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > Big things are made up
> > of lots of little things.
> >
> > "Joe Bonavita" <JBonavita_@_ca minus.com> wrote in message
> > news:On******** ******@tk2msftn gp13.phx.gbl...
> > > What is the safest way to create a file on the server? I'm
looking for
> > > something like:
> > >
> > > secureconnectio n();
> > > // create the file
> > > disconnect();
> > >
> > >
> >
> >
>
>



Nov 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3940
by: Fran Tirimo | last post by:
I am developing a small website using ASP scripts to format data retrieved from an Access database. It will run on a Windows 2003 server supporting FrontPage extensions 2002 hosted by the company 1&1 with only limited server configuration via a web based control panel. My query relates to the ASP security model and how it relates to FrontPage options for setting file access on a database file. If you know of any online documentation...
116
7557
by: Mike MacSween | last post by:
S**t for brains strikes again! Why did I do that? When I met the clients and at some point they vaguely asked whether eventually would it be possible to have some people who could read the data and some who couldn't but that it wasn't important right now. And I said, 'sure, we can do that later'. So now I've developed an app without any thought to security and am trying to apply it afterwards. Doh!, doh! and triple doh!
2
1851
by: TechBoy | last post by:
I am trying to learn on the fly about Access Security for an app we are developing. I realize Access security is an advanced subject with many details. I wanted to share a scenario and ask a couple of questions. Scenario: I have MyApp.MDB up on a file server. I also have two Client PC's: Client1 and Client2 who use MyApp. (Both Client's are running Access 2002) On Client1's PC:
12
1975
by: Mark | last post by:
Hello, in a simple console application I try to create a file with some code like: FileStream file = new FileStream("test.txt", FileMode.OpenOrCreate, FileAccess.Write); StreamWriter sw = new StreamWriter(file); sw.Write("Hello"); sw.Close(); file.Close();
0
2099
by: Namratha Shah \(Nasha\) | last post by:
Hey Guys, Today we are going to look at Code Access Security. Code access security is a feature of .NET that manages code depending on its trust level. If the CLS trusts the code enough to allow it ro run then it will execute, the code execution depends on the permission provided to the assembly. If the code is not trusted wnough to run or it attempts to perform an action which doe not have the required permissions then its execution...
3
7025
by: Jennifer | last post by:
On an ASP page I've got some code that is supposed to "export" data in a grid to an Excel file. What I'm doing is writing all the data to a text file, separating the fields by commas. Then I'll redirect the user to a new page with the file that was just created. Code: Dim objFSO, objTextFile Dim sRead, sReadLine, sReadAll Const ForReading = 1, ForWriting = 2, ForAppending = 8
1
1921
by: Jeremy S. | last post by:
..NET's code Access Security enables administrators to restrict the types of things that a .NET application can do on a local computer. For example, a ..NET Windows Forms application can be prevented from writing to the Registry or writing a file to the local disk. My question: Is this feature unique to .NET? Or is it just as easy for enterprise network administrators to prevent COM applications from writing to the Registry and doing...
2
2302
by: John Kotuby | last post by:
Hello all, Note: This is the full version of a Post that I inadvertently sent before it was complete. About a year ago I wrote a VB.NET 2003 solution that consists of a number of assemblies (1 EXE and 15 DLLS). As I recall, in order to deploy the solution to a testing server I simply copied the contents of the Bin folder in the development area where the compiled assemblies reside. Be patient with me here, because I haven't used...
2
7668
by: Ken Fine | last post by:
I want to add the security question and answer security feature to the ChangePassword control. I am aware that this functionality is built into the PasswordRecovery tool. I have implemented the PasswordRecovery with a Password reset required; a temporary password is sent to the account on file. I want an extra layer of security to accommodate the very unlikely contingency that someone's e-mail account is compromised. Challenging with the...
2
2949
ssnaik84
by: ssnaik84 | last post by:
Hello, I have hosted a website on GoDaddy.com. It's a share hosting. I am using XML file as a database. That means, I am reading and writing data into XML file instead of regular RDBMS (MySQL, MS SQL). I am reading XML data into DataSet and manipulate it and save the changes again to XML file. It works fine on my local machine.. but not working on GoDaddy server.. I am getting security exception.. Description: The application...
0
9517
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10156
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,...
0
9997
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7537
isladogs
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...
0
6776
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();...
0
5435
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...
0
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2916
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.