Hi!
I would like to know if I can save File on Server using server-side code?
For example, I like to create thumbnail images and populate specific
directory.
Do I need specific permissions to do this? (I use public host)
Thanks! 9 2964
Yes your code will need write permissions to the folder on the server that
you wish to save to.
Normally you'd grant such permission to the ASPNET user account.
In your case you'll probably need your web host to set up the necessary
permissions for you.
--
I hope this helps,
Steve C. Orr, MCSD, MVP http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
"Ivan Demkovitch" <i@a.b> wrote in message
news:OE**************@TK2MSFTNGP10.phx.gbl... Hi!
I would like to know if I can save File on Server using server-side code?
For example, I like to create thumbnail images and populate specific directory.
Do I need specific permissions to do this? (I use public host)
Thanks!
Ok.
Thanks, will try this ...
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:eF**************@TK2MSFTNGP09.phx.gbl... Yes your code will need write permissions to the folder on the server that you wish to save to. Normally you'd grant such permission to the ASPNET user account. In your case you'll probably need your web host to set up the necessary permissions for you.
-- I hope this helps, Steve C. Orr, MCSD, MVP http://Steve.Orr.net Hire top-notch developers at http://www.able-consulting.com "Ivan Demkovitch" <i@a.b> wrote in message news:OE**************@TK2MSFTNGP10.phx.gbl... Hi!
I would like to know if I can save File on Server using server-side
code? For example, I like to create thumbnail images and populate specific directory.
Do I need specific permissions to do this? (I use public host)
Thanks!
Steve,
I did it and it works perfect on my system and doesn't work on a host...
Do you know EXACTLY what they need to set on their server to allow file
operations?
Thanks a lot,
Ivan
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:eF**************@TK2MSFTNGP09.phx.gbl... Yes your code will need write permissions to the folder on the server that you wish to save to. Normally you'd grant such permission to the ASPNET user account. In your case you'll probably need your web host to set up the necessary permissions for you.
-- I hope this helps, Steve C. Orr, MCSD, MVP http://Steve.Orr.net Hire top-notch developers at http://www.able-consulting.com "Ivan Demkovitch" <i@a.b> wrote in message news:OE**************@TK2MSFTNGP10.phx.gbl... Hi!
I would like to know if I can save File on Server using server-side
code? For example, I like to create thumbnail images and populate specific directory.
Do I need specific permissions to do this? (I use public host)
Thanks!
By default the ASPNET user account needs write permission to the folder
you're trying to write to. It's as simple as that.
Of course your web host may have customized their servers so that your web
app is running under a different user account. Only they know these kinds
of details.
--
I hope this helps,
Steve C. Orr, MCSD, MVP http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
"Ivan Demkovitch" <i@a.b> wrote in message
news:Oj**************@TK2MSFTNGP09.phx.gbl... Steve,
I did it and it works perfect on my system and doesn't work on a host...
Do you know EXACTLY what they need to set on their server to allow file operations?
Thanks a lot, Ivan
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:eF**************@TK2MSFTNGP09.phx.gbl... Yes your code will need write permissions to the folder on the server
that you wish to save to. Normally you'd grant such permission to the ASPNET user account. In your case you'll probably need your web host to set up the necessary permissions for you.
-- I hope this helps, Steve C. Orr, MCSD, MVP http://Steve.Orr.net Hire top-notch developers at http://www.able-consulting.com "Ivan Demkovitch" <i@a.b> wrote in message news:OE**************@TK2MSFTNGP10.phx.gbl... Hi!
I would like to know if I can save File on Server using server-side code? For example, I like to create thumbnail images and populate specific directory.
Do I need specific permissions to do this? (I use public host)
Thanks!
Ok..
It was simple (as far as setup) My web hositng panel allow me to change
permissions.
BUT, trying ASPNET account didn't do the trick.
Also I have IUSR_SOMETHING which didn't work eather.
I gave up and added permissions to "Everyone" which made it work.
I wonder if this is dangerous as far as security?
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:uJ**************@TK2MSFTNGP11.phx.gbl... By default the ASPNET user account needs write permission to the folder you're trying to write to. It's as simple as that.
Of course your web host may have customized their servers so that your web app is running under a different user account. Only they know these kinds of details.
-- I hope this helps, Steve C. Orr, MCSD, MVP http://Steve.Orr.net Hire top-notch developers at http://www.able-consulting.com "Ivan Demkovitch" <i@a.b> wrote in message news:Oj**************@TK2MSFTNGP09.phx.gbl... Steve,
I did it and it works perfect on my system and doesn't work on a host...
Do you know EXACTLY what they need to set on their server to allow file operations?
Thanks a lot, Ivan
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:eF**************@TK2MSFTNGP09.phx.gbl... Yes your code will need write permissions to the folder on the server that you wish to save to. Normally you'd grant such permission to the ASPNET user account. In your case you'll probably need your web host to set up the
necessary permissions for you.
-- I hope this helps, Steve C. Orr, MCSD, MVP http://Steve.Orr.net Hire top-notch developers at http://www.able-consulting.com "Ivan Demkovitch" <i@a.b> wrote in message news:OE**************@TK2MSFTNGP10.phx.gbl... > Hi! > > I would like to know if I can save File on Server using server-side code? > > For example, I like to create thumbnail images and populate specific > directory. > > Do I need specific permissions to do this? (I use public host) > > Thanks! > >
Yes I'd say that's pretty risky, especially on a shared server.
You should ask your web host what user account your web app is running under
and try to limit permissions to it.
Or you might be able to use impersonation to get it to run under a specific
account of your choosing.
Here's more info: http://msdn.microsoft.com/library/de...ersonation.asp
--
I hope this helps,
Steve C. Orr, MCSD, MVP http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
"Ivan Demkovitch" <i@a.b> wrote in message
news:OM**************@TK2MSFTNGP10.phx.gbl... Ok..
It was simple (as far as setup) My web hositng panel allow me to change permissions.
BUT, trying ASPNET account didn't do the trick.
Also I have IUSR_SOMETHING which didn't work eather.
I gave up and added permissions to "Everyone" which made it work. I wonder if this is dangerous as far as security? "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:uJ**************@TK2MSFTNGP11.phx.gbl... By default the ASPNET user account needs write permission to the folder you're trying to write to. It's as simple as that.
Of course your web host may have customized their servers so that your
web app is running under a different user account. Only they know these
kinds of details.
-- I hope this helps, Steve C. Orr, MCSD, MVP http://Steve.Orr.net Hire top-notch developers at http://www.able-consulting.com "Ivan Demkovitch" <i@a.b> wrote in message news:Oj**************@TK2MSFTNGP09.phx.gbl... Steve,
I did it and it works perfect on my system and doesn't work on a
host... Do you know EXACTLY what they need to set on their server to allow
file operations?
Thanks a lot, Ivan
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:eF**************@TK2MSFTNGP09.phx.gbl... > Yes your code will need write permissions to the folder on the
server that > you wish to save to. > Normally you'd grant such permission to the ASPNET user account. > In your case you'll probably need your web host to set up the necessary > permissions for you. > > -- > I hope this helps, > Steve C. Orr, MCSD, MVP > http://Steve.Orr.net > Hire top-notch developers at http://www.able-consulting.com > > > > "Ivan Demkovitch" <i@a.b> wrote in message > news:OE**************@TK2MSFTNGP10.phx.gbl... > > Hi! > > > > I would like to know if I can save File on Server using
server-side code? > > > > For example, I like to create thumbnail images and populate
specific > > directory. > > > > Do I need specific permissions to do this? (I use public host) > > > > Thanks! > > > > > >
Steve,
Thanks again, will try them 1 by 1.
I changed permissions to anyone to "Write only"
Which means worst thing I can get is a bunch of files??
I got another question:
I use Output stream to generate image on web page. I use custom http handler
for this.
To include picture I have code like:
<img title="Click to see item details"
src="/ASPNET/photo.aspx?ImageKey=6&Width=100&Height=0" border="0" />
photo.aspx is actually DLL which processes image.
I used output stream to output array of bytes and it works fine. Now I cache
scaled images and if image already scaled I load it and
save byte array to stream which works good as well.
However, I think it's steel performance issue to load image into array and
then save to stream.
It should be much better to just add url link to image somehow.
I tried something like: (in photo.dll)
//Just pass file name to response...
Response.ContentType = "text/html";
Response.Write(ScaledImageWebPath);
Response.End();
Which doesn't work...
DO you have any ideas on how this could be accomplished?
Thank you,
Ivan
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... Yes I'd say that's pretty risky, especially on a shared server. You should ask your web host what user account your web app is running
under and try to limit permissions to it. Or you might be able to use impersonation to get it to run under a
specific account of your choosing. Here's more info: http://msdn.microsoft.com/library/de...ersonation.asp -- I hope this helps, Steve C. Orr, MCSD, MVP http://Steve.Orr.net Hire top-notch developers at http://www.able-consulting.com
"Ivan Demkovitch" <i@a.b> wrote in message news:OM**************@TK2MSFTNGP10.phx.gbl... Ok..
It was simple (as far as setup) My web hositng panel allow me to change permissions.
BUT, trying ASPNET account didn't do the trick.
Also I have IUSR_SOMETHING which didn't work eather.
I gave up and added permissions to "Everyone" which made it work. I wonder if this is dangerous as far as security? "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:uJ**************@TK2MSFTNGP11.phx.gbl... By default the ASPNET user account needs write permission to the
folder you're trying to write to. It's as simple as that.
Of course your web host may have customized their servers so that your web app is running under a different user account. Only they know these kinds of details.
-- I hope this helps, Steve C. Orr, MCSD, MVP http://Steve.Orr.net Hire top-notch developers at http://www.able-consulting.com "Ivan Demkovitch" <i@a.b> wrote in message news:Oj**************@TK2MSFTNGP09.phx.gbl... > Steve, > > I did it and it works perfect on my system and doesn't work on a host... > > Do you know EXACTLY what they need to set on their server to allow file > operations? > > Thanks a lot, > Ivan > > "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message > news:eF**************@TK2MSFTNGP09.phx.gbl... > > Yes your code will need write permissions to the folder on the server that > > you wish to save to. > > Normally you'd grant such permission to the ASPNET user account. > > In your case you'll probably need your web host to set up the necessary > > permissions for you. > > > > -- > > I hope this helps, > > Steve C. Orr, MCSD, MVP > > http://Steve.Orr.net > > Hire top-notch developers at http://www.able-consulting.com > > > > > > > > "Ivan Demkovitch" <i@a.b> wrote in message > > news:OE**************@TK2MSFTNGP10.phx.gbl... > > > Hi! > > > > > > I would like to know if I can save File on Server using server-side > code? > > > > > > For example, I like to create thumbnail images and populate specific > > > directory. > > > > > > Do I need specific permissions to do this? (I use public host) > > > > > > Thanks! > > > > > > > > > > > >
You cannot write an image directly to an HTML page. You
can only put links to images in a page.
Normally your img tag would point to a jpg or a gif image file.
In your case you'll want it to point to a special page you've designed
specifically for outputting these images.
For example:
<img src='myimage.aspx' ...>
--
I hope this helps,
Steve C. Orr, MCSD, MVP http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com
"Ivan Demkovitch" <i@a.b> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl... Steve,
Thanks again, will try them 1 by 1.
I changed permissions to anyone to "Write only"
Which means worst thing I can get is a bunch of files??
I got another question:
I use Output stream to generate image on web page. I use custom http
handler for this.
To include picture I have code like: <img title="Click to see item details" src="/ASPNET/photo.aspx?ImageKey=6&Width=100&Height=0" border="0" />
photo.aspx is actually DLL which processes image.
I used output stream to output array of bytes and it works fine. Now I
cache scaled images and if image already scaled I load it and save byte array to stream which works good as well.
However, I think it's steel performance issue to load image into array and then save to stream. It should be much better to just add url link to image somehow.
I tried something like: (in photo.dll) //Just pass file name to response... Response.ContentType = "text/html"; Response.Write(ScaledImageWebPath); Response.End();
Which doesn't work...
DO you have any ideas on how this could be accomplished?
Thank you, Ivan "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:%2****************@tk2msftngp13.phx.gbl... Yes I'd say that's pretty risky, especially on a shared server. You should ask your web host what user account your web app is running under and try to limit permissions to it. Or you might be able to use impersonation to get it to run under a specific account of your choosing. Here's more info: http://msdn.microsoft.com/library/de...ersonation.asp -- I hope this helps, Steve C. Orr, MCSD, MVP http://Steve.Orr.net Hire top-notch developers at http://www.able-consulting.com
"Ivan Demkovitch" <i@a.b> wrote in message news:OM**************@TK2MSFTNGP10.phx.gbl... Ok..
It was simple (as far as setup) My web hositng panel allow me to
change permissions.
BUT, trying ASPNET account didn't do the trick.
Also I have IUSR_SOMETHING which didn't work eather.
I gave up and added permissions to "Everyone" which made it work. I wonder if this is dangerous as far as security? "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:uJ**************@TK2MSFTNGP11.phx.gbl... > By default the ASPNET user account needs write permission to the folder > you're trying to write to. It's as simple as that. > > Of course your web host may have customized their servers so that
your web > app is running under a different user account. Only they know these kinds > of details. > > -- > I hope this helps, > Steve C. Orr, MCSD, MVP > http://Steve.Orr.net > Hire top-notch developers at http://www.able-consulting.com > > > > "Ivan Demkovitch" <i@a.b> wrote in message > news:Oj**************@TK2MSFTNGP09.phx.gbl... > > Steve, > > > > I did it and it works perfect on my system and doesn't work on a host... > > > > Do you know EXACTLY what they need to set on their server to
allow file > > operations? > > > > Thanks a lot, > > Ivan > > > > "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message > > news:eF**************@TK2MSFTNGP09.phx.gbl... > > > Yes your code will need write permissions to the folder on the server > that > > > you wish to save to. > > > Normally you'd grant such permission to the ASPNET user account. > > > In your case you'll probably need your web host to set up the necessary > > > permissions for you. > > > > > > -- > > > I hope this helps, > > > Steve C. Orr, MCSD, MVP > > > http://Steve.Orr.net > > > Hire top-notch developers at http://www.able-consulting.com > > > > > > > > > > > > "Ivan Demkovitch" <i@a.b> wrote in message > > > news:OE**************@TK2MSFTNGP10.phx.gbl... > > > > Hi! > > > > > > > > I would like to know if I can save File on Server using server-side > > code? > > > > > > > > For example, I like to create thumbnail images and populate specific > > > > directory. > > > > > > > > Do I need specific permissions to do this? (I use public host) > > > > > > > > Thanks! > > > > > > > > > > > > > > > > > > > >
Steve,
See my reply to George in message "Output Stream Question"
<img src='myimage.aspx' ...> is exactly what I'm doing.
myimage.aspx is my http handler where code is.
Before I was taking image, scaled it and put into stream
Now I cache image once it requested and place in directory.
I just load bitmap and output to stream without scaling/other operations I
do.
It works faster, but I want avoid loading bitmap and somehow point browser
to this image..
Any ideas on how to approach it?
"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:e1**************@TK2MSFTNGP12.phx.gbl... You cannot write an image directly to an HTML page. You can only put links to images in a page. Normally your img tag would point to a jpg or a gif image file. In your case you'll want it to point to a special page you've designed specifically for outputting these images. For example: <img src='myimage.aspx' ...>
-- I hope this helps, Steve C. Orr, MCSD, MVP http://Steve.Orr.net Hire top-notch developers at http://www.able-consulting.com
"Ivan Demkovitch" <i@a.b> wrote in message news:%2***************@TK2MSFTNGP10.phx.gbl... Steve,
Thanks again, will try them 1 by 1.
I changed permissions to anyone to "Write only"
Which means worst thing I can get is a bunch of files??
I got another question:
I use Output stream to generate image on web page. I use custom http handler for this.
To include picture I have code like: <img title="Click to see item details" src="/ASPNET/photo.aspx?ImageKey=6&Width=100&Height=0" border="0" />
photo.aspx is actually DLL which processes image.
I used output stream to output array of bytes and it works fine. Now I cache scaled images and if image already scaled I load it and save byte array to stream which works good as well.
However, I think it's steel performance issue to load image into array
and then save to stream. It should be much better to just add url link to image somehow.
I tried something like: (in photo.dll) //Just pass file name to response... Response.ContentType = "text/html"; Response.Write(ScaledImageWebPath); Response.End();
Which doesn't work...
DO you have any ideas on how this could be accomplished?
Thank you, Ivan "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message news:%2****************@tk2msftngp13.phx.gbl... Yes I'd say that's pretty risky, especially on a shared server. You should ask your web host what user account your web app is running under and try to limit permissions to it. Or you might be able to use impersonation to get it to run under a specific account of your choosing. Here's more info:
http://msdn.microsoft.com/library/de...ersonation.asp -- I hope this helps, Steve C. Orr, MCSD, MVP http://Steve.Orr.net Hire top-notch developers at http://www.able-consulting.com
"Ivan Demkovitch" <i@a.b> wrote in message news:OM**************@TK2MSFTNGP10.phx.gbl... > Ok.. > > It was simple (as far as setup) My web hositng panel allow me to change > permissions. > > BUT, trying ASPNET account didn't do the trick. > > Also I have IUSR_SOMETHING which didn't work eather. > > I gave up and added permissions to "Everyone" which made it work. > I wonder if this is dangerous as far as security? > > > > "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message > news:uJ**************@TK2MSFTNGP11.phx.gbl... > > By default the ASPNET user account needs write permission to the
folder > > you're trying to write to. It's as simple as that. > > > > Of course your web host may have customized their servers so that your web > > app is running under a different user account. Only they know
these kinds > > of details. > > > > -- > > I hope this helps, > > Steve C. Orr, MCSD, MVP > > http://Steve.Orr.net > > Hire top-notch developers at http://www.able-consulting.com > > > > > > > > "Ivan Demkovitch" <i@a.b> wrote in message > > news:Oj**************@TK2MSFTNGP09.phx.gbl... > > > Steve, > > > > > > I did it and it works perfect on my system and doesn't work on a host... > > > > > > Do you know EXACTLY what they need to set on their server to allow file > > > operations? > > > > > > Thanks a lot, > > > Ivan > > > > > > "Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message > > > news:eF**************@TK2MSFTNGP09.phx.gbl... > > > > Yes your code will need write permissions to the folder on the server > > that > > > > you wish to save to. > > > > Normally you'd grant such permission to the ASPNET user
account. > > > > In your case you'll probably need your web host to set up the > necessary > > > > permissions for you. > > > > > > > > -- > > > > I hope this helps, > > > > Steve C. Orr, MCSD, MVP > > > > http://Steve.Orr.net > > > > Hire top-notch developers at http://www.able-consulting.com > > > > > > > > > > > > > > > > "Ivan Demkovitch" <i@a.b> wrote in message > > > > news:OE**************@TK2MSFTNGP10.phx.gbl... > > > > > Hi! > > > > > > > > > > I would like to know if I can save File on Server using server-side > > > code? > > > > > > > > > > For example, I like to create thumbnail images and populate specific > > > > > directory. > > > > > > > > > > Do I need specific permissions to do this? (I use public
host) > > > > > > > > > > Thanks! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: RickL |
last post by:
I have an ASP application that uploads a specified file to the server. To retrieve the file, I simply assign the filepath and file to a hyperlink on the page. When you click "Save Target As" for...
|
by: kevin |
last post by:
Hi,
Any help with this would be really appreciated!
I'm trying to download a file from a remote server. The access
permissions is okay but the problem I'm facing is that the file is
getting...
|
by: John |
last post by:
Hi,
I generate a report in a comma delimited file and give it
a name like MyReport.csv . I then set a Hyperlink
control to point tp the file
HyperLink1.text = "Download"...
|
by: Glenn M |
last post by:
I have a shared XML file on a server .
i also have one xslt file that performs a simple transform on in to
view the data.
now i want to have another page that lets users modify the shared xml...
|
by: Pat Carden |
last post by:
Hi,
We need to allow webusers to upload a file on our website (on Server3, all
servers run Server 2003, remotely hosted) and eventually save it on our SBS
Server (Server2) which is not exposed...
|
by: Stefano |
last post by:
I've a form windows with a lot of textbox controls.
How can I do if I have to save all text proprety of this controls in an
external file, to reload them in future?
|
by: Jonny |
last post by:
Hello Group
How do I open a Save File Dialog from an ASPX page behind a browse button?
Any help would be fantastic!!
I am using ASP.NET 1.1 using VB.NET as the coding language
TIA
|
by: rn5a |
last post by:
When users submit a Form with a SQL query, the resultset is retrieved
from a MS-Access database table which is then exported to an MS-Excel
worksheet. After the records get exported to MS-Excel, I...
|
by: evenlater |
last post by:
I have an Access application on a terminal server. Sometimes my users
need to export reports to pdf, rtf or xls files and save them to their
own client device hard drives.
They can do that right...
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: Teri B |
last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course.
0ne-to-many. One course many roles.
Then I created a report based on the Course form and...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
|
by: isladogs |
last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, Mike...
| |